summaryrefslogtreecommitdiff
path: root/chromium/content/browser
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@digia.com>2014-05-22 18:24:25 +0200
committerAndras Becsi <andras.becsi@digia.com>2014-06-04 16:32:40 +0200
commit4ce69f7403811819800e7c5ae1318b2647e778d1 (patch)
tree2ec3a98b5abef002670a0916354eb7e0abfe2aa2 /chromium/content/browser
parenta6dd70e0328d155d5df8d6df48afbab690b08fb6 (diff)
downloadqtwebengine-chromium-4ce69f7403811819800e7c5ae1318b2647e778d1.tar.gz
Update Chromium snapshot to stable version 33.0.1750.170
This is meant as a baseline commit hence it does not include the patches we need to apply for QtWebEngine. All patches should be rebased on top of this commit so we can get rid of the external patches directory. In future these baseline commits always have to include the exact Chromium version returned by version_resolver.py's currentVersion() in their first line, so that we can retrieve the patches on top to apply on the upstream repository. This also includes a ninja update. Change-Id: I60abeadb785a3b7d149c58b65ddb5a823fed3083 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'chromium/content/browser')
-rw-r--r--chromium/content/browser/browser_main_loop.cc2
-rw-r--r--chromium/content/browser/devtools/worker_devtools_manager.cc26
-rw-r--r--chromium/content/browser/devtools/worker_devtools_manager.h26
-rw-r--r--chromium/content/browser/gpu/gpu_process_host.cc6
-rw-r--r--chromium/content/browser/media/webrtc_identity_store_backend.cc37
-rw-r--r--chromium/content/browser/media/webrtc_identity_store_backend.h42
-rw-r--r--chromium/content/browser/message_port_service.cc22
-rw-r--r--chromium/content/browser/message_port_service.h23
-rw-r--r--chromium/content/browser/renderer_host/clipboard_message_filter.cc30
-rw-r--r--chromium/content/browser/renderer_host/render_process_host_impl.cc2
-rw-r--r--chromium/content/browser/renderer_host/render_sandbox_host_linux.cc2
-rw-r--r--chromium/content/browser/web_contents/web_contents_impl.cc4
12 files changed, 125 insertions, 97 deletions
diff --git a/chromium/content/browser/browser_main_loop.cc b/chromium/content/browser/browser_main_loop.cc
index c2787e08c72..1930bc083a7 100644
--- a/chromium/content/browser/browser_main_loop.cc
+++ b/chromium/content/browser/browser_main_loop.cc
@@ -654,7 +654,7 @@ int BrowserMainLoop::CreateThreads() {
"BrowserMainLoop::CreateThreads:start",
"Thread", "BrowserThread::FILE");
thread_to_start = &file_thread_;
-#if defined(OS_WIN) && !defined(TOOLKIT_QT)
+#if defined(OS_WIN)
// On Windows, the FILE thread needs to be have a UI message loop
// which pumps messages in such a way that Google Update can
// communicate back to us.
diff --git a/chromium/content/browser/devtools/worker_devtools_manager.cc b/chromium/content/browser/devtools/worker_devtools_manager.cc
index 983c55cfb2b..f0608815f33 100644
--- a/chromium/content/browser/devtools/worker_devtools_manager.cc
+++ b/chromium/content/browser/devtools/worker_devtools_manager.cc
@@ -51,6 +51,19 @@ base::LazyInstance<AgentHosts>::Leaky g_orphan_map = LAZY_INSTANCE_INITIALIZER;
} // namespace
+struct WorkerDevToolsManager::TerminatedInspectedWorker {
+ TerminatedInspectedWorker(WorkerId id,
+ const GURL& url,
+ const base::string16& name)
+ : old_worker_id(id),
+ worker_url(url),
+ worker_name(name) {}
+ WorkerId old_worker_id;
+ GURL worker_url;
+ base::string16 worker_name;
+};
+
+
class WorkerDevToolsManager::WorkerDevToolsAgentHost
: public IPCDevToolsAgentHost {
public:
@@ -189,6 +202,19 @@ class WorkerDevToolsManager::DetachedClientHosts {
}
};
+struct WorkerDevToolsManager::InspectedWorker {
+ InspectedWorker(WorkerProcessHost* host, int route_id, const GURL& url,
+ const base::string16& name)
+ : host(host),
+ route_id(route_id),
+ worker_url(url),
+ worker_name(name) {}
+ WorkerProcessHost* const host;
+ int const route_id;
+ GURL worker_url;
+ base::string16 worker_name;
+};
+
// static
WorkerDevToolsManager* WorkerDevToolsManager::GetInstance() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
diff --git a/chromium/content/browser/devtools/worker_devtools_manager.h b/chromium/content/browser/devtools/worker_devtools_manager.h
index 955b1db5d47..8a9a7084226 100644
--- a/chromium/content/browser/devtools/worker_devtools_manager.h
+++ b/chromium/content/browser/devtools/worker_devtools_manager.h
@@ -54,20 +54,7 @@ class WorkerDevToolsManager {
private:
friend struct DefaultSingletonTraits<WorkerDevToolsManager>;
class DetachedClientHosts;
-
- struct InspectedWorker {
- InspectedWorker(WorkerProcessHost* host, int route_id, const GURL& url,
- const base::string16& name)
- : host(host),
- route_id(route_id),
- worker_url(url),
- worker_name(name) {}
- WorkerProcessHost* const host;
- int const route_id;
- GURL worker_url;
- base::string16 worker_name;
- };
-
+ struct InspectedWorker;
typedef std::list<InspectedWorker> InspectedWorkersList;
WorkerDevToolsManager();
@@ -97,16 +84,7 @@ class WorkerDevToolsManager {
InspectedWorkersList inspected_workers_;
- struct TerminatedInspectedWorker {
- TerminatedInspectedWorker(WorkerId id, const GURL& url, const base::string16& name)
- : old_worker_id(id),
- worker_url(url),
- worker_name(name) {}
- WorkerId old_worker_id;
- GURL worker_url;
- base::string16 worker_name;
- };
-
+ struct TerminatedInspectedWorker;
typedef std::list<TerminatedInspectedWorker> TerminatedInspectedWorkers;
// List of terminated workers for which there may be a devtools client on
// the UI thread. Worker entry is added into this list when inspected worker
diff --git a/chromium/content/browser/gpu/gpu_process_host.cc b/chromium/content/browser/gpu/gpu_process_host.cc
index c28ba8b7499..1b7da1c8d7c 100644
--- a/chromium/content/browser/gpu/gpu_process_host.cc
+++ b/chromium/content/browser/gpu/gpu_process_host.cc
@@ -577,13 +577,7 @@ bool GpuProcessHost::Init() {
switches::kDisableGpuWatchdog);
in_process_gpu_thread_.reset(g_gpu_main_thread_factory(channel_id));
-#if defined(OS_WIN) && defined(TOOLKIT_QT)
- base::Thread::Options options;
- options.message_loop_type = base::MessageLoop::TYPE_DEFAULT;
- in_process_gpu_thread_->StartWithOptions(options);
-#else
in_process_gpu_thread_->Start();
-#endif
OnProcessLaunched(); // Fake a callback that the process is ready.
} else if (!LaunchGpuProcess(channel_id)) {
diff --git a/chromium/content/browser/media/webrtc_identity_store_backend.cc b/chromium/content/browser/media/webrtc_identity_store_backend.cc
index 697de93c927..d599dcda742 100644
--- a/chromium/content/browser/media/webrtc_identity_store_backend.cc
+++ b/chromium/content/browser/media/webrtc_identity_store_backend.cc
@@ -46,6 +46,43 @@ static bool InitDB(sql::Connection* db) {
"creation_time INTEGER)");
}
+struct WebRTCIdentityStoreBackend::IdentityKey {
+ IdentityKey(const GURL& origin, const std::string& identity_name)
+ : origin(origin), identity_name(identity_name) {}
+
+ bool operator<(const IdentityKey& other) const {
+ return origin < other.origin ||
+ (origin == other.origin && identity_name < other.identity_name);
+ }
+
+ GURL origin;
+ std::string identity_name;
+};
+
+struct WebRTCIdentityStoreBackend::Identity {
+ Identity(const std::string& common_name,
+ const std::string& certificate,
+ const std::string& private_key)
+ : common_name(common_name),
+ certificate(certificate),
+ private_key(private_key),
+ creation_time(base::Time::Now().ToInternalValue()) {}
+
+ Identity(const std::string& common_name,
+ const std::string& certificate,
+ const std::string& private_key,
+ int64 creation_time)
+ : common_name(common_name),
+ certificate(certificate),
+ private_key(private_key),
+ creation_time(creation_time) {}
+
+ std::string common_name;
+ std::string certificate;
+ std::string private_key;
+ int64 creation_time;
+};
+
struct WebRTCIdentityStoreBackend::PendingFindRequest {
PendingFindRequest(const GURL& origin,
const std::string& identity_name,
diff --git a/chromium/content/browser/media/webrtc_identity_store_backend.h b/chromium/content/browser/media/webrtc_identity_store_backend.h
index 9be3fc2345e..92b68b62d67 100644
--- a/chromium/content/browser/media/webrtc_identity_store_backend.h
+++ b/chromium/content/browser/media/webrtc_identity_store_backend.h
@@ -11,7 +11,8 @@
#include "base/time/time.h"
#include "sql/connection.h"
#include "sql/meta_table.h"
-#include "url/gurl.h"
+
+class GURL;
namespace base {
class FilePath;
@@ -93,44 +94,7 @@ class WebRTCIdentityStoreBackend
};
struct PendingFindRequest;
struct IdentityKey;
-
- struct IdentityKey {
- IdentityKey(const GURL& origin, const std::string& identity_name)
- : origin(origin), identity_name(identity_name) {}
-
- bool operator<(const IdentityKey& other) const {
- return origin < other.origin ||
- (origin == other.origin && identity_name < other.identity_name);
- }
-
- GURL origin;
- std::string identity_name;
- };
-
- struct Identity {
- Identity(const std::string& common_name,
- const std::string& certificate,
- const std::string& private_key)
- : common_name(common_name),
- certificate(certificate),
- private_key(private_key),
- creation_time(base::Time::Now().ToInternalValue()) {}
-
- Identity(const std::string& common_name,
- const std::string& certificate,
- const std::string& private_key,
- int64 creation_time)
- : common_name(common_name),
- certificate(certificate),
- private_key(private_key),
- creation_time(creation_time) {}
-
- std::string common_name;
- std::string certificate;
- std::string private_key;
- int64 creation_time;
- };
-
+ struct Identity;
typedef std::map<IdentityKey, Identity> IdentityMap;
~WebRTCIdentityStoreBackend();
diff --git a/chromium/content/browser/message_port_service.cc b/chromium/content/browser/message_port_service.cc
index 25c2b44200d..0d9f6084e86 100644
--- a/chromium/content/browser/message_port_service.cc
+++ b/chromium/content/browser/message_port_service.cc
@@ -9,6 +9,28 @@
namespace content {
+struct MessagePortService::MessagePort {
+ // |filter| and |route_id| are what we need to send messages to the port.
+ // |filter| is just a weak pointer since we get notified when its process has
+ // gone away and remove it.
+ MessagePortMessageFilter* filter;
+ int route_id;
+ // A globally unique id for this message port.
+ int message_port_id;
+ // The globally unique id of the entangled message port.
+ int entangled_message_port_id;
+ // If true, all messages to this message port are queued and not delivered.
+ // This is needed so that when a message port is sent between processes all
+ // pending message get transferred. There are two possibilities for pending
+ // messages: either they are already received by the child process, or they're
+ // in-flight. This flag ensures that the latter type get flushed through the
+ // system.
+ // This flag should only be set to true in response to
+ // MessagePortHostMsg_QueueMessages.
+ bool queue_messages;
+ QueuedMessages queued_messages;
+};
+
MessagePortService* MessagePortService::GetInstance() {
return Singleton<MessagePortService>::get();
}
diff --git a/chromium/content/browser/message_port_service.h b/chromium/content/browser/message_port_service.h
index 3e197a48aeb..668959167f7 100644
--- a/chromium/content/browser/message_port_service.h
+++ b/chromium/content/browser/message_port_service.h
@@ -64,28 +64,7 @@ class MessagePortService {
// verify that the message port id exists.
void Erase(int message_port_id);
- struct MessagePort {
- // |filter| and |route_id| are what we need to send messages to the port.
- // |filter| is just a weak pointer since we get notified when its process has
- // gone away and remove it.
- MessagePortMessageFilter* filter;
- int route_id;
- // A globally unique id for this message port.
- int message_port_id;
- // The globally unique id of the entangled message port.
- int entangled_message_port_id;
- // If true, all messages to this message port are queued and not delivered.
- // This is needed so that when a message port is sent between processes all
- // pending message get transferred. There are two possibilities for pending
- // messages: either they are already received by the child process, or they're
- // in-flight. This flag ensures that the latter type get flushed through the
- // system.
- // This flag should only be set to true in response to
- // MessagePortHostMsg_QueueMessages.
- bool queue_messages;
- QueuedMessages queued_messages;
- };
-
+ struct MessagePort;
typedef std::map<int, MessagePort> MessagePorts;
MessagePorts message_ports_;
diff --git a/chromium/content/browser/renderer_host/clipboard_message_filter.cc b/chromium/content/browser/renderer_host/clipboard_message_filter.cc
index 6ba95f8f12c..bacce45dde4 100644
--- a/chromium/content/browser/renderer_host/clipboard_message_filter.cc
+++ b/chromium/content/browser/renderer_host/clipboard_message_filter.cc
@@ -31,6 +31,33 @@ void WriteObjectsOnUIThread(ui::Clipboard::ObjectMap* objects) {
clipboard->WriteObjects(ui::CLIPBOARD_TYPE_COPY_PASTE, *objects);
}
+enum BitmapPolicy {
+ kFilterBitmap,
+ kAllowBitmap,
+};
+void SanitizeObjectMap(ui::Clipboard::ObjectMap* objects,
+ BitmapPolicy bitmap_policy) {
+ if (bitmap_policy != kAllowBitmap)
+ objects->erase(ui::Clipboard::CBF_SMBITMAP);
+
+ ui::Clipboard::ObjectMap::iterator data_it =
+ objects->find(ui::Clipboard::CBF_DATA);
+ if (data_it != objects->end()) {
+ const ui::Clipboard::FormatType& web_custom_format =
+ ui::Clipboard::GetWebCustomDataFormatType();
+ if (data_it->second.size() != 2 ||
+ !web_custom_format.Equals(
+ ui::Clipboard::FormatType::Deserialize(std::string(
+ &data_it->second[0].front(),
+ data_it->second[0].size())))) {
+ // CBF_DATA should always have two parameters associated with it, and the
+ // associated FormatType should always be web custom data. If not, then
+ // data is malformed and we'll ignore it.
+ objects->erase(ui::Clipboard::CBF_DATA);
+ }
+ }
+}
+
} // namespace
@@ -101,6 +128,7 @@ void ClipboardMessageFilter::OnWriteObjectsSync(
// to the clipboard later.
scoped_ptr<ui::Clipboard::ObjectMap> long_living_objects(
new ui::Clipboard::ObjectMap(objects));
+ SanitizeObjectMap(long_living_objects.get(), kAllowBitmap);
// Splice the shared memory handle into the data. |long_living_objects| now
// contains a heap-allocated SharedMemory object that references
// |bitmap_handle|. This reference will keep the shared memory section alive
@@ -123,7 +151,7 @@ void ClipboardMessageFilter::OnWriteObjectsAsync(
// be removed otherwise we might dereference a rubbish pointer.
scoped_ptr<ui::Clipboard::ObjectMap> sanitized_objects(
new ui::Clipboard::ObjectMap(objects));
- sanitized_objects->erase(ui::Clipboard::CBF_SMBITMAP);
+ SanitizeObjectMap(sanitized_objects.get(), kFilterBitmap);
#if defined(OS_WIN)
// We cannot write directly from the IO thread, and cannot service the IPC
diff --git a/chromium/content/browser/renderer_host/render_process_host_impl.cc b/chromium/content/browser/renderer_host/render_process_host_impl.cc
index b5a5c497106..5d975e9119d 100644
--- a/chromium/content/browser/renderer_host/render_process_host_impl.cc
+++ b/chromium/content/browser/renderer_host/render_process_host_impl.cc
@@ -512,7 +512,7 @@ bool RenderProcessHostImpl::Init() {
in_process_renderer_.reset(g_renderer_main_thread_factory(channel_id));
base::Thread::Options options;
-#if defined(OS_WIN) && !defined(OS_MACOSX) && !defined(TOOLKIT_QT)
+#if defined(OS_WIN) && !defined(OS_MACOSX)
// In-process plugins require this to be a UI message loop.
options.message_loop_type = base::MessageLoop::TYPE_UI;
#else
diff --git a/chromium/content/browser/renderer_host/render_sandbox_host_linux.cc b/chromium/content/browser/renderer_host/render_sandbox_host_linux.cc
index f4e1cfc6e41..19cbc5b4b35 100644
--- a/chromium/content/browser/renderer_host/render_sandbox_host_linux.cc
+++ b/chromium/content/browser/renderer_host/render_sandbox_host_linux.cc
@@ -709,7 +709,7 @@ void RenderSandboxHostLinux::Init(const std::string& sandbox_path) {
childs_lifeline_fd_ = pipefds[1];
// We need to be monothreaded before we fork().
-#if !defined(TOOLKIT_GTK) && !defined(TOOLKIT_QT)
+#if !defined(TOOLKIT_GTK)
// Exclude gtk port as TestSuite in base/tests/test_suite.cc is calling
// gtk_init.
// TODO(oshima): Remove ifdef when above issues are resolved.
diff --git a/chromium/content/browser/web_contents/web_contents_impl.cc b/chromium/content/browser/web_contents/web_contents_impl.cc
index ee5b901ddc8..6b6cf00819e 100644
--- a/chromium/content/browser/web_contents/web_contents_impl.cc
+++ b/chromium/content/browser/web_contents/web_contents_impl.cc
@@ -1464,7 +1464,7 @@ void WebContentsImpl::CreateNewWidget(int render_process_id,
// Save the created widget associated with the route so we can show it later.
pending_widget_views_[route_id] = widget_view;
-#if defined(OS_MACOSX) && !defined(TOOLKIT_QT)
+#if defined(OS_MACOSX)
// A RenderWidgetHostViewMac has lifetime scoped to the view. We'll retain it
// to allow it to survive the trip without being hosted.
base::mac::NSObjectRetain(widget_view->GetNativeView());
@@ -1529,7 +1529,7 @@ void WebContentsImpl::ShowCreatedWidget(int route_id,
// used to implement Pepper Flash fullscreen.
render_widget_host_impl->set_allow_privileged_mouse_lock(is_fullscreen);
-#if defined(OS_MACOSX) && !defined(TOOLKIT_QT)
+#if defined(OS_MACOSX)
// A RenderWidgetHostViewMac has lifetime scoped to the view. Now that it's
// properly embedded (or purposefully ignored) we can release the retain we
// took in CreateNewWidget().