summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-11 23:10:56 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-11 23:10:56 +0000
commit50285fffa5e44c61cbf6141908c6297fbd0b20d4 (patch)
tree5fb535a307298d93e4c885c40856303784cbf543 /content
parent1ad795b4c02d1fd42743252685bd411619a2d4e2 (diff)
downloadchromium_src-50285fffa5e44c61cbf6141908c6297fbd0b20d4.zip
chromium_src-50285fffa5e44c61cbf6141908c6297fbd0b20d4.tar.gz
chromium_src-50285fffa5e44c61cbf6141908c6297fbd0b20d4.tar.bz2
Remove Gears from Chrome.
There are probably a few more bits and pieces that can be removed, but I think this is the majority of it. BUG=51934 Review URL: http://codereview.chromium.org/6576020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77888 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/browser_child_process_host.cc24
-rw-r--r--content/browser/browser_child_process_host.h14
-rw-r--r--content/browser/geolocation/gps_location_provider_linux.cc4
-rw-r--r--content/browser/geolocation/location_provider.h3
-rw-r--r--content/browser/geolocation/osx_wifi.h2
-rw-r--r--content/browser/geolocation/win7_location_provider_win.cc4
-rw-r--r--content/browser/modal_html_dialog_delegate.cc77
-rw-r--r--content/browser/modal_html_dialog_delegate.h68
-rw-r--r--content/browser/plugin_process_host.cc100
-rw-r--r--content/browser/plugin_process_host.h7
-rw-r--r--content/browser/plugin_service.cc33
-rw-r--r--content/browser/plugin_service.h17
-rw-r--r--content/browser/plugin_service_browsertest.cc1
-rw-r--r--content/browser/plugin_service_unittest.cc11
-rw-r--r--content/browser/renderer_host/render_message_filter.cc11
-rw-r--r--content/browser/renderer_host/render_message_filter.h3
-rw-r--r--content/browser/renderer_host/render_view_host.cc18
-rw-r--r--content/browser/renderer_host/render_view_host.h7
-rw-r--r--content/browser/renderer_host/render_view_host_delegate.h4
-rw-r--r--content/browser/renderer_host/resource_dispatcher_host.cc23
-rw-r--r--content/browser/renderer_host/resource_dispatcher_host_request_info.cc8
-rw-r--r--content/browser/renderer_host/resource_dispatcher_host_request_info.h15
-rw-r--r--content/browser/renderer_host/resource_dispatcher_host_unittest.cc7
-rw-r--r--content/browser/renderer_host/resource_message_filter.cc4
-rw-r--r--content/browser/renderer_host/resource_message_filter.h6
-rw-r--r--content/browser/renderer_host/resource_queue_unittest.cc2
-rw-r--r--content/browser/renderer_host/socket_stream_dispatcher_host.cc9
-rw-r--r--content/browser/tab_contents/tab_contents.cc12
-rw-r--r--content/browser/tab_contents/tab_contents.h3
-rw-r--r--content/browser/webui/web_ui_factory.cc6
-rw-r--r--content/browser/worker_host/worker_process_host.cc3
-rw-r--r--content/common/child_thread.cc7
-rw-r--r--content/common/child_thread.h4
-rw-r--r--content/common/resource_dispatcher.cc31
-rw-r--r--content/common/resource_dispatcher.h4
-rw-r--r--content/common/resource_dispatcher_dummy.cc4
-rw-r--r--content/common/resource_dispatcher_unittest.cc2
-rw-r--r--content/common/resource_messages.h9
-rw-r--r--content/content_browser.gypi2
39 files changed, 40 insertions, 529 deletions
diff --git a/content/browser/browser_child_process_host.cc b/content/browser/browser_child_process_host.cc
index 5142943..04b6c49 100644
--- a/content/browser/browser_child_process_host.cc
+++ b/content/browser/browser_child_process_host.cc
@@ -24,6 +24,7 @@
#include "chrome/installer/util/google_update_settings.h"
#include "content/browser/browser_thread.h"
#include "content/common/notification_service.h"
+#include "content/browser/renderer_host/resource_message_filter.h"
#if defined(OS_LINUX)
#include "base/linux_util.h"
@@ -60,34 +61,13 @@ class ChildNotificationTask : public Task {
BrowserChildProcessHost::BrowserChildProcessHost(
ChildProcessInfo::ProcessType type,
- ResourceDispatcherHost* resource_dispatcher_host,
- ResourceMessageFilter::URLRequestContextOverride*
- url_request_context_override)
- : ChildProcessInfo(type, -1),
- ALLOW_THIS_IN_INITIALIZER_LIST(client_(this)),
- resource_dispatcher_host_(resource_dispatcher_host) {
- Initialize(url_request_context_override);
-}
-
-BrowserChildProcessHost::BrowserChildProcessHost(
- ChildProcessInfo::ProcessType type,
ResourceDispatcherHost* resource_dispatcher_host)
: ChildProcessInfo(type, -1),
ALLOW_THIS_IN_INITIALIZER_LIST(client_(this)),
resource_dispatcher_host_(resource_dispatcher_host) {
- Initialize(NULL);
-}
-
-void BrowserChildProcessHost::Initialize(
- ResourceMessageFilter::URLRequestContextOverride*
- url_request_context_override) {
if (resource_dispatcher_host_) {
ResourceMessageFilter* resource_message_filter = new ResourceMessageFilter(
- id(), type(), resource_dispatcher_host_);
- if (url_request_context_override) {
- resource_message_filter->set_url_request_context_override(
- url_request_context_override);
- }
+ id(), type, resource_dispatcher_host_);
AddFilter(resource_message_filter);
}
diff --git a/content/browser/browser_child_process_host.h b/content/browser/browser_child_process_host.h
index 2010a79..dd1c4ff1b 100644
--- a/content/browser/browser_child_process_host.h
+++ b/content/browser/browser_child_process_host.h
@@ -9,7 +9,6 @@
#include <list>
#include "content/browser/child_process_launcher.h"
-#include "content/browser/renderer_host/resource_message_filter.h"
#include "content/common/child_process_host.h"
#include "content/common/child_process_info.h"
@@ -57,16 +56,6 @@ class BrowserChildProcessHost : public ChildProcessHost,
};
protected:
- // |resource_dispatcher_host| may be NULL to indicate none is needed for
- // this process type.
- // |url_request_context_getter| allows derived classes to override the
- // net::URLRequestContext.
- BrowserChildProcessHost(
- ChildProcessInfo::ProcessType type,
- ResourceDispatcherHost* resource_dispatcher_host,
- ResourceMessageFilter::URLRequestContextOverride*
- url_request_context_override);
-
// A convenient constructor for those classes that want to use the default
// net::URLRequestContext.
BrowserChildProcessHost(
@@ -121,9 +110,6 @@ class BrowserChildProcessHost : public ChildProcessHost,
}
private:
- void Initialize(ResourceMessageFilter::URLRequestContextOverride*
- url_request_context_override);
-
// By using an internal class as the ChildProcessLauncher::Client, we can
// intercept OnProcessLaunched and do our own processing before
// calling the subclass' implementation.
diff --git a/content/browser/geolocation/gps_location_provider_linux.cc b/content/browser/geolocation/gps_location_provider_linux.cc
index 8d9af32..4b5f787 100644
--- a/content/browser/geolocation/gps_location_provider_linux.cc
+++ b/content/browser/geolocation/gps_location_provider_linux.cc
@@ -21,8 +21,8 @@ const int kPollPeriodStationaryMillis = kPollPeriodMovingMillis * 3;
// GPS reading must differ by more than this amount to be considered movement.
const int kMovementThresholdMeters = 20;
-// This algorithm is reused from the corresponding code in the gears project.
-// The arbitrary delta is decreased (gears used 100 meters); if we need to
+// This algorithm is reused from the corresponding code in the Gears project.
+// The arbitrary delta is decreased (Gears used 100 meters); if we need to
// decrease it any further we'll likely want to do some smarter filtering to
// remove GPS location jitter noise.
bool PositionsDifferSiginificantly(const Geoposition& position_1,
diff --git a/content/browser/geolocation/location_provider.h b/content/browser/geolocation/location_provider.h
index 064a59f..402ae75 100644
--- a/content/browser/geolocation/location_provider.h
+++ b/content/browser/geolocation/location_provider.h
@@ -3,8 +3,7 @@
// found in the LICENSE file.
// A location provider provides position information from a particular source
-// (GPS, network etc). The GearsGeolocation object uses a set of location
-// providers to obtain a position fix.
+// (GPS, network etc).
//
// This file declares a base class to be used by all location providers.
// Primarily, this class declares interface methods to be implemented by
diff --git a/content/browser/geolocation/osx_wifi.h b/content/browser/geolocation/osx_wifi.h
index 35af9c1..27a4256 100644
--- a/content/browser/geolocation/osx_wifi.h
+++ b/content/browser/geolocation/osx_wifi.h
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// The remainder of this file is copied from the Google Gear project:
+// The remainder of this file is copied from the Gears project:
// http://code.google.com/p/gears/source/browse/trunk/gears/geolocation/osx_wifi.h
// The contents of this file are taken from Apple80211.h from the iStumbler
diff --git a/content/browser/geolocation/win7_location_provider_win.cc b/content/browser/geolocation/win7_location_provider_win.cc
index 44a992b..2e5c487 100644
--- a/content/browser/geolocation/win7_location_provider_win.cc
+++ b/content/browser/geolocation/win7_location_provider_win.cc
@@ -18,9 +18,9 @@ const int kPollPeriodStationaryMillis = kPollPeriodMovingMillis * 3;
// Reading must differ by more than this amount to be considered movement.
const int kMovementThresholdMeters = 20;
-// This algorithm is reused from the corresponding code in the gears project
+// This algorithm is reused from the corresponding code in the Gears project
// and is also used in gps_location_provider_linux.cc
-// The arbitrary delta is decreased (gears used 100 meters); if we need to
+// The arbitrary delta is decreased (Gears used 100 meters); if we need to
// decrease it any further we'll likely want to do some smarter filtering to
// remove GPS location jitter noise.
bool PositionsDifferSiginificantly(const Geoposition& position_1,
diff --git a/content/browser/modal_html_dialog_delegate.cc b/content/browser/modal_html_dialog_delegate.cc
deleted file mode 100644
index de58a26..0000000
--- a/content/browser/modal_html_dialog_delegate.cc
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/browser/modal_html_dialog_delegate.h"
-
-#include <string>
-
-#include "chrome/browser/browser_list.h"
-#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_source.h"
-#include "ui/gfx/size.h"
-
-ModalHtmlDialogDelegate::ModalHtmlDialogDelegate(
- const GURL& url, int width, int height, const std::string& json_arguments,
- IPC::Message* sync_result, TabContents* contents)
- : contents_(contents),
- sync_response_(sync_result) {
- // Listen for when the TabContents or its renderer dies.
- registrar_.Add(this, NotificationType::TAB_CONTENTS_DISCONNECTED,
- Source<TabContents>(contents_));
-
- // This information is needed to show the dialog HTML content.
- params_.url = url;
- params_.height = height;
- params_.width = width;
- params_.json_input = json_arguments;
-}
-
-ModalHtmlDialogDelegate::~ModalHtmlDialogDelegate() {
-}
-
-void ModalHtmlDialogDelegate::Observe(NotificationType type,
- const NotificationSource& source,
- const NotificationDetails& details) {
- DCHECK(type == NotificationType::TAB_CONTENTS_DISCONNECTED);
- DCHECK(Source<TabContents>(source).ptr() == contents_);
- registrar_.RemoveAll();
- contents_ = NULL;
-}
-
-bool ModalHtmlDialogDelegate::IsDialogModal() const {
- return true;
-}
-
-std::wstring ModalHtmlDialogDelegate::GetDialogTitle() const {
- return L"Gears";
-}
-
-GURL ModalHtmlDialogDelegate::GetDialogContentURL() const {
- return params_.url;
-}
-
-void ModalHtmlDialogDelegate::GetDialogSize(gfx::Size* size) const {
- size->set_width(params_.width);
- size->set_height(params_.height);
-}
-
-std::string ModalHtmlDialogDelegate::GetDialogArgs() const {
- return params_.json_input;
-}
-
-void ModalHtmlDialogDelegate::OnDialogClosed(const std::string& json_retval) {
- // Our TabContents may have died before this point.
- if (contents_ && contents_->render_view_host()) {
- contents_->render_view_host()->ModalHTMLDialogClosed(sync_response_,
- json_retval);
- }
-
- // We are done with this request, so delete us.
- delete this;
-}
-
-bool ModalHtmlDialogDelegate::ShouldShowDialogTitle() const {
- return true;
-}
diff --git a/content/browser/modal_html_dialog_delegate.h b/content/browser/modal_html_dialog_delegate.h
deleted file mode 100644
index 75d7d05..0000000
--- a/content/browser/modal_html_dialog_delegate.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_BROWSER_MODAL_HTML_DIALOG_DELEGATE_H_
-#define CONTENT_BROWSER_MODAL_HTML_DIALOG_DELEGATE_H_
-#pragma once
-
-#include <vector>
-
-#include "chrome/browser/ui/webui/html_dialog_ui.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
-
-namespace gfx {
-class Size;
-}
-
-namespace IPC {
-class Message;
-}
-
-// This class can only be used on the UI thread.
-class ModalHtmlDialogDelegate
- : public HtmlDialogUIDelegate,
- public NotificationObserver {
- public:
- ModalHtmlDialogDelegate(const GURL& url,
- int width, int height,
- const std::string& json_arguments,
- IPC::Message* sync_result,
- TabContents* contents);
- ~ModalHtmlDialogDelegate();
-
- // Notification service callback.
- virtual void Observe(NotificationType type,
- const NotificationSource& source,
- const NotificationDetails& details);
-
- // HTMLDialogUIDelegate implementation:
- virtual bool IsDialogModal() const;
- virtual std::wstring GetDialogTitle() const;
- virtual GURL GetDialogContentURL() const;
- virtual void GetWebUIMessageHandlers(
- std::vector<WebUIMessageHandler*>* handlers) const { }
- virtual void GetDialogSize(gfx::Size* size) const;
- virtual std::string GetDialogArgs() const;
- virtual void OnDialogClosed(const std::string& json_retval);
- virtual void OnCloseContents(TabContents* source, bool* out_close_dialog) { }
- virtual bool ShouldShowDialogTitle() const;
-
- private:
- NotificationRegistrar registrar_;
-
- // The TabContents that opened the dialog.
- TabContents* contents_;
-
- // The parameters needed to display a modal HTML dialog.
- HtmlDialogUI::HtmlDialogParams params_;
-
- // Once we get our reply in OnModalDialogResponse we'll need to respond to the
- // plugin using this |sync_result| pointer so we store it between calls.
- IPC::Message* sync_response_;
-
- DISALLOW_COPY_AND_ASSIGN(ModalHtmlDialogDelegate);
-};
-
-#endif // CONTENT_BROWSER_MODAL_HTML_DIALOG_DELEGATE_H_
diff --git a/content/browser/plugin_process_host.cc b/content/browser/plugin_process_host.cc
index b2a2a3a4..25cdc75 100644
--- a/content/browser/plugin_process_host.cc
+++ b/content/browser/plugin_process_host.cc
@@ -21,12 +21,10 @@
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/chrome_plugin_browsing_context.h"
#include "chrome/browser/net/url_request_tracking.h"
#include "chrome/browser/plugin_download_helper.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_paths.h"
-#include "chrome/common/chrome_plugin_lib.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/logging_chrome.h"
#include "chrome/common/net/url_request_context_getter.h"
@@ -34,13 +32,11 @@
#include "chrome/common/render_messages.h"
#include "chrome/common/render_messages_params.h"
#include "content/browser/browser_thread.h"
-#include "content/browser/child_process_security_policy.h"
#include "content/browser/plugin_service.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/browser/renderer_host/resource_message_filter.h"
#include "content/common/resource_messages.h"
#include "ipc/ipc_switches.h"
-#include "net/base/cookie_store.h"
#include "net/base/io_buffer.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_context.h"
@@ -60,28 +56,6 @@
static const char kDefaultPluginFinderURL[] =
"https://dl-ssl.google.com/edgedl/chrome/plugins/plugins2.xml";
-namespace {
-
-// Helper class that we pass to ResourceMessageFilter so that it can find the
-// right net::URLRequestContext for a request.
-class PluginURLRequestContextOverride
- : public ResourceMessageFilter::URLRequestContextOverride {
- public:
- PluginURLRequestContextOverride() {
- }
-
- virtual net::URLRequestContext* GetRequestContext(
- const ResourceHostMsg_Request& resource_request) {
- return CPBrowsingContextManager::GetInstance()->ToURLRequestContext(
- resource_request.request_context);
- }
-
- private:
- virtual ~PluginURLRequestContextOverride() {}
-};
-
-} // namespace
-
#if defined(OS_WIN)
void PluginProcessHost::OnPluginWindowDestroyed(HWND window, HWND parent) {
// The window is destroyed at this point, we just care about its parent, which
@@ -121,8 +95,7 @@ void PluginProcessHost::OnMapNativeViewId(gfx::NativeViewId id,
PluginProcessHost::PluginProcessHost()
: BrowserChildProcessHost(
PLUGIN_PROCESS,
- PluginService::GetInstance()->resource_dispatcher_host(),
- new PluginURLRequestContextOverride()),
+ PluginService::GetInstance()->resource_dispatcher_host()),
ALLOW_THIS_IN_INITIALIZER_LIST(resolve_proxy_msg_helper_(this, NULL))
#if defined(OS_MACOSX)
, plugin_cursor_visible_(true)
@@ -241,12 +214,6 @@ bool PluginProcessHost::Init(const webkit::npapi::WebPluginInfo& info,
cmd_line->AppendSwitchASCII(switches::kLang, locale);
}
- // Gears requires the data dir to be available on startup.
- FilePath data_dir =
- PluginService::GetInstance()->GetChromePluginDataDir();
- DCHECK(!data_dir.empty());
- cmd_line->AppendSwitchPath(switches::kPluginDataDir, data_dir);
-
cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id());
SetCrashReporterCommandLine(cmd_line);
@@ -287,28 +254,12 @@ void PluginProcessHost::ForceShutdown() {
BrowserChildProcessHost::ForceShutdown();
}
-void PluginProcessHost::OnProcessLaunched() {
- FilePath gears_path;
- if (PathService::Get(chrome::FILE_GEARS_PLUGIN, &gears_path)) {
- FilePath::StringType gears_path_lc = StringToLowerASCII(gears_path.value());
- FilePath::StringType plugin_path_lc =
- StringToLowerASCII(info_.path.value());
- if (plugin_path_lc == gears_path_lc) {
- // Give Gears plugins "background" priority. See http://b/1280317.
- SetProcessBackgrounded();
- }
- }
-}
-
bool PluginProcessHost::OnMessageReceived(const IPC::Message& msg) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(PluginProcessHost, msg)
IPC_MESSAGE_HANDLER(PluginProcessHostMsg_ChannelCreated, OnChannelCreated)
IPC_MESSAGE_HANDLER(PluginProcessHostMsg_GetPluginFinderUrl,
OnGetPluginFinderUrl)
- IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginMessage, OnPluginMessage)
- IPC_MESSAGE_HANDLER(PluginProcessHostMsg_GetCookies, OnGetCookies)
- IPC_MESSAGE_HANDLER(PluginProcessHostMsg_AccessFiles, OnAccessFiles)
IPC_MESSAGE_HANDLER_DELAY_REPLY(PluginProcessHostMsg_ResolveProxy,
OnResolveProxy)
#if defined(OS_WIN)
@@ -379,43 +330,6 @@ void PluginProcessHost::OpenChannelToPlugin(Client* client) {
RequestPluginChannel(client);
}
-void PluginProcessHost::OnGetCookies(uint32 request_context,
- const GURL& url,
- std::string* cookies) {
- net::URLRequestContext* context = CPBrowsingContextManager::GetInstance()->
- ToURLRequestContext(request_context);
- // TODO(mpcomplete): remove fallback case when Gears support is prevalent.
- if (!context)
- context = Profile::GetDefaultRequestContext()->GetURLRequestContext();
-
- // Note: We don't have a first_party_for_cookies check because plugins bypass
- // third-party cookie blocking.
- if (context && context->cookie_store()) {
- *cookies = context->cookie_store()->GetCookies(url);
- } else {
- DLOG(ERROR) << "Could not serve plugin cookies request.";
- cookies->clear();
- }
-}
-
-void PluginProcessHost::OnAccessFiles(int renderer_id,
- const std::vector<std::string>& files,
- bool* allowed) {
- ChildProcessSecurityPolicy* policy =
- ChildProcessSecurityPolicy::GetInstance();
-
- for (size_t i = 0; i < files.size(); ++i) {
- const FilePath path = FilePath::FromWStringHack(UTF8ToWide(files[i]));
- if (!policy->CanReadFile(renderer_id, path)) {
- VLOG(1) << "Denied unauthorized request for file " << files[i];
- *allowed = false;
- return;
- }
- }
-
- *allowed = true;
-}
-
void PluginProcessHost::OnResolveProxy(const GURL& url,
IPC::Message* reply_msg) {
resolve_proxy_msg_helper_.Start(url, reply_msg);
@@ -469,15 +383,3 @@ void PluginProcessHost::OnGetPluginFinderUrl(std::string* plugin_finder_url) {
plugin_finder_url->clear();
}
}
-
-void PluginProcessHost::OnPluginMessage(
- const std::vector<uint8>& data) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
-
- ChromePluginLib *chrome_plugin = ChromePluginLib::Find(info_.path);
- if (chrome_plugin) {
- void *data_ptr = const_cast<void*>(reinterpret_cast<const void*>(&data[0]));
- uint32 data_len = static_cast<uint32>(data.size());
- chrome_plugin->functions().on_message(data_ptr, data_len);
- }
-}
diff --git a/content/browser/plugin_process_host.h b/content/browser/plugin_process_host.h
index ad44aae..14d1a6f 100644
--- a/content/browser/plugin_process_host.h
+++ b/content/browser/plugin_process_host.h
@@ -106,17 +106,10 @@ class PluginProcessHost : public BrowserChildProcessHost,
// for the given mime type.
void RequestPluginChannel(Client* client);
- virtual void OnProcessLaunched();
-
// Message handlers.
void OnChannelCreated(const IPC::ChannelHandle& channel_handle);
void OnGetPluginFinderUrl(std::string* plugin_finder_url);
- void OnGetCookies(uint32 request_context, const GURL& url,
- std::string* cookies);
- void OnAccessFiles(int renderer_id, const std::vector<std::string>& files,
- bool* allowed);
void OnResolveProxy(const GURL& url, IPC::Message* reply_msg);
- void OnPluginMessage(const std::vector<uint8>& data);
#if defined(OS_WIN)
void OnPluginWindowDestroyed(HWND window, HWND parent);
diff --git a/content/browser/plugin_service.cc b/content/browser/plugin_service.cc
index 95249f74d..bc6c026 100644
--- a/content/browser/plugin_service.cc
+++ b/content/browser/plugin_service.cc
@@ -14,12 +14,10 @@
#include "base/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/chrome_plugin_host.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/plugin_updater.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_paths.h"
-#include "chrome/common/chrome_plugin_lib.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/default_plugin.h"
#include "chrome/common/extensions/extension.h"
@@ -77,18 +75,12 @@ class PluginDirWatcherDelegate : public FilePathWatcher::Delegate {
#endif
// static
-bool PluginService::enable_chrome_plugins_ = true;
-
-// static
void PluginService::InitGlobalInstance(Profile* profile) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// We first group the plugins and then figure out which groups to
// enable or disable.
PluginUpdater::GetInstance()->UpdatePluginGroupsStateFromPrefs(profile);
-
- // Have Chrome plugins write their data to the profile directory.
- GetInstance()->SetChromePluginDataDir(profile->GetPath());
}
// static
@@ -96,20 +88,12 @@ PluginService* PluginService::GetInstance() {
return Singleton<PluginService>::get();
}
-// static
-void PluginService::EnableChromePlugins(bool enable) {
- enable_chrome_plugins_ = enable;
-}
-
PluginService::PluginService()
: main_message_loop_(MessageLoop::current()),
resource_dispatcher_host_(NULL),
ui_locale_(g_browser_process->GetApplicationLocale()) {
RegisterPepperPlugins();
- // Have the NPAPI plugin list search for Chrome plugins as well.
- ChromePluginLib::RegisterPluginsWithNPAPI();
-
// Load any specified on the command line as well.
const CommandLine* command_line = CommandLine::ForCurrentProcess();
FilePath path = command_line->GetSwitchValuePath(switches::kLoadPlugin);
@@ -218,23 +202,6 @@ PluginService::~PluginService() {
#endif
}
-void PluginService::LoadChromePlugins(
- ResourceDispatcherHost* resource_dispatcher_host) {
- if (!enable_chrome_plugins_)
- return;
-
- resource_dispatcher_host_ = resource_dispatcher_host;
- ChromePluginLib::LoadChromePlugins(GetCPBrowserFuncsForBrowser());
-}
-
-void PluginService::SetChromePluginDataDir(const FilePath& data_dir) {
- chrome_plugin_data_dir_ = data_dir;
-}
-
-const FilePath& PluginService::GetChromePluginDataDir() {
- return chrome_plugin_data_dir_;
-}
-
const std::string& PluginService::GetUILocale() {
return ui_locale_;
}
diff --git a/content/browser/plugin_service.h b/content/browser/plugin_service.h
index 4d0db82..e142a90 100644
--- a/content/browser/plugin_service.h
+++ b/content/browser/plugin_service.h
@@ -76,15 +76,6 @@ class PluginService
// Returns the PluginService singleton.
static PluginService* GetInstance();
- // Load all the plugins that should be loaded for the lifetime of the browser
- // (ie, with the LoadOnStartup flag set).
- void LoadChromePlugins(ResourceDispatcherHost* resource_dispatcher_host);
-
- // Sets/gets the data directory that Chrome plugins should use to store
- // persistent data.
- void SetChromePluginDataDir(const FilePath& data_dir);
- const FilePath& GetChromePluginDataDir();
-
// Gets the browser's UI locale.
const std::string& GetUILocale();
@@ -137,8 +128,6 @@ class PluginService
return resource_dispatcher_host_;
}
- static void EnableChromePlugins(bool enable);
-
private:
friend struct DefaultSingletonTraits<PluginService>;
@@ -184,9 +173,6 @@ class PluginService
// The IO thread's resource dispatcher host.
ResourceDispatcherHost* resource_dispatcher_host_;
- // The data directory that Chrome plugins should use to store persistent data.
- FilePath chrome_plugin_data_dir_;
-
// The browser's UI locale.
const std::string ui_locale_;
@@ -218,9 +204,6 @@ class PluginService
std::vector<PepperPluginInfo> ppapi_plugins_;
- // Set to true if chrome plugins are enabled. Defaults to true.
- static bool enable_chrome_plugins_;
-
std::vector<OverriddenPlugin> overridden_plugins_;
base::Lock overridden_plugins_lock_;
diff --git a/content/browser/plugin_service_browsertest.cc b/content/browser/plugin_service_browsertest.cc
index 3df43d0..54b6491 100644
--- a/content/browser/plugin_service_browsertest.cc
+++ b/content/browser/plugin_service_browsertest.cc
@@ -11,6 +11,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/test/in_process_browser_test.h"
#include "chrome/test/ui_test_utils.h"
+#include "content/browser/browser_thread.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "webkit/plugins/npapi/plugin_list.h"
diff --git a/content/browser/plugin_service_unittest.cc b/content/browser/plugin_service_unittest.cc
index 4db9722..283f86d 100644
--- a/content/browser/plugin_service_unittest.cc
+++ b/content/browser/plugin_service_unittest.cc
@@ -42,17 +42,6 @@ class PluginServiceTest : public testing::Test {
DISALLOW_COPY_AND_ASSIGN(PluginServiceTest);
};
-TEST_F(PluginServiceTest, SetGetChromePluginDataDir) {
- // Check that after setting the same plugin dir we just read it is set
- // correctly.
- FilePath plugin_data_dir = plugin_service_->GetChromePluginDataDir();
- FilePath new_plugin_data_dir(FILE_PATH_LITERAL("/a/bogus/dir"));
- plugin_service_->SetChromePluginDataDir(new_plugin_data_dir);
- EXPECT_EQ(new_plugin_data_dir, plugin_service_->GetChromePluginDataDir());
- plugin_service_->SetChromePluginDataDir(plugin_data_dir);
- EXPECT_EQ(plugin_data_dir, plugin_service_->GetChromePluginDataDir());
-}
-
TEST_F(PluginServiceTest, GetUILocale) {
// Check for a non-empty locale string.
EXPECT_NE("", plugin_service_->GetUILocale());
diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc
index 61822da..0a29798 100644
--- a/content/browser/renderer_host/render_message_filter.cc
+++ b/content/browser/renderer_host/render_message_filter.cc
@@ -15,7 +15,7 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/automation/automation_resource_message_filter.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/chrome_plugin_browsing_context.h"
+#include "chrome/browser/clipboard_dispatcher.h"
#include "chrome/browser/download/download_types.h"
#include "chrome/browser/extensions/extension_message_service.h"
#include "chrome/browser/metrics/histogram_synchronizer.h"
@@ -367,8 +367,6 @@ bool RenderMessageFilter::OnMessageReceived(const IPC::Message& message,
IPC_MESSAGE_HANDLER(ViewHostMsg_CheckNotificationPermission,
OnCheckNotificationPermission)
IPC_MESSAGE_HANDLER(ViewHostMsg_RevealFolderInOS, OnRevealFolderInOS)
- IPC_MESSAGE_HANDLER(ViewHostMsg_GetCPBrowsingContext,
- OnGetCPBrowsingContext)
IPC_MESSAGE_HANDLER(ViewHostMsg_AllocateSharedMemoryBuffer,
OnAllocateSharedMemoryBuffer)
IPC_MESSAGE_HANDLER(ViewHostMsg_ResourceTypeStats, OnResourceTypeStats)
@@ -773,13 +771,6 @@ void RenderMessageFilter::OnCheckNotificationPermission(
*result = notification_prefs_->HasPermission(source_url.GetOrigin());
}
-void RenderMessageFilter::OnGetCPBrowsingContext(uint32* context) {
- // Always allocate a new context when a plugin requests one, since it needs to
- // be unique for that plugin instance.
- *context = CPBrowsingContextManager::GetInstance()->Allocate(
- request_context_->GetURLRequestContext());
-}
-
void RenderMessageFilter::OnAllocateSharedMemoryBuffer(
uint32 buffer_size,
base::SharedMemoryHandle* handle) {
diff --git a/content/browser/renderer_host/render_message_filter.h b/content/browser/renderer_host/render_message_filter.h
index 2cb4547..2edcc53 100644
--- a/content/browser/renderer_host/render_message_filter.h
+++ b/content/browser/renderer_host/render_message_filter.h
@@ -186,9 +186,8 @@ class RenderMessageFilter : public BrowserMessageFilter,
#endif
void OnRevealFolderInOS(const FilePath& path);
- void OnGetCPBrowsingContext(uint32* context);
- // Used to ask the browser to allocate a block of shared memory for the
+// Used to ask the browser to allocate a block of shared memory for the
// renderer to send back data in, since shared memory can't be created
// in the renderer on POSIX due to the sandbox.
void OnAllocateSharedMemoryBuffer(uint32 buffer_size,
diff --git a/content/browser/renderer_host/render_view_host.cc b/content/browser/renderer_host/render_view_host.cc
index 07f2ceb..1ee71b1 100644
--- a/content/browser/renderer_host/render_view_host.cc
+++ b/content/browser/renderer_host/render_view_host.cc
@@ -589,15 +589,6 @@ void RenderViewHost::JavaScriptMessageBoxClosed(IPC::Message* reply_msg,
delegate_->RendererUnresponsive(this, is_waiting);
}
-void RenderViewHost::ModalHTMLDialogClosed(IPC::Message* reply_msg,
- const std::string& json_retval) {
- if (is_waiting_for_beforeunload_ack_ || is_waiting_for_unload_ack_)
- StartHangMonitorTimeout(TimeDelta::FromMilliseconds(kUnloadTimeoutMS));
-
- ViewHostMsg_ShowModalHTMLDialog::WriteReplyParams(reply_msg, json_retval);
- Send(reply_msg);
-}
-
void RenderViewHost::CopyImageAt(int x, int y) {
Send(new ViewMsg_CopyImageAt(routing_id(), x, y));
}
@@ -771,8 +762,6 @@ bool RenderViewHost::OnMessageReceived(const IPC::Message& msg) {
OnMsgRunJavaScriptMessage)
IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunBeforeUnloadConfirm,
OnMsgRunBeforeUnloadConfirm)
- IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_ShowModalHTMLDialog,
- OnMsgShowModalHTMLDialog)
IPC_MESSAGE_HANDLER(ViewHostMsg_StartDragging, OnMsgStartDragging)
IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateDragCursor, OnUpdateDragCursor)
IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus)
@@ -1236,13 +1225,6 @@ void RenderViewHost::OnMsgRunBeforeUnloadConfirm(const GURL& frame_url,
delegate_->RunBeforeUnloadConfirm(message, reply_msg);
}
-void RenderViewHost::OnMsgShowModalHTMLDialog(
- const GURL& url, int width, int height, const std::string& json_arguments,
- IPC::Message* reply_msg) {
- StopHangMonitorTimeout();
- delegate_->ShowModalHTMLDialog(url, width, height, json_arguments, reply_msg);
-}
-
void RenderViewHost::MediaPlayerActionAt(const gfx::Point& location,
const WebMediaPlayerAction& action) {
// TODO(ajwong): Which thread should run this? Does it matter?
diff --git a/content/browser/renderer_host/render_view_host.h b/content/browser/renderer_host/render_view_host.h
index bf36526..4c3f3f1 100644
--- a/content/browser/renderer_host/render_view_host.h
+++ b/content/browser/renderer_host/render_view_host.h
@@ -314,10 +314,6 @@ class RenderViewHost : public RenderWidgetHost {
bool success,
const std::wstring& prompt);
- // Notifies the RenderView that the modal html dialog has been closed.
- void ModalHTMLDialogClosed(IPC::Message* reply_msg,
- const std::string& json_retval);
-
// Send an action to the media player element located at |location|.
void MediaPlayerActionAt(const gfx::Point& location,
const WebKit::WebMediaPlayerAction& action);
@@ -605,9 +601,6 @@ class RenderViewHost : public RenderWidgetHost {
void OnMsgRunBeforeUnloadConfirm(const GURL& frame_url,
const std::wstring& message,
IPC::Message* reply_msg);
- void OnMsgShowModalHTMLDialog(const GURL& url, int width, int height,
- const std::string& json_arguments,
- IPC::Message* reply_msg);
void OnMsgStartDragging(const WebDropData& drop_data,
WebKit::WebDragOperationsMask operations_allowed,
const SkBitmap& image,
diff --git a/content/browser/renderer_host/render_view_host_delegate.h b/content/browser/renderer_host/render_view_host_delegate.h
index 888fecf..53fda27 100644
--- a/content/browser/renderer_host/render_view_host_delegate.h
+++ b/content/browser/renderer_host/render_view_host_delegate.h
@@ -518,10 +518,6 @@ class RenderViewHostDelegate : public IPC::Channel::Listener {
virtual void RunBeforeUnloadConfirm(const std::wstring& message,
IPC::Message* reply_msg) {}
- virtual void ShowModalHTMLDialog(const GURL& url, int width, int height,
- const std::string& json_arguments,
- IPC::Message* reply_msg) {}
-
// |url| is assigned to a server that can provide alternate error pages. If
// the returned URL is empty, the default error page built into WebKit will
// be used.
diff --git a/content/browser/renderer_host/resource_dispatcher_host.cc b/content/browser/renderer_host/resource_dispatcher_host.cc
index c8c50ee..44ad9d2 100644
--- a/content/browser/renderer_host/resource_dispatcher_host.cc
+++ b/content/browser/renderer_host/resource_dispatcher_host.cc
@@ -362,7 +362,7 @@ void ResourceDispatcherHost::BeginRequest(
int child_id = filter_->child_id();
ChromeURLRequestContext* context = filter_->GetURLRequestContext(
- request_data);
+ request_data.resource_type);
// Might need to resolve the blob references in the upload data.
if (request_data.upload_data && context) {
@@ -391,12 +391,6 @@ void ResourceDispatcherHost::BeginRequest(
return;
}
- // Ensure the Chrome plugins are loaded, as they may intercept network
- // requests. Does nothing if they are already loaded.
- // TODO(mpcomplete): This takes 200 ms! Investigate parallelizing this by
- // starting the load earlier in a BG thread.
- PluginService::GetInstance()->LoadChromePlugins(this);
-
// Construct the event handler.
scoped_refptr<ResourceHandler> handler;
if (sync_result) {
@@ -520,9 +514,7 @@ void ResourceDispatcherHost::BeginRequest(
upload_size,
false, // is download
ResourceType::IsFrame(request_data.resource_type), // allow_download
- request_data.has_user_gesture,
- request_data.host_renderer_id,
- request_data.host_render_view_id);
+ request_data.has_user_gesture);
SetRequestInfo(request, extra_info); // Request takes ownership.
chrome_browser_net::SetOriginPIDForRequest(
request_data.origin_pid, request);
@@ -649,9 +641,7 @@ ResourceDispatcherHost::CreateRequestInfoForBrowserRequest(
0, // upload_size
download, // is_download
download, // allow_download
- false, // has_user_gesture
- -1, // host renderer id
- -1); // host render view id
+ false); // has_user_gesture
}
void ResourceDispatcherHost::OnClosePageACK(
@@ -703,9 +693,6 @@ void ResourceDispatcherHost::BeginDownload(
NewRunnableFunction(&download_util::NotifyDownloadInitiated,
child_id, route_id));
- // Ensure the Chrome plugins are loaded, as they may intercept network
- // requests. Does nothing if they are already loaded.
- PluginService::GetInstance()->LoadChromePlugins(this);
net::URLRequest* request = new net::URLRequest(url, this);
request_id_--;
@@ -756,10 +743,6 @@ void ResourceDispatcherHost::BeginSaveFile(
if (is_shutdown_)
return;
- // Ensure the Chrome plugins are loaded, as they may intercept network
- // requests. Does nothing if they are already loaded.
- PluginService::GetInstance()->LoadChromePlugins(this);
-
scoped_refptr<ResourceHandler> handler(
new SaveFileResourceHandler(child_id,
route_id,
diff --git a/content/browser/renderer_host/resource_dispatcher_host_request_info.cc b/content/browser/renderer_host/resource_dispatcher_host_request_info.cc
index 14ff524..a88a13d 100644
--- a/content/browser/renderer_host/resource_dispatcher_host_request_info.cc
+++ b/content/browser/renderer_host/resource_dispatcher_host_request_info.cc
@@ -19,9 +19,7 @@ ResourceDispatcherHostRequestInfo::ResourceDispatcherHostRequestInfo(
uint64 upload_size,
bool is_download,
bool allow_download,
- bool has_user_gesture,
- int host_renderer_id,
- int host_render_view_id)
+ bool has_user_gesture)
: resource_handler_(handler),
cross_site_handler_(NULL),
process_type_(process_type),
@@ -42,9 +40,7 @@ ResourceDispatcherHostRequestInfo::ResourceDispatcherHostRequestInfo(
is_paused_(false),
called_on_response_started_(false),
has_started_reading_(false),
- paused_read_bytes_(0),
- host_renderer_id_(host_renderer_id),
- host_render_view_id_(host_render_view_id) {
+ paused_read_bytes_(0) {
}
ResourceDispatcherHostRequestInfo::~ResourceDispatcherHostRequestInfo() {
diff --git a/content/browser/renderer_host/resource_dispatcher_host_request_info.h b/content/browser/renderer_host/resource_dispatcher_host_request_info.h
index 13b6fa2..c89acdd 100644
--- a/content/browser/renderer_host/resource_dispatcher_host_request_info.h
+++ b/content/browser/renderer_host/resource_dispatcher_host_request_info.h
@@ -40,9 +40,7 @@ class ResourceDispatcherHostRequestInfo : public net::URLRequest::UserData {
uint64 upload_size,
bool is_download,
bool allow_download,
- bool has_user_gesture,
- int host_renderer_id,
- int host_render_view_id);
+ bool has_user_gesture);
virtual ~ResourceDispatcherHostRequestInfo();
// Top-level ResourceHandler servicing this request.
@@ -145,9 +143,6 @@ class ResourceDispatcherHostRequestInfo : public net::URLRequest::UserData {
int memory_cost() const { return memory_cost_; }
void set_memory_cost(int cost) { memory_cost_ = cost; }
- int host_renderer_id() const { return host_renderer_id_; }
- int host_render_view_id() const { return host_render_view_id_; }
-
// We hold a reference to the requested blob data to ensure it doesn't
// get finally released prior to the net::URLRequestJob being started.
webkit_blob::BlobData* requested_blob_data() const {
@@ -216,14 +211,6 @@ class ResourceDispatcherHostRequestInfo : public net::URLRequest::UserData {
bool has_started_reading_;
int paused_read_bytes_;
- // The following two members are specified if the request is initiated by
- // a plugin like Gears.
-
- // Contains the id of the host renderer.
- int host_renderer_id_;
- // Contains the id of the host render view.
- int host_render_view_id_;
-
DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostRequestInfo);
};
diff --git a/content/browser/renderer_host/resource_dispatcher_host_unittest.cc b/content/browser/renderer_host/resource_dispatcher_host_unittest.cc
index d3dc00e..e765536 100644
--- a/content/browser/renderer_host/resource_dispatcher_host_unittest.cc
+++ b/content/browser/renderer_host/resource_dispatcher_host_unittest.cc
@@ -7,7 +7,6 @@
#include "base/file_path.h"
#include "base/message_loop.h"
#include "base/process_util.h"
-#include "chrome/common/chrome_plugin_lib.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/render_messages_params.h"
#include "content/browser/browser_thread.h"
@@ -76,8 +75,6 @@ static ResourceHostMsg_Request CreateResourceRequest(
request.request_context = 0;
request.appcache_host_id = appcache::kNoHostId;
request.download_to_file = false;
- request.host_renderer_id = -1;
- request.host_render_view_id = -1;
return request;
}
@@ -193,10 +190,6 @@ class ResourceDispatcherHostTest : public testing::Test,
ChildProcessSecurityPolicy::GetInstance()->Remove(0);
- // The plugin lib is automatically loaded during these test
- // and we want a clean environment for other tests.
- ChromePluginLib::UnloadAllPlugins();
-
// Flush the message loop to make Purify happy.
message_loop_.RunAllPending();
}
diff --git a/content/browser/renderer_host/resource_message_filter.cc b/content/browser/renderer_host/resource_message_filter.cc
index 3988776..a4b4b8a 100644
--- a/content/browser/renderer_host/resource_message_filter.cc
+++ b/content/browser/renderer_host/resource_message_filter.cc
@@ -36,10 +36,10 @@ bool ResourceMessageFilter::OnMessageReceived(const IPC::Message& message,
}
ChromeURLRequestContext* ResourceMessageFilter::GetURLRequestContext(
- const ResourceHostMsg_Request& resource_request) {
+ ResourceType::Type type) {
net::URLRequestContext* rv = NULL;
if (url_request_context_override_.get())
- rv = url_request_context_override_->GetRequestContext(resource_request);
+ rv = url_request_context_override_->GetRequestContext(type);
if (!rv) {
URLRequestContextGetter* context_getter =
diff --git a/content/browser/renderer_host/resource_message_filter.h b/content/browser/renderer_host/resource_message_filter.h
index e3a6833..6fc8fe0 100644
--- a/content/browser/renderer_host/resource_message_filter.h
+++ b/content/browser/renderer_host/resource_message_filter.h
@@ -8,10 +8,10 @@
#include "base/scoped_ptr.h"
#include "content/browser/browser_message_filter.h"
#include "content/common/child_process_info.h"
+#include "webkit/glue/resource_type.h"
class ChromeURLRequestContext;
class ResourceDispatcherHost;
-struct ResourceHostMsg_Request;
namespace net {
class URLRequestContext;
@@ -31,7 +31,7 @@ class ResourceMessageFilter : public BrowserMessageFilter {
URLRequestContextOverride() {}
virtual net::URLRequestContext* GetRequestContext(
- const ResourceHostMsg_Request& resource_request) = 0;
+ ResourceType::Type request_type) = 0;
protected:
friend class base::RefCountedThreadSafe<URLRequestContextOverride>;
@@ -51,7 +51,7 @@ class ResourceMessageFilter : public BrowserMessageFilter {
// Returns the net::URLRequestContext for the given request.
ChromeURLRequestContext* GetURLRequestContext(
- const ResourceHostMsg_Request& resource_request);
+ ResourceType::Type request_type);
void set_url_request_context_override(URLRequestContextOverride* u) {
url_request_context_override_ = u;
diff --git a/content/browser/renderer_host/resource_queue_unittest.cc b/content/browser/renderer_host/resource_queue_unittest.cc
index ef6ed83..62d7b97 100644
--- a/content/browser/renderer_host/resource_queue_unittest.cc
+++ b/content/browser/renderer_host/resource_queue_unittest.cc
@@ -75,7 +75,7 @@ class DummyResourceHandler : public ResourceHandler {
ResourceDispatcherHostRequestInfo* GetRequestInfo(int request_id) {
return new ResourceDispatcherHostRequestInfo(
new DummyResourceHandler(), ChildProcessInfo::RENDER_PROCESS, 0, 0,
- request_id, ResourceType::MAIN_FRAME, 0, false, false, false, -1, -1);
+ request_id, ResourceType::MAIN_FRAME, 0, false, false, false);
}
void InitializeQueue(ResourceQueue* queue, ResourceQueueDelegate* delegate) {
diff --git a/content/browser/renderer_host/socket_stream_dispatcher_host.cc b/content/browser/renderer_host/socket_stream_dispatcher_host.cc
index ce6c855..c1e6ad4 100644
--- a/content/browser/renderer_host/socket_stream_dispatcher_host.cc
+++ b/content/browser/renderer_host/socket_stream_dispatcher_host.cc
@@ -7,7 +7,6 @@
#include "base/logging.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/net/url_request_context_getter.h"
-#include "chrome/common/render_messages_params.h"
#include "content/browser/renderer_host/socket_stream_host.h"
#include "content/common/socket_stream.h"
#include "content/common/socket_stream_messages.h"
@@ -151,12 +150,8 @@ void SocketStreamDispatcherHost::DeleteSocketStreamHost(int socket_id) {
net::URLRequestContext* SocketStreamDispatcherHost::GetURLRequestContext() {
net::URLRequestContext* rv = NULL;
if (url_request_context_override_.get()) {
- // TODO(jam): temporary code until Gears is taken out, then
- // GetRequestContext will take a different parameter and we can take out
- // this struct and the #include "chrome/common/render_messages_params.h"
- // above.
- ResourceHostMsg_Request request;
- rv = url_request_context_override_->GetRequestContext(request);
+ rv = url_request_context_override_->GetRequestContext(
+ ResourceType::SUB_RESOURCE);
}
if (!rv) {
URLRequestContextGetter* context_getter =
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index 2def379..220e769 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -75,7 +75,6 @@
#include "content/browser/child_process_security_policy.h"
#include "content/browser/host_zoom_map.h"
#include "content/browser/in_process_webkit/session_storage_namespace.h"
-#include "content/browser/modal_html_dialog_delegate.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
@@ -2458,17 +2457,6 @@ void TabContents::RunBeforeUnloadConfirm(const std::wstring& message,
RunBeforeUnloadDialog(this, message, reply_msg);
}
-void TabContents::ShowModalHTMLDialog(const GURL& url, int width, int height,
- const std::string& json_arguments,
- IPC::Message* reply_msg) {
- if (delegate()) {
- HtmlDialogUIDelegate* dialog_delegate =
- new ModalHtmlDialogDelegate(url, width, height, json_arguments,
- reply_msg, this);
- delegate()->ShowHtmlDialog(dialog_delegate, NULL);
- }
-}
-
GURL TabContents::GetAlternateErrorPageURL() const {
GURL url;
// Disable alternate error pages when in OffTheRecord/Incognito mode.
diff --git a/content/browser/tab_contents/tab_contents.h b/content/browser/tab_contents/tab_contents.h
index e751d6f..6bea156 100644
--- a/content/browser/tab_contents/tab_contents.h
+++ b/content/browser/tab_contents/tab_contents.h
@@ -955,9 +955,6 @@ class TabContents : public PageNavigator,
bool* did_suppress_message);
virtual void RunBeforeUnloadConfirm(const std::wstring& message,
IPC::Message* reply_msg);
- virtual void ShowModalHTMLDialog(const GURL& url, int width, int height,
- const std::string& json_arguments,
- IPC::Message* reply_msg);
virtual GURL GetAlternateErrorPageURL() const;
virtual RendererPreferences GetRendererPrefs(Profile* profile) const;
virtual WebPreferences GetWebkitPrefs();
diff --git a/content/browser/webui/web_ui_factory.cc b/content/browser/webui/web_ui_factory.cc
index 350d403..248de09 100644
--- a/content/browser/webui/web_ui_factory.cc
+++ b/content/browser/webui/web_ui_factory.cc
@@ -95,10 +95,6 @@ WebUI* NewWebUI<ExtensionWebUI>(TabContents* contents, const GURL& url) {
// when invoked for a particular tab - see NewWebUI<ExtensionWebUI>.
static WebUIFactoryFunction GetWebUIFactoryFunction(Profile* profile,
const GURL& url) {
- // Currently, any gears: URL means an HTML dialog.
- if (url.SchemeIs(chrome::kGearsScheme))
- return &NewWebUI<HtmlDialogUI>;
-
if (url.host() == chrome::kChromeUIDialogHost ||
url.host() == chrome::kChromeUICollectedCookiesHost) {
return &NewWebUI<ConstrainedHtmlUI>;
@@ -115,7 +111,7 @@ static WebUIFactoryFunction GetWebUIFactoryFunction(Profile* profile,
return &NewWebUI<ExternalHtmlDialogUI>;
// This will get called a lot to check all URLs, so do a quick check of other
- // schemes (gears was handled above) to filter out most URLs.
+ // schemes to filter out most URLs.
if (!url.SchemeIs(chrome::kChromeDevToolsScheme) &&
!url.SchemeIs(chrome::kChromeInternalScheme) &&
!url.SchemeIs(chrome::kChromeUIScheme))
diff --git a/content/browser/worker_host/worker_process_host.cc b/content/browser/worker_host/worker_process_host.cc
index 8e80144..76e48a2 100644
--- a/content/browser/worker_host/worker_process_host.cc
+++ b/content/browser/worker_host/worker_process_host.cc
@@ -39,6 +39,7 @@
#include "net/base/mime_util.h"
#include "ipc/ipc_switches.h"
#include "net/base/registry_controlled_domain.h"
+#include "webkit/glue/resource_type.h"
#include "webkit/fileapi/file_system_path_manager.h"
namespace {
@@ -55,7 +56,7 @@ class URLRequestContextOverride
virtual ~URLRequestContextOverride() {}
virtual net::URLRequestContext* GetRequestContext(
- const ResourceHostMsg_Request& resource_request) {
+ ResourceType::Type resource_type) {
return url_request_context_;
}
diff --git a/content/common/child_thread.cc b/content/common/child_thread.cc
index f2410e2..33c4496 100644
--- a/content/common/child_thread.cc
+++ b/content/common/child_thread.cc
@@ -119,11 +119,8 @@ IPC::Channel::Listener* ChildThread::ResolveRoute(int32 routing_id) {
}
webkit_glue::ResourceLoaderBridge* ChildThread::CreateBridge(
- const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info,
- int host_renderer_id,
- int host_render_view_id) {
- return resource_dispatcher()->
- CreateBridge(request_info, host_renderer_id, host_render_view_id);
+ const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) {
+ return resource_dispatcher()->CreateBridge(request_info);
}
ResourceDispatcher* ChildThread::resource_dispatcher() {
diff --git a/content/common/child_thread.h b/content/common/child_thread.h
index b4b07d3..33488fe 100644
--- a/content/common/child_thread.h
+++ b/content/common/child_thread.h
@@ -44,9 +44,7 @@ class ChildThread : public IPC::Channel::Listener,
// Creates a ResourceLoaderBridge.
// Tests can override this method if they want a custom loading behavior.
virtual webkit_glue::ResourceLoaderBridge* CreateBridge(
- const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info,
- int host_renderer_id,
- int host_render_view_id);
+ const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info);
ResourceDispatcher* resource_dispatcher();
diff --git a/content/common/resource_dispatcher.cc b/content/common/resource_dispatcher.cc
index d6c21c9..7542551 100644
--- a/content/common/resource_dispatcher.cc
+++ b/content/common/resource_dispatcher.cc
@@ -36,9 +36,7 @@ namespace webkit_glue {
class IPCResourceLoaderBridge : public ResourceLoaderBridge {
public:
IPCResourceLoaderBridge(ResourceDispatcher* dispatcher,
- const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info,
- int host_renderer_id,
- int host_render_view_id);
+ const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info);
virtual ~IPCResourceLoaderBridge();
// ResourceLoaderBridge
@@ -71,28 +69,15 @@ class IPCResourceLoaderBridge : public ResourceLoaderBridge {
// The routing id used when sending IPC messages.
int routing_id_;
-
- // The following two members are specified if the request is initiated by
- // a plugin like Gears.
-
- // Contains the id of the host renderer.
- int host_renderer_id_;
-
- // Contains the id of the host render view.
- int host_render_view_id_;
};
IPCResourceLoaderBridge::IPCResourceLoaderBridge(
ResourceDispatcher* dispatcher,
- const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info,
- int host_renderer_id,
- int host_render_view_id)
+ const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info)
: peer_(NULL),
dispatcher_(dispatcher),
request_id_(-1),
- routing_id_(request_info.routing_id),
- host_renderer_id_(host_renderer_id),
- host_render_view_id_(host_render_view_id) {
+ routing_id_(request_info.routing_id) {
DCHECK(dispatcher_) << "no resource dispatcher";
request_.method = request_info.method;
request_.url = request_info.url;
@@ -106,8 +91,6 @@ IPCResourceLoaderBridge::IPCResourceLoaderBridge(
request_.appcache_host_id = request_info.appcache_host_id;
request_.download_to_file = request_info.download_to_file;
request_.has_user_gesture = request_info.has_user_gesture;
- request_.host_renderer_id = host_renderer_id_;
- request_.host_render_view_id = host_render_view_id_;
}
IPCResourceLoaderBridge::~IPCResourceLoaderBridge() {
@@ -554,12 +537,8 @@ void ResourceDispatcher::FlushDeferredMessages(int request_id) {
}
webkit_glue::ResourceLoaderBridge* ResourceDispatcher::CreateBridge(
- const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info,
- int host_renderer_id,
- int host_render_view_id) {
- return new webkit_glue::IPCResourceLoaderBridge(this, request_info,
- host_renderer_id,
- host_render_view_id);
+ const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) {
+ return new webkit_glue::IPCResourceLoaderBridge(this, request_info);
}
bool ResourceDispatcher::IsResourceDispatcherMessage(
diff --git a/content/common/resource_dispatcher.h b/content/common/resource_dispatcher.h
index 754446d..4f5c215 100644
--- a/content/common/resource_dispatcher.h
+++ b/content/common/resource_dispatcher.h
@@ -53,9 +53,7 @@ class ResourceDispatcher : public IPC::Channel::Listener {
// this can be tested regardless of the ResourceLoaderBridge::Create
// implementation.
webkit_glue::ResourceLoaderBridge* CreateBridge(
- const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info,
- int host_renderer_id,
- int host_render_view_id);
+ const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info);
// Adds a request from the pending_requests_ list, returning the new
// requests' ID
diff --git a/content/common/resource_dispatcher_dummy.cc b/content/common/resource_dispatcher_dummy.cc
index e87101e..5998027 100644
--- a/content/common/resource_dispatcher_dummy.cc
+++ b/content/common/resource_dispatcher_dummy.cc
@@ -25,9 +25,7 @@ bool ResourceDispatcher::OnMessageReceived(const IPC::Message& message) {
}
webkit_glue::ResourceLoaderBridge* ResourceDispatcher::CreateBridge(
- const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info,
- int host_renderer_id,
- int host_render_view_id) {
+ const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) {
// This function is used only by plugin and renderer code, so it should
// never be called in a 64-bit Windows process.
NOTREACHED();
diff --git a/content/common/resource_dispatcher_unittest.cc b/content/common/resource_dispatcher_unittest.cc
index 9633cf0..659537e 100644
--- a/content/common/resource_dispatcher_unittest.cc
+++ b/content/common/resource_dispatcher_unittest.cc
@@ -160,7 +160,7 @@ class ResourceDispatcherTest : public testing::Test,
request_info.appcache_host_id = appcache::kNoHostId;
request_info.routing_id = 0;
- return dispatcher_->CreateBridge(request_info, -1, -1);
+ return dispatcher_->CreateBridge(request_info);
}
std::vector<IPC::Message> message_queue_;
diff --git a/content/common/resource_messages.h b/content/common/resource_messages.h
index 73b9f8a..f46abe0 100644
--- a/content/common/resource_messages.h
+++ b/content/common/resource_messages.h
@@ -95,15 +95,6 @@ IPC_STRUCT_BEGIN(ResourceHostMsg_Request)
// True if the request was user initiated.
IPC_STRUCT_MEMBER(bool, has_user_gesture)
-
- // The following two members are specified if the request is initiated by
- // a plugin like Gears.
-
- // Contains the id of the host renderer.
- IPC_STRUCT_MEMBER(int, host_renderer_id)
-
- // Contains the id of the host render view.
- IPC_STRUCT_MEMBER(int, host_render_view_id)
IPC_STRUCT_END()
// Resource messages sent from the browser to the renderer.
diff --git a/content/content_browser.gypi b/content/content_browser.gypi
index 133bea4..028573a 100644
--- a/content/content_browser.gypi
+++ b/content/content_browser.gypi
@@ -160,8 +160,6 @@
'browser/in_process_webkit/webkit_thread.h',
'browser/mime_registry_message_filter.cc',
'browser/mime_registry_message_filter.h',
- 'browser/modal_html_dialog_delegate.cc',
- 'browser/modal_html_dialog_delegate.h',
'browser/ppapi_plugin_process_host.cc',
'browser/ppapi_plugin_process_host.h',
'browser/plugin_process_host.cc',