update to 16.0.912.75 and backport a fix from Chromium SVN to fix the KDE

issues
This commit is contained in:
robert 2012-01-06 16:27:26 +00:00
parent e84600a53b
commit 7225978c26
6 changed files with 259 additions and 14 deletions

View File

@ -1,12 +1,11 @@
# $OpenBSD: Makefile,v 1.77 2012/01/01 09:04:13 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.78 2012/01/06 16:27:26 robert Exp $
ONLY_FOR_ARCHS= i386 amd64
COMMENT= Chromium browser
V= 16.0.912.63
V= 16.0.912.75
DISTNAME= chromium-${V}
REVISION= 0
CATEGORIES= www

View File

@ -1,5 +1,5 @@
MD5 (chromium-16.0.912.63.tar.bz2) = BHchMDXy+pNPXIyx+QfXZg==
RMD160 (chromium-16.0.912.63.tar.bz2) = /s8sIamuVO5nZoslQpNtKSqFdak=
SHA1 (chromium-16.0.912.63.tar.bz2) = crtHtkM6Uf0OJM8Gkps37n4UoKM=
SHA256 (chromium-16.0.912.63.tar.bz2) = 2oBoKa3uBMBwFESxhCl17sLkt0WVaTPXYBU6QUtTxYg=
SIZE (chromium-16.0.912.63.tar.bz2) = 154351760
MD5 (chromium-16.0.912.75.tar.bz2) = vPyNT3V7uo/IvPxQGsgRDg==
RMD160 (chromium-16.0.912.75.tar.bz2) = qR+AjzCluwnIqErSmDjxsD7nbK4=
SHA1 (chromium-16.0.912.75.tar.bz2) = vNdNA5M8xK6Xc4Nd9sOkv8SPZpg=
SHA256 (chromium-16.0.912.75.tar.bz2) = iMkxR5ri+Sx/sx4UwETpcypfdl3YcrJ9RJ79bJnIPpU=
SIZE (chromium-16.0.912.75.tar.bz2) = 154371278

View File

@ -0,0 +1,27 @@
$OpenBSD: patch-chrome_browser_ui_gtk_dialogs_common_cc,v 1.1 2012/01/06 16:27:26 robert Exp $
--- chrome/browser/ui/gtk/dialogs_common.cc.orig Thu Jan 5 09:02:35 2012
+++ chrome/browser/ui/gtk/dialogs_common.cc Fri Jan 6 13:18:13 2012
@@ -8,9 +8,7 @@
#include "base/environment.h"
#include "base/file_util.h"
-#include "base/message_loop.h"
#include "base/nix/xdg_util.h"
-#include "base/threading/thread.h"
#include "base/threading/thread_restrictions.h"
#include "content/browser/browser_thread.h"
@@ -25,7 +23,7 @@ SelectFileDialog* SelectFileDialog::Create(Listener* l
base::nix::GetDesktopEnvironment(env.get());
if (desktop == base::nix::DESKTOP_ENVIRONMENT_KDE3 ||
desktop == base::nix::DESKTOP_ENVIRONMENT_KDE4) {
- return SelectFileDialogImpl::NewSelectFileDialogImplKDE(listener);
+ return SelectFileDialogImpl::NewSelectFileDialogImplKDE(listener, desktop);
}
return SelectFileDialogImpl::NewSelectFileDialogImplGTK(listener);
}
@@ -54,4 +52,3 @@ bool SelectFileDialogImpl::CallDirectoryExistsOnUIThre
base::ThreadRestrictions::ScopedAllowIO allow_io;
return file_util::DirectoryExists(path);
}
-

View File

@ -0,0 +1,31 @@
$OpenBSD: patch-chrome_browser_ui_gtk_dialogs_common_h,v 1.1 2012/01/06 16:27:26 robert Exp $
--- chrome/browser/ui/gtk/dialogs_common.h.orig Thu Jan 5 09:02:35 2012
+++ chrome/browser/ui/gtk/dialogs_common.h Fri Jan 6 13:18:13 2012
@@ -9,9 +9,8 @@
#pragma once
#include <set>
-#include <string>
-#include <vector>
+#include "base/nix/xdg_util.h"
#include "chrome/browser/ui/shell_dialogs.h"
// Shared implementation SelectFileDialog used by SelectFileDialogImplGTK
@@ -20,7 +19,9 @@ class SelectFileDialogImpl : public SelectFileDialog {
// Factory method for creating a GTK-styled SelectFileDialogImpl
static SelectFileDialogImpl* NewSelectFileDialogImplGTK(Listener* listener);
// Factory method for creating a KDE-styled SelectFileDialogImpl
- static SelectFileDialogImpl* NewSelectFileDialogImplKDE(Listener* listener);
+ static SelectFileDialogImpl* NewSelectFileDialogImplKDE(
+ Listener* listener,
+ base::nix::DesktopEnvironment desktop);
// BaseShellDialog implementation.
virtual bool IsRunning(gfx::NativeWindow parent_window) const;
@@ -69,5 +70,3 @@ class SelectFileDialogImpl : public SelectFileDialog {
};
#endif // CHROME_BROWSER_UI_GTK_DIALOGS_COMMON_H_
-
-

View File

@ -0,0 +1,188 @@
$OpenBSD: patch-chrome_browser_ui_gtk_dialogs_kde_cc,v 1.1 2012/01/06 16:27:26 robert Exp $
--- chrome/browser/ui/gtk/dialogs_kde.cc.orig Thu Jan 5 09:02:35 2012
+++ chrome/browser/ui/gtk/dialogs_kde.cc Fri Jan 6 13:20:56 2012
@@ -4,34 +4,37 @@
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
-#include <map>
#include <set>
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/command_line.h"
-#include "base/file_util.h"
#include "base/logging.h"
-#include "base/message_loop.h"
#include "base/mime_util.h"
+#include "base/nix/xdg_util.h"
#include "base/process_util.h"
#include "base/string_number_conversions.h"
#include "base/string_util.h"
-#include "base/sys_string_conversions.h"
-#include "base/threading/thread.h"
-#include "base/threading/thread_restrictions.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/ui/gtk/dialogs_common.h"
-#include "chrome/browser/ui/shell_dialogs.h"
#include "content/browser/browser_thread.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
+namespace {
+
+std::string GetTitle(const std::string& title, int message_id) {
+ return title.empty() ? l10n_util::GetStringUTF8(message_id) : title;
+}
+
+} // namespace
+
// Implementation of SelectFileDialog that shows a KDE common dialog for
// choosing a file or folder. This acts as a modal dialog.
class SelectFileDialogImplKDE : public SelectFileDialogImpl {
public:
- explicit SelectFileDialogImplKDE(Listener* listener);
+ SelectFileDialogImplKDE(Listener* listener,
+ base::nix::DesktopEnvironment desktop);
~SelectFileDialogImplKDE();
protected:
@@ -102,16 +105,25 @@ class SelectFileDialogImplKDE : public SelectFileDialo
void OnSelectSingleFolderDialogResponse(const std::string& output,
int exit_code, void* params);
+ // Should be either DESKTOP_ENVIRONMENT_KDE3 or DESKTOP_ENVIRONMENT_KDE4.
+ base::nix::DesktopEnvironment desktop_;
+
DISALLOW_COPY_AND_ASSIGN(SelectFileDialogImplKDE);
};
+// static
SelectFileDialogImpl* SelectFileDialogImpl::NewSelectFileDialogImplKDE(
- Listener* listener) {
- return new SelectFileDialogImplKDE(listener);
+ Listener* listener, base::nix::DesktopEnvironment desktop) {
+ return new SelectFileDialogImplKDE(listener, desktop);
}
-SelectFileDialogImplKDE::SelectFileDialogImplKDE(Listener* listener)
- : SelectFileDialogImpl(listener) {
+SelectFileDialogImplKDE::SelectFileDialogImplKDE(
+ Listener* listener,
+ base::nix::DesktopEnvironment desktop)
+ : SelectFileDialogImpl(listener),
+ desktop_(desktop) {
+ DCHECK(desktop_ == base::nix::DESKTOP_ENVIRONMENT_KDE3 ||
+ desktop_ == base::nix::DESKTOP_ENVIRONMENT_KDE4);
}
SelectFileDialogImplKDE::~SelectFileDialogImplKDE() {
@@ -226,14 +238,14 @@ void SelectFileDialogImplKDE::GetKDialogCommandLine(co
return;
}
// Attach to the current Chrome window.
- GdkWindow* gdk_window =
- gtk_widget_get_window(GTK_WIDGET((parent)));
+ GdkWindow* gdk_window = gtk_widget_get_window(GTK_WIDGET((parent)));
int window_id = GDK_DRAWABLE_XID(gdk_window);
- command_line->AppendSwitchNative("--attach", base::IntToString(window_id));
+ command_line->AppendSwitchNative(
+ desktop_ == base::nix::DESKTOP_ENVIRONMENT_KDE3 ? "--embed" : "--attach",
+ base::IntToString(window_id));
// Set the correct title for the dialog.
- if (!title.empty()) {
+ if (!title.empty())
command_line->AppendSwitchNative("--title", title);
- }
// Enable multiple file selection if we need to.
if (multiple_selection) {
command_line->AppendSwitch("--multiple");
@@ -241,16 +253,14 @@ void SelectFileDialogImplKDE::GetKDialogCommandLine(co
}
command_line->AppendSwitch(type);
// The path should never be empty. If it is, set it to PWD.
- if (path.empty()) {
+ if (path.empty())
command_line->AppendArgPath(FilePath("."));
- } else {
+ else
command_line->AppendArgPath(path);
- }
// Depending on the type of the operation we need, get the path to the
// file/folder and set up mime type filters.
- if (file_operation) {
+ if (file_operation)
command_line->AppendArg(GetMimeTypeFilterString());
- }
VLOG(1) << "KDialog command line: "
<< command_line->GetCommandLineString() << std::endl;
}
@@ -285,13 +295,11 @@ void SelectFileDialogImplKDE::FileNotSelected(void* pa
void SelectFileDialogImplKDE::CreateSelectFolderDialog(
const std::string& title, const FilePath& default_path,
gfx::NativeWindow parent, void *params) {
- std::string title_string = !title.empty() ? title :
- l10n_util::GetStringUTF8(IDS_SELECT_FOLDER_DIALOG_TITLE);
-
Task* dialog_task =
NewRunnableMethod(
this, &SelectFileDialogImplKDE::CallKDialogOutput,
- std::string("--getexistingdirectory"), title,
+ std::string("--getexistingdirectory"),
+ GetTitle(title, IDS_SELECT_FOLDER_DIALOG_TITLE),
default_path.empty() ? *last_opened_path_ : default_path,
parent, false, false, params,
&SelectFileDialogImplKDE::OnSelectSingleFolderDialogResponse);
@@ -301,13 +309,11 @@ void SelectFileDialogImplKDE::CreateSelectFolderDialog
void SelectFileDialogImplKDE::CreateFileOpenDialog(
const std::string& title, const FilePath& default_path,
gfx::NativeWindow parent, void* params) {
- std::string title_string = !title.empty() ? title :
- l10n_util::GetStringUTF8(IDS_OPEN_FILE_DIALOG_TITLE);
-
Task* dialog_task =
NewRunnableMethod(
this, &SelectFileDialogImplKDE::CallKDialogOutput,
- std::string("--getopenfilename"), title,
+ std::string("--getopenfilename"),
+ GetTitle(title, IDS_OPEN_FILE_DIALOG_TITLE),
default_path.empty() ? *last_opened_path_ : default_path,
parent, true, false, params,
&SelectFileDialogImplKDE::OnSelectSingleFileDialogResponse);
@@ -317,13 +323,11 @@ void SelectFileDialogImplKDE::CreateFileOpenDialog(
void SelectFileDialogImplKDE::CreateMultiFileOpenDialog(
const std::string& title, const FilePath& default_path,
gfx::NativeWindow parent, void* params) {
- std::string title_string = !title.empty() ? title :
- l10n_util::GetStringUTF8(IDS_OPEN_FILES_DIALOG_TITLE);
-
Task* dialog_task =
NewRunnableMethod(
this, &SelectFileDialogImplKDE::CallKDialogOutput,
- std::string("--getopenfilename"), title,
+ std::string("--getopenfilename"),
+ GetTitle(title, IDS_OPEN_FILES_DIALOG_TITLE),
default_path.empty() ? *last_opened_path_ : default_path,
parent, true, true, params,
&SelectFileDialogImplKDE::OnSelectMultiFileDialogResponse);
@@ -333,13 +337,11 @@ void SelectFileDialogImplKDE::CreateMultiFileOpenDialo
void SelectFileDialogImplKDE::CreateSaveAsDialog(
const std::string& title, const FilePath& default_path,
gfx::NativeWindow parent, void* params) {
- std::string title_string = !title.empty() ? title :
- l10n_util::GetStringUTF8(IDS_SAVE_AS_DIALOG_TITLE);
-
Task* dialog_task =
NewRunnableMethod(
this, &SelectFileDialogImplKDE::CallKDialogOutput,
- std::string("--getsavefilename"), title,
+ std::string("--getsavefilename"),
+ GetTitle(title, IDS_SAVE_AS_DIALOG_TITLE),
default_path.empty() ? *last_saved_path_ : default_path,
parent, true, false, params,
&SelectFileDialogImplKDE::OnSelectSingleFileDialogResponse);
@@ -405,4 +407,3 @@ void SelectFileDialogImplKDE::OnSelectMultiFileDialogR
}
MultiFilesSelected(filenames_fp, params);
}
-

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-content_browser_plugin_service_cc,v 1.2 2011/12/14 16:58:19 robert Exp $
--- content/browser/plugin_service.cc.orig Wed Dec 7 09:01:17 2011
+++ content/browser/plugin_service.cc Tue Dec 13 21:23:12 2011
$OpenBSD: patch-content_browser_plugin_service_cc,v 1.3 2012/01/06 16:27:26 robert Exp $
--- content/browser/plugin_service.cc.orig Thu Jan 5 09:01:16 2012
+++ content/browser/plugin_service.cc Fri Jan 6 10:08:00 2012
@@ -37,7 +37,7 @@
#include "webkit/plugins/npapi/plugin_list.h"
#include "webkit/plugins/webplugininfo.h"
@ -10,7 +10,7 @@ $OpenBSD: patch-content_browser_plugin_service_cc,v 1.2 2011/12/14 16:58:19 robe
using ::base::files::FilePathWatcher;
#endif
@@ -86,7 +86,7 @@ static void NotifyPluginsOfActivation() {
@@ -81,7 +81,7 @@ static void NotifyPluginsOfActivation() {
plugin->OnAppActivation();
}
}
@ -19,7 +19,7 @@ $OpenBSD: patch-content_browser_plugin_service_cc,v 1.2 2011/12/14 16:58:19 robe
// Delegate class for monitoring directories.
class PluginDirWatcherDelegate : public FilePathWatcher::Delegate {
virtual void OnFilePathChanged(const FilePath& path) OVERRIDE {
@@ -170,7 +170,7 @@ void PluginService::StartWatchingPlugins() {
@@ -165,7 +165,7 @@ void PluginService::StartWatchingPlugins() {
hklm_watcher_.StartWatching(hklm_event_.get(), this);
}
}
@ -28,7 +28,7 @@ $OpenBSD: patch-content_browser_plugin_service_cc,v 1.2 2011/12/14 16:58:19 robe
// The FilePathWatcher produces too many false positives on MacOS (access time
// updates?) which will lead to enforcing updates of the plugins way too often.
// On ChromeOS the user can't install plugins anyway and on Windows all
@@ -607,7 +607,7 @@ PepperPluginInfo* PluginService::GetRegisteredPpapiPlu
@@ -602,7 +602,7 @@ PepperPluginInfo* PluginService::GetRegisteredPpapiPlu
return &ppapi_plugins_[ppapi_plugins_.size() - 1];
}