diff options
63 files changed, 647 insertions, 611 deletions
diff --git a/chrome/renderer/DEPS b/chrome/renderer/DEPS index 442faf5..2d1ca62 100644 --- a/chrome/renderer/DEPS +++ b/chrome/renderer/DEPS @@ -3,7 +3,6 @@ include_rules = [ "+content/public/renderer", # DO NOT ADD ANY content/renderer includes, we're working on removing these! "+content/renderer/mock_render_process.h", - "+content/renderer/render_view.h", "+content/renderer/render_widget_browsertest.h", "+grit", # For generated headers "+media/base", # For initializing media library and media switches. diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc index af2b36c..561574d 100644 --- a/chrome/renderer/chrome_content_renderer_client.cc +++ b/chrome/renderer/chrome_content_renderer_client.cc @@ -63,7 +63,7 @@ #include "grit/generated_resources.h" #include "grit/locale_settings.h" #include "grit/renderer_resources.h" -#include "ipc/ipc_sync_message.h" +#include "ipc/ipc_sync_channel.h" #include "net/base/net_errors.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" diff --git a/chrome/renderer/chrome_render_view_observer.cc b/chrome/renderer/chrome_render_view_observer.cc index b522c63..ec5b610 100644 --- a/chrome/renderer/chrome_render_view_observer.cc +++ b/chrome/renderer/chrome_render_view_observer.cc @@ -27,6 +27,7 @@ #include "chrome/renderer/translate_helper.h" #include "content/common/bindings_policy.h" #include "content/common/view_messages.h" +#include "content/public/renderer/render_view.h" #include "content/public/renderer/content_renderer_client.h" #include "net/base/data_url.h" #include "skia/ext/image_operations.h" diff --git a/chrome/renderer/chrome_render_view_observer.h b/chrome/renderer/chrome_render_view_observer.h index 60afcfe..a8d08f9 100644 --- a/chrome/renderer/chrome_render_view_observer.h +++ b/chrome/renderer/chrome_render_view_observer.h @@ -13,7 +13,6 @@ #include "base/memory/scoped_ptr.h" #include "base/task.h" #include "content/public/renderer/render_view_observer.h" -#include "content/renderer/render_view.h" #include "googleurl/src/gurl.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPermissionClient.h" @@ -28,6 +27,9 @@ class TranslateHelper; struct ThumbnailScore; struct ViewMsg_Navigate_Params; +namespace WebKit { +class WebView; +} namespace safe_browsing { class PhishingClassifierDelegate; } diff --git a/chrome/renderer/content_settings_observer_browsertest.cc b/chrome/renderer/content_settings_observer_browsertest.cc index 64977ae..0dd54b4 100644 --- a/chrome/renderer/content_settings_observer_browsertest.cc +++ b/chrome/renderer/content_settings_observer_browsertest.cc @@ -19,7 +19,7 @@ namespace { class MockContentSettingsObserver : public ContentSettingsObserver { public: - explicit MockContentSettingsObserver(RenderView* render_view); + explicit MockContentSettingsObserver(content::RenderView* render_view); virtual bool Send(IPC::Message* message); @@ -31,7 +31,7 @@ class MockContentSettingsObserver : public ContentSettingsObserver { }; MockContentSettingsObserver::MockContentSettingsObserver( - RenderView* render_view) + content::RenderView* render_view) : ContentSettingsObserver(render_view) { } diff --git a/chrome/renderer/safe_browsing/phishing_classifier_delegate_browsertest.cc b/chrome/renderer/safe_browsing/phishing_classifier_delegate_browsertest.cc index cdadbfc..22da921 100644 --- a/chrome/renderer/safe_browsing/phishing_classifier_delegate_browsertest.cc +++ b/chrome/renderer/safe_browsing/phishing_classifier_delegate_browsertest.cc @@ -14,7 +14,7 @@ #include "chrome/renderer/safe_browsing/features.h" #include "chrome/renderer/safe_browsing/phishing_classifier.h" #include "chrome/renderer/safe_browsing/scorer.h" -#include "content/renderer/render_view.h" +#include "content/public/renderer/render_view.h" #include "content/test/render_view_fake_resources_test.h" #include "googleurl/src/gurl.h" #include "testing/gmock/include/gmock/gmock.h" @@ -35,7 +35,7 @@ namespace safe_browsing { namespace { class MockPhishingClassifier : public PhishingClassifier { public: - explicit MockPhishingClassifier(RenderView* render_view) + explicit MockPhishingClassifier(content::RenderView* render_view) : PhishingClassifier(render_view, NULL /* clock */) {} virtual ~MockPhishingClassifier() {} @@ -101,9 +101,9 @@ class PhishingClassifierDelegateTest : public RenderViewFakeResourcesTest { TEST_F(PhishingClassifierDelegateTest, Navigation) { MockPhishingClassifier* classifier = - new StrictMock<MockPhishingClassifier>(view_); + new StrictMock<MockPhishingClassifier>(view()); PhishingClassifierDelegate* delegate = - PhishingClassifierDelegate::Create(view_, classifier); + PhishingClassifierDelegate::Create(view(), classifier); MockScorer scorer; delegate->SetPhishingScorer(&scorer); ASSERT_TRUE(classifier->is_ready()); @@ -228,9 +228,9 @@ TEST_F(PhishingClassifierDelegateTest, Navigation) { TEST_F(PhishingClassifierDelegateTest, NoScorer) { // For this test, we'll create the delegate with no scorer available yet. MockPhishingClassifier* classifier = - new StrictMock<MockPhishingClassifier>(view_); + new StrictMock<MockPhishingClassifier>(view()); PhishingClassifierDelegate* delegate = - PhishingClassifierDelegate::Create(view_, classifier); + PhishingClassifierDelegate::Create(view(), classifier); ASSERT_FALSE(classifier->is_ready()); // Queue up a pending classification, cancel it, then queue up another one. @@ -267,9 +267,9 @@ TEST_F(PhishingClassifierDelegateTest, NoScorer_Ref) { // Similar to the last test, but navigates within the page before // setting the scorer. MockPhishingClassifier* classifier = - new StrictMock<MockPhishingClassifier>(view_); + new StrictMock<MockPhishingClassifier>(view()); PhishingClassifierDelegate* delegate = - PhishingClassifierDelegate::Create(view_, classifier); + PhishingClassifierDelegate::Create(view(), classifier); ASSERT_FALSE(classifier->is_ready()); // Queue up a pending classification, cancel it, then queue up another one. @@ -300,9 +300,9 @@ TEST_F(PhishingClassifierDelegateTest, NoStartPhishingDetection) { // Tests the behavior when OnStartPhishingDetection has not yet been called // when the page load finishes. MockPhishingClassifier* classifier = - new StrictMock<MockPhishingClassifier>(view_); + new StrictMock<MockPhishingClassifier>(view()); PhishingClassifierDelegate* delegate = - PhishingClassifierDelegate::Create(view_, classifier); + PhishingClassifierDelegate::Create(view(), classifier); MockScorer scorer; delegate->SetPhishingScorer(&scorer); ASSERT_TRUE(classifier->is_ready()); @@ -374,9 +374,9 @@ TEST_F(PhishingClassifierDelegateTest, NoStartPhishingDetection) { TEST_F(PhishingClassifierDelegateTest, IgnorePreliminaryCapture) { // Tests that preliminary PageCaptured notifications are ignored. MockPhishingClassifier* classifier = - new StrictMock<MockPhishingClassifier>(view_); + new StrictMock<MockPhishingClassifier>(view()); PhishingClassifierDelegate* delegate = - PhishingClassifierDelegate::Create(view_, classifier); + PhishingClassifierDelegate::Create(view(), classifier); MockScorer scorer; delegate->SetPhishingScorer(&scorer); ASSERT_TRUE(classifier->is_ready()); @@ -408,9 +408,9 @@ TEST_F(PhishingClassifierDelegateTest, DuplicatePageCapture) { // Tests that a second PageCaptured notification causes classification to // be cancelled. MockPhishingClassifier* classifier = - new StrictMock<MockPhishingClassifier>(view_); + new StrictMock<MockPhishingClassifier>(view()); PhishingClassifierDelegate* delegate = - PhishingClassifierDelegate::Create(view_, classifier); + PhishingClassifierDelegate::Create(view(), classifier); MockScorer scorer; delegate->SetPhishingScorer(&scorer); ASSERT_TRUE(classifier->is_ready()); @@ -443,9 +443,9 @@ TEST_F(PhishingClassifierDelegateTest, PhishingDetectionDone) { // Tests that a PhishingDetectionDone IPC is sent to the browser // whenever we finish classification. MockPhishingClassifier* classifier = - new StrictMock<MockPhishingClassifier>(view_); + new StrictMock<MockPhishingClassifier>(view()); PhishingClassifierDelegate* delegate = - PhishingClassifierDelegate::Create(view_, classifier); + PhishingClassifierDelegate::Create(view(), classifier); MockScorer scorer; delegate->SetPhishingScorer(&scorer); ASSERT_TRUE(classifier->is_ready()); diff --git a/chrome/renderer/translate_helper_browsertest.cc b/chrome/renderer/translate_helper_browsertest.cc index 3a5b957..20434a9 100644 --- a/chrome/renderer/translate_helper_browsertest.cc +++ b/chrome/renderer/translate_helper_browsertest.cc @@ -14,7 +14,7 @@ using testing::Return; class TestTranslateHelper : public TranslateHelper { public: - explicit TestTranslateHelper(RenderView* render_view) + explicit TestTranslateHelper(content::RenderView* render_view) : TranslateHelper(render_view, NULL) { } diff --git a/chrome/test/base/render_view_test.cc b/chrome/test/base/render_view_test.cc index 9cda3c7..d4e7c750 100644 --- a/chrome/test/base/render_view_test.cc +++ b/chrome/test/base/render_view_test.cc @@ -127,14 +127,14 @@ void RenderViewTest::SetUp() { render_thread_.set_routing_id(kRouteId); // This needs to pass the mock render thread to the view. - view_ = RenderView::Create(0, - kOpenerId, - RendererPreferences(), - WebPreferences(), - new SharedRenderViewCounter(0), - kRouteId, - kInvalidSessionStorageNamespaceId, - string16()); + view_ = RenderViewImpl::Create(0, + kOpenerId, + RendererPreferences(), + WebPreferences(), + new SharedRenderViewCounter(0), + kRouteId, + kInvalidSessionStorageNamespaceId, + string16()); // Attach a pseudo keyboard device to this object. mock_keyboard_.reset(new MockKeyboard()); diff --git a/chrome/test/base/render_view_test.h b/chrome/test/base/render_view_test.h index 50a3564..96081c4 100644 --- a/chrome/test/base/render_view_test.h +++ b/chrome/test/base/render_view_test.h @@ -17,7 +17,7 @@ #include "content/common/main_function_params.h" #include "content/common/native_web_keyboard_event.h" #include "content/common/sandbox_init_wrapper.h" -#include "content/renderer/render_view.h" +#include "content/renderer/render_view_impl.h" #include "content/renderer/renderer_webkitplatformsupport_impl.h" #include "chrome/renderer/chrome_content_renderer_client.h" #include "testing/gtest/include/gtest/gtest.h" @@ -31,6 +31,7 @@ class PasswordAutofillManager; class ExtensionDispatcher; class MockRenderProcess; class RendererMainPlatformDelegate; +class RenderViewImpl; class RenderViewTest : public testing::Test { public: @@ -98,7 +99,7 @@ class RenderViewTest : public testing::Test { ExtensionDispatcher* extension_dispatcher_; MockRenderThread render_thread_; scoped_ptr<MockRenderProcess> mock_process_; - scoped_refptr<RenderView> view_; + scoped_refptr<RenderViewImpl> view_; RendererWebKitPlatformSupportImplNoSandbox webkit_platform_support_; scoped_ptr<MockKeyboard> mock_keyboard_; diff --git a/content/content_renderer.gypi b/content/content_renderer.gypi index d77fdae..5747a11 100644 --- a/content/content_renderer.gypi +++ b/content/content_renderer.gypi @@ -118,8 +118,8 @@ 'renderer/render_process_impl.h', 'renderer/render_thread_impl.cc', 'renderer/render_thread_impl.h', - 'renderer/render_view.cc', - 'renderer/render_view.h', + 'renderer/render_view_impl.cc', + 'renderer/render_view_impl.h', 'renderer/render_view_linux.cc', 'renderer/render_view_selection.cc', 'renderer/render_view_selection.h', diff --git a/content/public/renderer/DEPS b/content/public/renderer/DEPS index d472a18..c4098ab 100644 --- a/content/public/renderer/DEPS +++ b/content/public/renderer/DEPS @@ -1,4 +1,4 @@ include_rules = [ - "+content/renderer/render_view.h", + "+content/renderer/render_view_impl.h", "+v8/include/v8.h", ] diff --git a/content/public/renderer/render_view_observer.cc b/content/public/renderer/render_view_observer.cc index 980985c..371f7ff 100644 --- a/content/public/renderer/render_view_observer.cc +++ b/content/public/renderer/render_view_observer.cc @@ -4,30 +4,28 @@ #include "content/public/renderer/render_view_observer.h" -#include "content/renderer/render_view.h" +#include "content/renderer/render_view_impl.h" using WebKit::WebFrame; -// TODO(jam): temporary until RenderView is renamed to RenderViewImpl since -// trying ::RenderView* below gives compile errors in gcc. -typedef RenderView RenderViewImpl; - namespace content { RenderViewObserver::RenderViewObserver(RenderView* render_view) - : render_view_(NULL), + : render_view_(render_view), routing_id_(MSG_ROUTING_NONE) { // |render_view| can be NULL on unit testing. if (render_view) { - render_view_ = static_cast<RenderViewImpl*>(render_view); - routing_id_ = render_view_->routing_id(); - render_view_->AddObserver(this); + RenderViewImpl* impl = static_cast<RenderViewImpl*>(render_view); + routing_id_ = impl->routing_id(); + impl->AddObserver(this); } } RenderViewObserver::~RenderViewObserver() { - if (render_view_) - render_view_->RemoveObserver(this); + if (render_view_) { + RenderViewImpl* impl = static_cast<RenderViewImpl*>(render_view_); + impl->RemoveObserver(this); + } } void RenderViewObserver::OnDestruct() { @@ -50,8 +48,8 @@ RenderView* RenderViewObserver::render_view() { return render_view_; } -void RenderViewObserver::set_render_view(::RenderView* rv) { - render_view_ = rv; +void RenderViewObserver::RenderViewGone() { + render_view_ = NULL; } } // namespace content diff --git a/content/public/renderer/render_view_observer.h b/content/public/renderer/render_view_observer.h index e6608a4..89ae86e 100644 --- a/content/public/renderer/render_view_observer.h +++ b/content/public/renderer/render_view_observer.h @@ -79,13 +79,17 @@ class CONTENT_EXPORT RenderViewObserver : public IPC::Channel::Listener, virtual void ContextMenuAction(unsigned id) {} virtual void Navigate(const GURL& url) {} + // IPC::Channel::Listener implementation. + virtual bool OnMessageReceived(const IPC::Message& message); + + // This is called by the RenderView when it's going away so that this object + // can null out its pointer. + void RenderViewGone(); + protected: explicit RenderViewObserver(RenderView* render_view); virtual ~RenderViewObserver(); - // IPC::Channel::Listener implementation. - virtual bool OnMessageReceived(const IPC::Message& message); - // IPC::Message::Sender implementation. virtual bool Send(IPC::Message* message); @@ -93,11 +97,8 @@ class CONTENT_EXPORT RenderViewObserver : public IPC::Channel::Listener, int routing_id() { return routing_id_; } private: - friend class ::RenderView; - - void set_render_view(::RenderView* rv); - ::RenderView* render_view_; + RenderView* render_view_; // The routing ID of the associated RenderView. int routing_id_; diff --git a/content/renderer/device_orientation_dispatcher.cc b/content/renderer/device_orientation_dispatcher.cc index 5a70eca..df80f06 100644 --- a/content/renderer/device_orientation_dispatcher.cc +++ b/content/renderer/device_orientation_dispatcher.cc @@ -5,12 +5,12 @@ #include "content/renderer/device_orientation_dispatcher.h" #include "content/common/device_orientation_messages.h" -#include "content/renderer/render_view.h" +#include "content/renderer/render_view_impl.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDeviceOrientation.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDeviceOrientationController.h" DeviceOrientationDispatcher::DeviceOrientationDispatcher( - RenderView* render_view) + RenderViewImpl* render_view) : content::RenderViewObserver(render_view), controller_(NULL), started_(false) { diff --git a/content/renderer/device_orientation_dispatcher.h b/content/renderer/device_orientation_dispatcher.h index 4dd783c..f4521c5 100644 --- a/content/renderer/device_orientation_dispatcher.h +++ b/content/renderer/device_orientation_dispatcher.h @@ -10,6 +10,8 @@ #include "base/memory/scoped_ptr.h" #include "content/public/renderer/render_view_observer.h" +class RenderViewImpl; + namespace WebKit { class WebDeviceOrientation; } @@ -19,7 +21,7 @@ struct DeviceOrientationMsg_Updated_Params; class DeviceOrientationDispatcher : public content::RenderViewObserver, public WebKit::WebDeviceOrientationClient { public: - explicit DeviceOrientationDispatcher(RenderView* render_view); + explicit DeviceOrientationDispatcher(RenderViewImpl* render_view); virtual ~DeviceOrientationDispatcher(); private: diff --git a/content/renderer/devtools_agent.cc b/content/renderer/devtools_agent.cc index 0f8f56f..d7f6a63 100644 --- a/content/renderer/devtools_agent.cc +++ b/content/renderer/devtools_agent.cc @@ -15,7 +15,7 @@ #include "content/renderer/devtools_client.h" #include "content/common/devtools_messages.h" #include "content/common/view_messages.h" -#include "content/renderer/render_view.h" +#include "content/renderer/render_view_impl.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgent.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" @@ -56,7 +56,7 @@ class WebKitClientMessageLoopImpl // static std::map<int, DevToolsAgent*> DevToolsAgent::agent_for_routing_id_; -DevToolsAgent::DevToolsAgent(RenderView* render_view) +DevToolsAgent::DevToolsAgent(RenderViewImpl* render_view) : content::RenderViewObserver(render_view), is_attached_(false) { agent_for_routing_id_[routing_id()] = this; @@ -196,7 +196,7 @@ void DevToolsAgent::OnNavigate() { } void DevToolsAgent::OnSetupDevToolsClient() { - new DevToolsClient(static_cast<RenderView*>(render_view())); + new DevToolsClient(static_cast<RenderViewImpl*>(render_view())); } WebDevToolsAgent* DevToolsAgent::GetWebAgent() { diff --git a/content/renderer/devtools_agent.h b/content/renderer/devtools_agent.h index a527569..cafe707 100644 --- a/content/renderer/devtools_agent.h +++ b/content/renderer/devtools_agent.h @@ -13,12 +13,13 @@ #include "content/public/renderer/render_view_observer.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgentClient.h" +class RenderViewImpl; +struct DevToolsMessageData; + namespace WebKit { class WebDevToolsAgent; } -struct DevToolsMessageData; - typedef std::map<std::string, std::string> DevToolsRuntimeProperties; // DevToolsAgent belongs to the inspectable RenderView and provides Glue's @@ -28,7 +29,7 @@ typedef std::map<std::string, std::string> DevToolsRuntimeProperties; class DevToolsAgent : public content::RenderViewObserver, public WebKit::WebDevToolsAgentClient { public: - explicit DevToolsAgent(RenderView* render_view); + explicit DevToolsAgent(RenderViewImpl* render_view); virtual ~DevToolsAgent(); // Returns agent instance for its host id. diff --git a/content/renderer/devtools_agent_filter.cc b/content/renderer/devtools_agent_filter.cc index 4890a36..281ddf2 100644 --- a/content/renderer/devtools_agent_filter.cc +++ b/content/renderer/devtools_agent_filter.cc @@ -8,7 +8,6 @@ #include "content/common/devtools_messages.h" #include "content/renderer/devtools_agent.h" #include "content/renderer/plugin_channel_host.h" -#include "content/renderer/render_view.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgent.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" diff --git a/content/renderer/devtools_client.cc b/content/renderer/devtools_client.cc index 4d9c958..5d8c5af 100644 --- a/content/renderer/devtools_client.cc +++ b/content/renderer/devtools_client.cc @@ -10,7 +10,7 @@ #include "content/common/content_switches.h" #include "content/common/devtools_messages.h" #include "content/renderer/render_thread_impl.h" -#include "content/renderer/render_view.h" +#include "content/renderer/render_view_impl.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsFrontend.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" #include "ui/base/ui_base_switches.h" @@ -18,7 +18,7 @@ using WebKit::WebDevToolsFrontend; using WebKit::WebString; -DevToolsClient::DevToolsClient(RenderView* render_view) +DevToolsClient::DevToolsClient(RenderViewImpl* render_view) : content::RenderViewObserver(render_view) { const CommandLine& command_line = *CommandLine::ForCurrentProcess(); web_tools_frontend_.reset( diff --git a/content/renderer/devtools_client.h b/content/renderer/devtools_client.h index f9c2da2..7de4ea9 100644 --- a/content/renderer/devtools_client.h +++ b/content/renderer/devtools_client.h @@ -14,6 +14,7 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsFrontendClient.h" class MessageLoop; +class RenderViewImpl; namespace WebKit { class WebDevToolsFrontend; @@ -31,7 +32,7 @@ struct DevToolsMessageData; class DevToolsClient : public content::RenderViewObserver, public WebKit::WebDevToolsFrontendClient { public: - explicit DevToolsClient(RenderView* render_view); + explicit DevToolsClient(RenderViewImpl* render_view); virtual ~DevToolsClient(); private: diff --git a/content/renderer/external_popup_menu.cc b/content/renderer/external_popup_menu.cc index 0fced1e..f2deacc 100644 --- a/content/renderer/external_popup_menu.cc +++ b/content/renderer/external_popup_menu.cc @@ -5,12 +5,12 @@ #include "content/renderer/external_popup_menu.h" #include "content/common/view_messages.h" -#include "content/renderer/render_view.h" +#include "content/renderer/render_view_impl.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebExternalPopupMenuClient.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h" ExternalPopupMenu::ExternalPopupMenu( - RenderView* render_view, + RenderViewImpl* render_view, const WebKit::WebPopupMenuInfo& popup_menu_info, WebKit::WebExternalPopupMenuClient* popup_menu_client) : render_view_(render_view), diff --git a/content/renderer/external_popup_menu.h b/content/renderer/external_popup_menu.h index b3eebe8..bdc9aae 100644 --- a/content/renderer/external_popup_menu.h +++ b/content/renderer/external_popup_menu.h @@ -9,14 +9,14 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebExternalPopupMenu.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenuInfo.h" -class RenderView; +class RenderViewImpl; namespace WebKit { class WebExternalPopupMenuClient; } class ExternalPopupMenu : public WebKit::WebExternalPopupMenu { public: - ExternalPopupMenu(RenderView* render_view, + ExternalPopupMenu(RenderViewImpl* render_view, const WebKit::WebPopupMenuInfo& popup_menu_info, WebKit::WebExternalPopupMenuClient* popup_menu_client); @@ -31,7 +31,7 @@ class ExternalPopupMenu : public WebKit::WebExternalPopupMenu { virtual void close(); private: - RenderView* render_view_; + RenderViewImpl* render_view_; WebKit::WebPopupMenuInfo popup_menu_info_; WebKit::WebExternalPopupMenuClient* popup_menu_client_; diff --git a/content/renderer/geolocation_dispatcher.cc b/content/renderer/geolocation_dispatcher.cc index 05a9e25..7a5eb65 100644 --- a/content/renderer/geolocation_dispatcher.cc +++ b/content/renderer/geolocation_dispatcher.cc @@ -5,7 +5,7 @@ #include "content/renderer/geolocation_dispatcher.h" #include "content/common/geolocation_messages.h" -#include "content/renderer/render_view.h" +#include "content/renderer/render_view_impl.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationPermissionRequest.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationPermissionRequestManager.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationClient.h" @@ -20,7 +20,7 @@ using WebKit::WebGeolocationPermissionRequest; using WebKit::WebGeolocationPermissionRequestManager; using WebKit::WebGeolocationPosition; -GeolocationDispatcher::GeolocationDispatcher(RenderView* render_view) +GeolocationDispatcher::GeolocationDispatcher(RenderViewImpl* render_view) : content::RenderViewObserver(render_view), pending_permissions_(new WebGeolocationPermissionRequestManager()), enable_high_accuracy_(false), diff --git a/content/renderer/geolocation_dispatcher.h b/content/renderer/geolocation_dispatcher.h index 4ca8570..10e06de9 100644 --- a/content/renderer/geolocation_dispatcher.h +++ b/content/renderer/geolocation_dispatcher.h @@ -11,6 +11,7 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationClient.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationController.h" +class RenderViewImpl; struct Geoposition; namespace WebKit { @@ -27,7 +28,7 @@ class WebSecurityOrigin; class GeolocationDispatcher : public content::RenderViewObserver, public WebKit::WebGeolocationClient { public: - explicit GeolocationDispatcher(RenderView* render_view); + explicit GeolocationDispatcher(RenderViewImpl* render_view); virtual ~GeolocationDispatcher(); private: diff --git a/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc b/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc index 29a368a..4def872 100644 --- a/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc +++ b/content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc @@ -26,7 +26,7 @@ #include "content/common/content_switches.h" #include "content/renderer/gpu/gpu_channel_host.h" #include "content/renderer/render_thread_impl.h" -#include "content/renderer/render_view.h" +#include "content/renderer/render_view_impl.h" #include "gpu/command_buffer/client/gles2_implementation.h" #include "gpu/command_buffer/common/constants.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" @@ -97,7 +97,7 @@ bool WebGraphicsContext3DCommandBufferImpl::initialize( attributes_ = attributes; render_directly_to_web_view_ = render_directly_to_web_view; if (render_directly_to_web_view_) { - RenderView* render_view = RenderView::FromWebView(web_view); + RenderViewImpl* render_view = RenderViewImpl::FromWebView(web_view); if (!render_view) return false; render_view_routing_id_ = render_view->routing_id(); @@ -241,8 +241,8 @@ WebGLId WebGraphicsContext3DCommandBufferImpl::getPlatformTextureId() { void WebGraphicsContext3DCommandBufferImpl::prepareTexture() { // Copies the contents of the off-screen render target into the texture // used by the compositor. - RenderView* renderview = - web_view_ ? RenderView::FromWebView(web_view_) : NULL; + RenderViewImpl* renderview = + web_view_ ? RenderViewImpl::FromWebView(web_view_) : NULL; if (renderview) renderview->OnViewContextSwapBuffersPosted(); context_->SwapBuffers(); @@ -1024,8 +1024,8 @@ void WebGraphicsContext3DCommandBufferImpl::deleteTexture(WebGLId texture) { void WebGraphicsContext3DCommandBufferImpl::OnSwapBuffersComplete() { // This may be called after tear-down of the RenderView. - RenderView* renderview = - web_view_ ? RenderView::FromWebView(web_view_) : NULL; + RenderViewImpl* renderview = + web_view_ ? RenderViewImpl::FromWebView(web_view_) : NULL; if (renderview) renderview->OnViewContextSwapBuffersComplete(); @@ -1083,8 +1083,8 @@ void WebGraphicsContext3DCommandBufferImpl::OnContextLost( if (context_lost_callback_) { context_lost_callback_->onContextLost(); } - RenderView* renderview = - web_view_ ? RenderView::FromWebView(web_view_) : NULL; + RenderViewImpl* renderview = + web_view_ ? RenderViewImpl::FromWebView(web_view_) : NULL; if (renderview) renderview->OnViewContextSwapBuffersAborted(); } diff --git a/content/renderer/indexed_db_dispatcher.cc b/content/renderer/indexed_db_dispatcher.cc index ee68cdc..40db683 100644 --- a/content/renderer/indexed_db_dispatcher.cc +++ b/content/renderer/indexed_db_dispatcher.cc @@ -6,7 +6,7 @@ #include "content/common/indexed_db_messages.h" #include "content/renderer/render_thread_impl.h" -#include "content/renderer/render_view.h" +#include "content/renderer/render_view_impl.h" #include "content/renderer/renderer_webidbcursor_impl.h" #include "content/renderer/renderer_webidbdatabase_impl.h" #include "content/renderer/renderer_webidbindex_impl.h" @@ -113,7 +113,7 @@ void IndexedDBDispatcher::RequestIDBFactoryOpen( if (!web_frame) return; // We must be shutting down. - RenderView* render_view = RenderView::FromWebView(web_frame->view()); + RenderViewImpl* render_view = RenderViewImpl::FromWebView(web_frame->view()); if (!render_view) return; // We must be shutting down. @@ -133,7 +133,7 @@ void IndexedDBDispatcher::RequestIDBFactoryGetDatabaseNames( if (!web_frame) return; // We must be shutting down. - RenderView* render_view = RenderView::FromWebView(web_frame->view()); + RenderViewImpl* render_view = RenderViewImpl::FromWebView(web_frame->view()); if (!render_view) return; // We must be shutting down. @@ -154,7 +154,7 @@ void IndexedDBDispatcher::RequestIDBFactoryDeleteDatabase( if (!web_frame) return; // We must be shutting down. - RenderView* render_view = RenderView::FromWebView(web_frame->view()); + RenderViewImpl* render_view = RenderViewImpl::FromWebView(web_frame->view()); if (!render_view) return; // We must be shutting down. diff --git a/content/renderer/intents_dispatcher.cc b/content/renderer/intents_dispatcher.cc index 2223109..a2f56d90 100644 --- a/content/renderer/intents_dispatcher.cc +++ b/content/renderer/intents_dispatcher.cc @@ -5,7 +5,7 @@ #include "content/renderer/intents_dispatcher.h" #include "content/common/intents_messages.h" -#include "content/renderer/render_view.h" +#include "content/renderer/render_view_impl.h" #include "ipc/ipc_message.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebCString.h" @@ -119,7 +119,7 @@ class IntentsDispatcher::BoundDeliveredIntent : public CppBoundClass { IntentsDispatcher* parent_; }; -IntentsDispatcher::IntentsDispatcher(RenderView* render_view) +IntentsDispatcher::IntentsDispatcher(RenderViewImpl* render_view) : content::RenderViewObserver(render_view), intent_id_(0) { } diff --git a/content/renderer/intents_dispatcher.h b/content/renderer/intents_dispatcher.h index f890706..f49e897 100644 --- a/content/renderer/intents_dispatcher.h +++ b/content/renderer/intents_dispatcher.h @@ -12,21 +12,23 @@ #include "webkit/glue/web_intent_data.h" #include "webkit/glue/web_intent_reply_data.h" -namespace webkit_glue { -struct WebIntentData; -} +class RenderViewImpl; namespace WebKit { class WebFrame; } +namespace webkit_glue { +struct WebIntentData; +} + // IntentsDispatcher is a delegate for Web Intents messages. It is the // renderer-side handler for IPC messages delivering the intent payload data // and preparing it for access by the service page. class IntentsDispatcher : public content::RenderViewObserver { public: // |render_view| must not be NULL. - explicit IntentsDispatcher(RenderView* render_view); + explicit IntentsDispatcher(RenderViewImpl* render_view); virtual ~IntentsDispatcher(); // Called by the bound intent object to register the result from the service diff --git a/content/renderer/load_progress_tracker.cc b/content/renderer/load_progress_tracker.cc index 4029db7..c4ceb5e 100644 --- a/content/renderer/load_progress_tracker.cc +++ b/content/renderer/load_progress_tracker.cc @@ -6,7 +6,7 @@ #include "base/message_loop.h" #include "content/common/view_messages.h" -#include "content/renderer/render_view.h" +#include "content/renderer/render_view_impl.h" namespace { @@ -14,7 +14,7 @@ const int kMinimumDelayBetweenUpdatesMS = 100; } -LoadProgressTracker::LoadProgressTracker(RenderView* render_view) +LoadProgressTracker::LoadProgressTracker(RenderViewImpl* render_view) : render_view_(render_view), tracked_frame_(NULL), progress_(0.0), diff --git a/content/renderer/load_progress_tracker.h b/content/renderer/load_progress_tracker.h index 490bd82..31683c2 100644 --- a/content/renderer/load_progress_tracker.h +++ b/content/renderer/load_progress_tracker.h @@ -9,7 +9,7 @@ #include "base/task.h" #include "base/time.h" -class RenderView; +class RenderViewImpl; namespace WebKit { class WebFrame; @@ -17,7 +17,7 @@ class WebFrame; class LoadProgressTracker { public: - explicit LoadProgressTracker(RenderView* render_view); + explicit LoadProgressTracker(RenderViewImpl* render_view); ~LoadProgressTracker(); void DidStopLoading(); @@ -29,7 +29,7 @@ class LoadProgressTracker { void SendChangeLoadProgress(); - RenderView* render_view_; + RenderViewImpl* render_view_; WebKit::WebFrame* tracked_frame_; diff --git a/content/renderer/media/audio_renderer_impl.cc b/content/renderer/media/audio_renderer_impl.cc index 2c131ec..fe72c54 100644 --- a/content/renderer/media/audio_renderer_impl.cc +++ b/content/renderer/media/audio_renderer_impl.cc @@ -14,7 +14,6 @@ #include "content/common/content_switches.h" #include "content/common/media/audio_messages.h" #include "content/renderer/render_thread_impl.h" -#include "content/renderer/render_view.h" #include "media/audio/audio_buffers_state.h" #include "media/audio/audio_output_controller.h" #include "media/audio/audio_util.h" diff --git a/content/renderer/media/media_stream_dispatcher.cc b/content/renderer/media/media_stream_dispatcher.cc index 6b27867..aca4423 100644 --- a/content/renderer/media/media_stream_dispatcher.cc +++ b/content/renderer/media/media_stream_dispatcher.cc @@ -7,11 +7,11 @@ #include "base/logging.h" #include "content/common/media/media_stream_messages.h" #include "content/renderer/media/media_stream_dispatcher_eventhandler.h" -#include "content/renderer/render_view.h" +#include "content/renderer/render_view_impl.h" MediaStreamDispatcherEventHandler::~MediaStreamDispatcherEventHandler() {} -MediaStreamDispatcher::MediaStreamDispatcher(RenderView* render_view) +MediaStreamDispatcher::MediaStreamDispatcher(RenderViewImpl* render_view) : content::RenderViewObserver(render_view), next_ipc_id_(0) { } diff --git a/content/renderer/media/media_stream_dispatcher.h b/content/renderer/media/media_stream_dispatcher.h index a599abc..cbbe160 100644 --- a/content/renderer/media/media_stream_dispatcher.h +++ b/content/renderer/media/media_stream_dispatcher.h @@ -16,6 +16,8 @@ #include "content/public/renderer/render_view_observer.h" #include "content/renderer/media/media_stream_dispatcher_eventhandler.h" +class RenderViewImpl; + // MediaStreamDispatcher is a delegate for the Media Stream API messages. // MediaStreams are used by WebKit to open media devices such as Video Capture // and Audio input devices. @@ -24,7 +26,7 @@ class CONTENT_EXPORT MediaStreamDispatcher : public content::RenderViewObserver { public: - explicit MediaStreamDispatcher(RenderView* render_view); + explicit MediaStreamDispatcher(RenderViewImpl* render_view); virtual ~MediaStreamDispatcher(); // Request a new media stream to be created. diff --git a/content/renderer/mhtml_generator.cc b/content/renderer/mhtml_generator.cc index 883151c..42aac72 100644 --- a/content/renderer/mhtml_generator.cc +++ b/content/renderer/mhtml_generator.cc @@ -6,11 +6,11 @@ #include "base/platform_file.h" #include "content/common/view_messages.h" -#include "content/renderer/render_view.h" +#include "content/renderer/render_view_impl.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebCString.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageSerializer.h" -MHTMLGenerator::MHTMLGenerator(RenderView* render_view) +MHTMLGenerator::MHTMLGenerator(RenderViewImpl* render_view) : content::RenderViewObserver(render_view), file_(base::kInvalidPlatformFileValue) { } diff --git a/content/renderer/mhtml_generator.h b/content/renderer/mhtml_generator.h index f2e1c36..0e0c878 100644 --- a/content/renderer/mhtml_generator.h +++ b/content/renderer/mhtml_generator.h @@ -9,9 +9,11 @@ #include "ipc/ipc_platform_file.h" +class RenderViewImpl; + class MHTMLGenerator : public content::RenderViewObserver { public: - explicit MHTMLGenerator(RenderView* render_view); + explicit MHTMLGenerator(RenderViewImpl* render_view); virtual ~MHTMLGenerator(); private: diff --git a/content/renderer/notification_provider.cc b/content/renderer/notification_provider.cc index ae445af..c70bc76 100644 --- a/content/renderer/notification_provider.cc +++ b/content/renderer/notification_provider.cc @@ -8,7 +8,7 @@ #include "base/task.h" #include "content/common/desktop_notification_messages.h" #include "content/common/view_messages.h" -#include "content/renderer/render_view.h" +#include "content/renderer/render_view_impl.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPermissionCallback.h" @@ -23,7 +23,7 @@ using WebKit::WebSecurityOrigin; using WebKit::WebString; using WebKit::WebURL; -NotificationProvider::NotificationProvider(RenderView* render_view) +NotificationProvider::NotificationProvider(RenderViewImpl* render_view) : content::RenderViewObserver(render_view) { } diff --git a/content/renderer/notification_provider.h b/content/renderer/notification_provider.h index 4c8ed24..6204643 100644 --- a/content/renderer/notification_provider.h +++ b/content/renderer/notification_provider.h @@ -11,6 +11,8 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotification.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPresenter.h" +class RenderViewImpl; + namespace WebKit { class WebNotificationPermissionCallback; } @@ -20,7 +22,7 @@ class WebNotificationPermissionCallback; class NotificationProvider : public content::RenderViewObserver, public WebKit::WebNotificationPresenter { public: - explicit NotificationProvider(RenderView* render_view); + explicit NotificationProvider(RenderViewImpl* render_view); virtual ~NotificationProvider(); private: diff --git a/content/renderer/p2p/p2p_transport_impl.cc b/content/renderer/p2p/p2p_transport_impl.cc index ada21a5..c6dc8f2 100644 --- a/content/renderer/p2p/p2p_transport_impl.cc +++ b/content/renderer/p2p/p2p_transport_impl.cc @@ -7,7 +7,6 @@ #include "content/renderer/p2p/ipc_network_manager.h" #include "content/renderer/p2p/ipc_socket_factory.h" #include "content/renderer/p2p/port_allocator.h" -#include "content/renderer/render_view.h" #include "jingle/glue/channel_socket_adapter.h" #include "jingle/glue/pseudotcp_adapter.h" #include "jingle/glue/thread_wrapper.h" diff --git a/content/renderer/p2p/socket_dispatcher.cc b/content/renderer/p2p/socket_dispatcher.cc index b9435a2..ddfcc27 100644 --- a/content/renderer/p2p/socket_dispatcher.cc +++ b/content/renderer/p2p/socket_dispatcher.cc @@ -8,11 +8,11 @@ #include "content/common/p2p_messages.h" #include "content/renderer/p2p/host_address_request.h" #include "content/renderer/p2p/socket_client.h" -#include "content/renderer/render_view.h" +#include "content/renderer/render_view_impl.h" namespace content { -P2PSocketDispatcher::P2PSocketDispatcher(RenderView* render_view) +P2PSocketDispatcher::P2PSocketDispatcher(RenderViewImpl* render_view) : content::RenderViewObserver(render_view), message_loop_(base::MessageLoopProxy::current()), network_notifications_started_(false), diff --git a/content/renderer/p2p/socket_dispatcher.h b/content/renderer/p2p/socket_dispatcher.h index 38ddd3e..e4f201f 100644 --- a/content/renderer/p2p/socket_dispatcher.h +++ b/content/renderer/p2p/socket_dispatcher.h @@ -30,6 +30,8 @@ #include "content/public/renderer/render_view_observer.h" #include "net/base/net_util.h" +class RenderViewImpl; + namespace base { class MessageLoopProxy; } // namespace base @@ -62,7 +64,7 @@ class P2PSocketDispatcher : public content::RenderViewObserver { DISALLOW_COPY_AND_ASSIGN(NetworkListObserver); }; - explicit P2PSocketDispatcher(RenderView* render_view); + explicit P2PSocketDispatcher(RenderViewImpl* render_view); virtual ~P2PSocketDispatcher(); // Add a new network list observer. Each observer is called diff --git a/content/renderer/pepper_plugin_delegate_impl.cc b/content/renderer/pepper_plugin_delegate_impl.cc index 6006067..35fc894 100644 --- a/content/renderer/pepper_plugin_delegate_impl.cc +++ b/content/renderer/pepper_plugin_delegate_impl.cc @@ -40,7 +40,7 @@ #include "content/renderer/pepper_platform_context_3d_impl.h" #include "content/renderer/pepper_platform_video_decoder_impl.h" #include "content/renderer/render_thread_impl.h" -#include "content/renderer/render_view.h" +#include "content/renderer/render_view_impl.h" #include "content/renderer/render_widget_fullscreen_pepper.h" #include "content/renderer/webplugin_delegate_proxy.h" #include "ipc/ipc_channel_handle.h" @@ -661,7 +661,7 @@ void PpapiBrokerImpl::ConnectPluginToBroker( client->BrokerConnected(PlatformFileToInt(plugin_handle), result); } -PepperPluginDelegateImpl::PepperPluginDelegateImpl(RenderView* render_view) +PepperPluginDelegateImpl::PepperPluginDelegateImpl(RenderViewImpl* render_view) : render_view_(render_view), has_saved_context_menu_action_(false), saved_context_menu_action_(0), diff --git a/content/renderer/pepper_plugin_delegate_impl.h b/content/renderer/pepper_plugin_delegate_impl.h index b0fdf94..af4d0de 100644 --- a/content/renderer/pepper_plugin_delegate_impl.h +++ b/content/renderer/pepper_plugin_delegate_impl.h @@ -23,7 +23,7 @@ class FilePath; class PepperPluginDelegateImpl; -class RenderView; +class RenderViewImpl; namespace gfx { class Point; @@ -119,7 +119,7 @@ class PepperPluginDelegateImpl : public webkit::ppapi::PluginDelegate, public base::SupportsWeakPtr<PepperPluginDelegateImpl> { public: - explicit PepperPluginDelegateImpl(RenderView* render_view); + explicit PepperPluginDelegateImpl(RenderViewImpl* render_view); virtual ~PepperPluginDelegateImpl(); // Attempts to create a PPAPI plugin for the given filepath. On success, it @@ -339,7 +339,7 @@ class PepperPluginDelegateImpl } // Pointer to the RenderView that owns us. - RenderView* render_view_; + RenderViewImpl* render_view_; std::set<webkit::ppapi::PluginInstance*> active_instances_; diff --git a/content/renderer/render_process_impl.cc b/content/renderer/render_process_impl.cc index b813bb5..cdc7b22 100644 --- a/content/renderer/render_process_impl.cc +++ b/content/renderer/render_process_impl.cc @@ -22,7 +22,6 @@ #include "content/common/content_switches.h" #include "content/common/view_messages.h" #include "content/public/renderer/content_renderer_client.h" -#include "content/renderer/render_view.h" #include "ipc/ipc_channel.h" #include "ipc/ipc_message_utils.h" #include "skia/ext/platform_canvas.h" diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc index 5d809ae..f1089b7 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc @@ -46,7 +46,7 @@ #include "content/renderer/media/video_capture_message_filter.h" #include "content/renderer/plugin_channel_host.h" #include "content/renderer/render_process_impl.h" -#include "content/renderer/render_view.h" +#include "content/renderer/render_view_impl.h" #include "content/renderer/renderer_webidbfactory_impl.h" #include "content/renderer/renderer_webkitplatformsupport_impl.h" #include "ipc/ipc_channel_handle.h" @@ -590,7 +590,7 @@ int32 RenderThreadImpl::RoutingIDForCurrentContext() { if (v8::Context::InContext()) { WebFrame* frame = WebFrame::frameForCurrentContext(); if (frame) { - RenderView* view = RenderView::FromWebView(frame->view()); + RenderViewImpl* view = RenderViewImpl::FromWebView(frame->view()); if (view) routing_id = view->routing_id(); } @@ -611,7 +611,7 @@ void RenderThreadImpl::DoNotNotifyWebKitOfModalLoop() { void RenderThreadImpl::OnSetZoomLevelForCurrentURL(const GURL& url, double zoom_level) { RenderViewZoomer zoomer(url, zoom_level); - RenderView::ForEach(&zoomer); + content::RenderView::ForEach(&zoomer); } void RenderThreadImpl::OnDOMStorageEvent( @@ -657,7 +657,7 @@ bool RenderThreadImpl::OnControlMessageReceived(const IPC::Message& msg) { void RenderThreadImpl::OnSetNextPageID(int32 next_page_id) { // This should only be called at process initialization time, so we shouldn't // have to worry about thread-safety. - RenderView::SetNextPageID(next_page_id); + RenderViewImpl::SetNextPageID(next_page_id); } // Called when to register CSS Color name->system color mappings. @@ -684,7 +684,7 @@ void RenderThreadImpl::OnSetCSSColors( void RenderThreadImpl::OnCreateNewView(const ViewMsg_New_Params& params) { EnsureWebKitInitialized(); // When bringing in render_view, also bring in webkit's glue and jsbindings. - RenderView::Create( + RenderViewImpl::Create( params.parent_window, MSG_ROUTING_NONE, params.renderer_preferences, diff --git a/content/renderer/render_view.cc b/content/renderer/render_view_impl.cc index 2eb4b19..e146dd8 100644 --- a/content/renderer/render_view.cc +++ b/content/renderer/render_view_impl.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/renderer/render_view.h" +#include "content/renderer/render_view_impl.h" #include <algorithm> #include <cmath> @@ -251,7 +251,7 @@ using webkit_glue::ResourceFetcher; //----------------------------------------------------------------------------- -typedef std::map<WebKit::WebView*, RenderView*> ViewMap; +typedef std::map<WebKit::WebView*, RenderViewImpl*> ViewMap; static base::LazyInstance<ViewMap> g_view_map(base::LINKER_INITIALIZED); // Time, in seconds, we delay before sending content state changes (such as form @@ -290,9 +290,9 @@ static void StopAltErrorPageFetcher(WebDataSource* data_source) { /////////////////////////////////////////////////////////////////////////////// -int32 RenderView::next_page_id_ = 1; +int32 RenderViewImpl::next_page_id_ = 1; -struct RenderView::PendingFileChooser { +struct RenderViewImpl::PendingFileChooser { PendingFileChooser(const ViewHostMsg_RunFileChooser_Params& p, WebFileChooserCompletion* c) : params(p), @@ -302,14 +302,14 @@ struct RenderView::PendingFileChooser { WebFileChooserCompletion* completion; // MAY BE NULL to skip callback. }; -RenderView::RenderView(gfx::NativeViewId parent_hwnd, - int32 opener_id, - const RendererPreferences& renderer_prefs, - const WebPreferences& webkit_prefs, - SharedRenderViewCounter* counter, - int32 routing_id, - int64 session_storage_namespace_id, - const string16& frame_name) +RenderViewImpl::RenderViewImpl(gfx::NativeViewId parent_hwnd, + int32 opener_id, + const RendererPreferences& renderer_prefs, + const WebPreferences& webkit_prefs, + SharedRenderViewCounter* counter, + int32 routing_id, + int64 session_storage_namespace_id, + const string16& frame_name) : RenderWidget(WebKit::WebPopupTypeNone), webkit_preferences_(webkit_prefs), send_content_state_immediately_(false), @@ -406,7 +406,7 @@ RenderView::RenderView(gfx::NativeViewId parent_hwnd, content::GetContentClient()->renderer()->RenderViewCreated(this); } -RenderView::~RenderView() { +RenderViewImpl::~RenderViewImpl() { history_page_ids_.clear(); if (decrement_shared_popup_at_destruction_) @@ -438,12 +438,12 @@ RenderView::~RenderView() { DCHECK_NE(this, it->second) << "Failed to call Close?"; #endif - FOR_EACH_OBSERVER(RenderViewObserver, observers_, set_render_view(NULL)); + FOR_EACH_OBSERVER(RenderViewObserver, observers_, RenderViewGone()); FOR_EACH_OBSERVER(RenderViewObserver, observers_, OnDestruct()); } /*static*/ -RenderView* RenderView::FromWebView(WebView* webview) { +RenderViewImpl* RenderViewImpl::FromWebView(WebView* webview) { ViewMap* views = g_view_map.Pointer(); ViewMap::iterator it = views->find(webview); return it == views->end() ? NULL : it->second; @@ -452,7 +452,7 @@ RenderView* RenderView::FromWebView(WebView* webview) { /*static*/ content::RenderView* content::RenderView::FromWebView(WebKit::WebView* webview) { - return ::RenderView::FromWebView(webview); + return RenderViewImpl::FromWebView(webview); } /*static*/ @@ -465,7 +465,7 @@ void content::RenderView::ForEach(content::RenderViewVisitor* visitor) { } /*static*/ -RenderView* RenderView::Create( +RenderViewImpl* RenderViewImpl::Create( gfx::NativeViewId parent_hwnd, int32 opener_id, const RendererPreferences& renderer_prefs, @@ -475,7 +475,7 @@ RenderView* RenderView::Create( int64 session_storage_namespace_id, const string16& frame_name) { DCHECK(routing_id != MSG_ROUTING_NONE); - return new RenderView( + return new RenderViewImpl( parent_hwnd, opener_id, renderer_prefs, @@ -487,7 +487,7 @@ RenderView* RenderView::Create( } // static -void RenderView::SetNextPageID(int32 next_page_id) { +void RenderViewImpl::SetNextPageID(int32 next_page_id) { // This method should only be called during process startup, and the given // page id had better not exceed our current next page id! DCHECK_EQ(next_page_id_, 1); @@ -495,20 +495,20 @@ void RenderView::SetNextPageID(int32 next_page_id) { next_page_id_ = next_page_id; } -void RenderView::AddObserver(RenderViewObserver* observer) { +void RenderViewImpl::AddObserver(RenderViewObserver* observer) { observers_.AddObserver(observer); } -void RenderView::RemoveObserver(RenderViewObserver* observer) { - observer->set_render_view(NULL); +void RenderViewImpl::RemoveObserver(RenderViewObserver* observer) { + observer->RenderViewGone(); observers_.RemoveObserver(observer); } -WebKit::WebView* RenderView::webview() const { +WebKit::WebView* RenderViewImpl::webview() const { return static_cast<WebKit::WebView*>(webwidget()); } -void RenderView::SetReportLoadProgressEnabled(bool enabled) { +void RenderViewImpl::SetReportLoadProgressEnabled(bool enabled) { if (!enabled) { load_progress_tracker_.reset(NULL); return; @@ -517,11 +517,11 @@ void RenderView::SetReportLoadProgressEnabled(bool enabled) { load_progress_tracker_.reset(new LoadProgressTracker(this)); } -void RenderView::PluginCrashed(const FilePath& plugin_path) { +void RenderViewImpl::PluginCrashed(const FilePath& plugin_path) { Send(new ViewHostMsg_CrashedPlugin(routing_id_, plugin_path)); } -void RenderView::RegisterPluginDelegate(WebPluginDelegateProxy* delegate) { +void RenderViewImpl::RegisterPluginDelegate(WebPluginDelegateProxy* delegate) { plugin_delegates_.insert(delegate); // If the renderer is visible, set initial visibility and focus state. if (!is_hidden()) { @@ -537,15 +537,16 @@ void RenderView::RegisterPluginDelegate(WebPluginDelegateProxy* delegate) { delegate->SetContentAreaFocus(has_focus()); } -void RenderView::UnregisterPluginDelegate(WebPluginDelegateProxy* delegate) { +void RenderViewImpl::UnregisterPluginDelegate( + WebPluginDelegateProxy* delegate) { plugin_delegates_.erase(delegate); } -bool RenderView::GetPluginInfo(const GURL& url, - const GURL& page_url, - const std::string& mime_type, - webkit::WebPluginInfo* plugin_info, - std::string* actual_mime_type) { +bool RenderViewImpl::GetPluginInfo(const GURL& url, + const GURL& page_url, + const std::string& mime_type, + webkit::WebPluginInfo* plugin_info, + std::string* actual_mime_type) { bool found = false; Send(new ViewHostMsg_GetPluginInfo( routing_id_, url, page_url, mime_type, &found, plugin_info, @@ -553,7 +554,7 @@ bool RenderView::GetPluginInfo(const GURL& url, return found; } -bool RenderView::OnMessageReceived(const IPC::Message& message) { +bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) { WebFrame* main_frame = webview() ? webview()->mainFrame() : NULL; if (main_frame) content::GetContentClient()->SetActiveURL(main_frame->document().url()); @@ -566,7 +567,7 @@ bool RenderView::OnMessageReceived(const IPC::Message& message) { bool handled = true; bool msg_is_ok = true; - IPC_BEGIN_MESSAGE_MAP_EX(RenderView, message, msg_is_ok) + IPC_BEGIN_MESSAGE_MAP_EX(RenderViewImpl, message, msg_is_ok) IPC_MESSAGE_HANDLER(ViewMsg_Navigate, OnNavigate) IPC_MESSAGE_HANDLER(ViewMsg_Stop, OnStop) IPC_MESSAGE_HANDLER(ViewMsg_ReloadFrame, OnReloadFrame) @@ -676,13 +677,13 @@ bool RenderView::OnMessageReceived(const IPC::Message& message) { if (!msg_is_ok) { // The message had a handler, but its deserialization failed. // Kill the renderer to avoid potential spoofing attacks. - CHECK(false) << "Unable to deserialize message in RenderView."; + CHECK(false) << "Unable to deserialize message in RenderViewImpl."; } return handled; } -void RenderView::OnNavigate(const ViewMsg_Navigate_Params& params) { +void RenderViewImpl::OnNavigate(const ViewMsg_Navigate_Params& params) { if (!webview()) return; @@ -803,7 +804,7 @@ void RenderView::OnNavigate(const ViewMsg_Navigate_Params& params) { pending_navigation_state_.reset(); } -bool RenderView::IsBackForwardToStaleEntry( +bool RenderViewImpl::IsBackForwardToStaleEntry( const ViewMsg_Navigate_Params& params, bool is_reload) { // Make sure this isn't a back/forward to an entry we have already cropped @@ -841,7 +842,7 @@ bool RenderView::IsBackForwardToStaleEntry( } // Stop loading the current page -void RenderView::OnStop() { +void RenderViewImpl::OnStop() { if (webview()) { WebFrame* main_frame = webview()->mainFrame(); // Stop the alt error page fetcher. If we let it continue it may complete @@ -855,7 +856,7 @@ void RenderView::OnStop() { // Reload current focused frame. // E.g. called by right-clicking on the frame and picking "reload this frame". -void RenderView::OnReloadFrame() { +void RenderViewImpl::OnReloadFrame() { if (webview() && webview()->focusedFrame()) { // We always obey the cache (ignore_cache=false) here. // TODO(evanm): perhaps we could allow shift-clicking the menu item to do @@ -864,11 +865,11 @@ void RenderView::OnReloadFrame() { } } -void RenderView::OnCopyImageAt(int x, int y) { +void RenderViewImpl::OnCopyImageAt(int x, int y) { webview()->copyImageAt(WebPoint(x, y)); } -void RenderView::OnExecuteEditCommand(const std::string& name, +void RenderViewImpl::OnExecuteEditCommand(const std::string& name, const std::string& value) { if (!webview() || !webview()->focusedFrame()) return; @@ -877,7 +878,7 @@ void RenderView::OnExecuteEditCommand(const std::string& name, WebString::fromUTF8(name), WebString::fromUTF8(value)); } -void RenderView::OnUpdateTargetURLAck() { +void RenderViewImpl::OnUpdateTargetURLAck() { // Check if there is a targeturl waiting to be sent. if (target_url_status_ == TARGET_PENDING) { Send(new ViewHostMsg_UpdateTargetURL(routing_id_, page_id_, @@ -887,28 +888,28 @@ void RenderView::OnUpdateTargetURLAck() { target_url_status_ = TARGET_NONE; } -void RenderView::OnUndo() { +void RenderViewImpl::OnUndo() { if (!webview()) return; webview()->focusedFrame()->executeCommand(WebString::fromUTF8("Undo")); } -void RenderView::OnRedo() { +void RenderViewImpl::OnRedo() { if (!webview()) return; webview()->focusedFrame()->executeCommand(WebString::fromUTF8("Redo")); } -void RenderView::OnCut() { +void RenderViewImpl::OnCut() { if (!webview()) return; webview()->focusedFrame()->executeCommand(WebString::fromUTF8("Cut")); } -void RenderView::OnCopy() { +void RenderViewImpl::OnCopy() { if (!webview()) return; @@ -917,7 +918,7 @@ void RenderView::OnCopy() { } #if defined(OS_MACOSX) -void RenderView::OnCopyToFindPboard() { +void RenderViewImpl::OnCopyToFindPboard() { if (!webview()) return; @@ -932,14 +933,14 @@ void RenderView::OnCopyToFindPboard() { } #endif -void RenderView::OnPaste() { +void RenderViewImpl::OnPaste() { if (!webview()) return; webview()->focusedFrame()->executeCommand(WebString::fromUTF8("Paste")); } -void RenderView::OnReplace(const string16& text) { +void RenderViewImpl::OnReplace(const string16& text) { if (!webview()) return; @@ -949,14 +950,14 @@ void RenderView::OnReplace(const string16& text) { frame->replaceSelection(text); } -void RenderView::OnDelete() { +void RenderViewImpl::OnDelete() { if (!webview()) return; webview()->focusedFrame()->executeCommand(WebString::fromUTF8("Delete")); } -void RenderView::OnSelectAll() { +void RenderViewImpl::OnSelectAll() { if (!webview()) return; @@ -964,7 +965,8 @@ void RenderView::OnSelectAll() { WebString::fromUTF8("SelectAll")); } -void RenderView::OnSelectRange(const gfx::Point& start, const gfx::Point& end) { +void RenderViewImpl::OnSelectRange(const gfx::Point& start, + const gfx::Point& end) { if (!webview()) return; @@ -973,8 +975,8 @@ void RenderView::OnSelectRange(const gfx::Point& start, const gfx::Point& end) { handling_select_range_ = false; } -void RenderView::OnSetHistoryLengthAndPrune(int history_length, - int32 minimum_page_id) { +void RenderViewImpl::OnSetHistoryLengthAndPrune(int history_length, + int32 minimum_page_id) { DCHECK(history_length >= 0); DCHECK(history_list_offset_ == history_list_length_ - 1); DCHECK(minimum_page_id >= -1); @@ -994,14 +996,14 @@ void RenderView::OnSetHistoryLengthAndPrune(int history_length, } -void RenderView::OnSetInitialFocus(bool reverse) { +void RenderViewImpl::OnSetInitialFocus(bool reverse) { if (!webview()) return; webview()->setInitialFocus(reverse); } #if defined(OS_MACOSX) -void RenderView::OnSetInLiveResize(bool in_live_resize) { +void RenderViewImpl::OnSetInLiveResize(bool in_live_resize) { if (!webview()) return; if (in_live_resize) @@ -1011,7 +1013,8 @@ void RenderView::OnSetInLiveResize(bool in_live_resize) { } #endif -void RenderView::OnScrollFocusedEditableNodeIntoRect(const gfx::Rect& rect) { +void RenderViewImpl::OnScrollFocusedEditableNodeIntoRect( + const gfx::Rect& rect) { WebKit::WebNode node = GetFocusedNode(); if (!node.isNull()) { if (IsEditableNode(node)) @@ -1022,7 +1025,7 @@ void RenderView::OnScrollFocusedEditableNodeIntoRect(const gfx::Rect& rect) { /////////////////////////////////////////////////////////////////////////////// // Tell the embedding application that the URL of the active page has changed -void RenderView::UpdateURL(WebFrame* frame) { +void RenderViewImpl::UpdateURL(WebFrame* frame) { WebDataSource* ds = frame->dataSource(); DCHECK(ds); @@ -1186,9 +1189,9 @@ void RenderView::UpdateURL(WebFrame* frame) { } // Tell the embedding application that the title of the active page has changed -void RenderView::UpdateTitle(WebFrame* frame, - const string16& title, - WebTextDirection title_direction) { +void RenderViewImpl::UpdateTitle(WebFrame* frame, + const string16& title, + WebTextDirection title_direction) { // Ignore all but top level navigations. if (frame->parent()) return; @@ -1198,8 +1201,8 @@ void RenderView::UpdateTitle(WebFrame* frame, title_direction)); } -void RenderView::UpdateEncoding(WebFrame* frame, - const std::string& encoding_name) { +void RenderViewImpl::UpdateEncoding(WebFrame* frame, + const std::string& encoding_name) { // Only update main frame's encoding_name. if (webview()->mainFrame() == frame && last_encoding_name_ != encoding_name) { @@ -1213,7 +1216,7 @@ void RenderView::UpdateEncoding(WebFrame* frame, // Sends the last committed session history state to the browser so it will be // saved before we navigate to a new page. This must be called *before* the // page ID has been updated so we know what it was. -void RenderView::UpdateSessionHistory(WebFrame* frame) { +void RenderViewImpl::UpdateSessionHistory(WebFrame* frame) { // If we have a valid page ID at this point, then it corresponds to the page // we are navigating away from. Otherwise, this is the first navigation, so // there is no past session history to record. @@ -1229,10 +1232,10 @@ void RenderView::UpdateSessionHistory(WebFrame* frame) { routing_id_, page_id_, webkit_glue::HistoryItemToString(item))); } -void RenderView::OpenURL(WebFrame* frame, - const GURL& url, - const GURL& referrer, - WebNavigationPolicy policy) { +void RenderViewImpl::OpenURL(WebFrame* frame, + const GURL& url, + const GURL& referrer, + WebNavigationPolicy policy) { Send(new ViewHostMsg_OpenURL( routing_id_, url, @@ -1243,11 +1246,12 @@ void RenderView::OpenURL(WebFrame* frame, // WebViewDelegate ------------------------------------------------------------ -void RenderView::LoadNavigationErrorPage(WebFrame* frame, - const WebURLRequest& failed_request, - const WebURLError& error, - const std::string& html, - bool replace) { +void RenderViewImpl::LoadNavigationErrorPage( + WebFrame* frame, + const WebURLRequest& failed_request, + const WebURLError& error, + const std::string& html, + bool replace) { std::string alt_html = !html.empty() ? html : content::GetContentClient()->renderer()->GetNavigationErrorHtml( failed_request, error); @@ -1257,11 +1261,11 @@ void RenderView::LoadNavigationErrorPage(WebFrame* frame, replace); } -bool RenderView::RunJavaScriptMessage(int type, - const string16& message, - const string16& default_value, - const GURL& frame_url, - string16* result) { +bool RenderViewImpl::RunJavaScriptMessage(int type, + const string16& message, + const string16& default_value, + const GURL& frame_url, + string16* result) { bool success = false; string16 result_temp; if (!result) @@ -1272,7 +1276,7 @@ bool RenderView::RunJavaScriptMessage(int type, return success; } -bool RenderView::SendAndRunNestedMessageLoop(IPC::SyncMessage* message) { +bool RenderViewImpl::SendAndRunNestedMessageLoop(IPC::SyncMessage* message) { // Before WebKit asks us to show an alert (etc.), it takes care of doing the // equivalent of WebView::willEnterModalLoop. In the case of showModalDialog // it is particularly important that we do not call willEnterModalLoop as @@ -1286,7 +1290,7 @@ bool RenderView::SendAndRunNestedMessageLoop(IPC::SyncMessage* message) { // WebKit::WebViewClient ------------------------------------------------------ -WebView* RenderView::createView( +WebView* RenderViewImpl::createView( WebFrame* creator, const WebURLRequest& request, const WebWindowFeatures& features, @@ -1319,14 +1323,15 @@ WebView* RenderView::createView( if (routing_id == MSG_ROUTING_NONE) return NULL; - RenderView* view = RenderView::Create(0, - routing_id_, - renderer_preferences_, - webkit_preferences_, - shared_popup_counter_, - routing_id, - cloned_session_storage_namespace_id, - frame_name); + RenderViewImpl* view = RenderViewImpl::Create( + 0, + routing_id_, + renderer_preferences_, + webkit_preferences_, + shared_popup_counter_, + routing_id, + cloned_session_storage_namespace_id, + frame_name); view->opened_by_user_gesture_ = params.user_gesture; // Record whether the creator frame is trying to suppress the opener field. @@ -1345,12 +1350,12 @@ WebView* RenderView::createView( return view->webview(); } -WebWidget* RenderView::createPopupMenu(WebKit::WebPopupType popup_type) { +WebWidget* RenderViewImpl::createPopupMenu(WebKit::WebPopupType popup_type) { RenderWidget* widget = RenderWidget::Create(routing_id_, popup_type); return widget->webwidget(); } -WebWidget* RenderView::createPopupMenu(const WebPopupMenuInfo& info) { +WebWidget* RenderViewImpl::createPopupMenu(const WebPopupMenuInfo& info) { // TODO(jcivelli): Remove this deprecated method when its been removed from // the WebViewClient interface. It's been replaced by // createExternalPopupMenu. @@ -1358,7 +1363,7 @@ WebWidget* RenderView::createPopupMenu(const WebPopupMenuInfo& info) { return NULL; } -WebExternalPopupMenu* RenderView::createExternalPopupMenu( +WebExternalPopupMenu* RenderViewImpl::createExternalPopupMenu( const WebPopupMenuInfo& popup_menu_info, WebExternalPopupMenuClient* popup_menu_client) { DCHECK(!external_popup_menu_.get()); @@ -1367,7 +1372,7 @@ WebExternalPopupMenu* RenderView::createExternalPopupMenu( return external_popup_menu_.get(); } -RenderWidgetFullscreenPepper* RenderView::CreatePepperFullscreenContainer( +RenderWidgetFullscreenPepper* RenderViewImpl::CreatePepperFullscreenContainer( webkit::ppapi::PluginInstance* plugin) { GURL active_url; if (webview() && webview()->mainFrame()) @@ -1378,7 +1383,8 @@ RenderWidgetFullscreenPepper* RenderView::CreatePepperFullscreenContainer( return widget; } -WebStorageNamespace* RenderView::createSessionStorageNamespace(unsigned quota) { +WebStorageNamespace* RenderViewImpl::createSessionStorageNamespace( + unsigned quota) { if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)) return WebStorageNamespace::createSessionStorageNamespace(quota); CHECK(session_storage_namespace_id_ != kInvalidSessionStorageNamespaceId); @@ -1386,7 +1392,7 @@ WebStorageNamespace* RenderView::createSessionStorageNamespace(unsigned quota) { session_storage_namespace_id_); } -void RenderView::didAddMessageToConsole( +void RenderViewImpl::didAddMessageToConsole( const WebConsoleMessage& message, const WebString& source_name, unsigned source_line) { logging::LogSeverity log_severity = logging::LOG_VERBOSE; @@ -1414,15 +1420,15 @@ void RenderView::didAddMessageToConsole( source_name)); } -void RenderView::printPage(WebFrame* frame) { +void RenderViewImpl::printPage(WebFrame* frame) { FOR_EACH_OBSERVER(RenderViewObserver, observers_, PrintPage(frame)); } -WebKit::WebNotificationPresenter* RenderView::notificationPresenter() { +WebKit::WebNotificationPresenter* RenderViewImpl::notificationPresenter() { return notification_provider_; } -bool RenderView::enumerateChosenDirectory( +bool RenderViewImpl::enumerateChosenDirectory( const WebString& path, WebFileChooserCompletion* chooser_completion) { int id = enumeration_completion_id_++; @@ -1433,7 +1439,7 @@ bool RenderView::enumerateChosenDirectory( webkit_glue::WebStringToFilePath(path))); } -void RenderView::didStartLoading() { +void RenderViewImpl::didStartLoading() { if (is_loading_) { DLOG(WARNING) << "didStartLoading called while loading"; return; @@ -1446,7 +1452,7 @@ void RenderView::didStartLoading() { FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidStartLoading()); } -void RenderView::didStopLoading() { +void RenderViewImpl::didStopLoading() { if (!is_loading_) { DLOG(WARNING) << "DidStopLoading called while not loading"; return; @@ -1467,12 +1473,13 @@ void RenderView::didStopLoading() { FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidStopLoading()); } -void RenderView::didChangeLoadProgress(WebFrame* frame, double load_progress) { +void RenderViewImpl::didChangeLoadProgress(WebFrame* frame, + double load_progress) { if (load_progress_tracker_ != NULL) load_progress_tracker_->DidChangeLoadProgress(frame, load_progress); } -bool RenderView::isSmartInsertDeleteEnabled() { +bool RenderViewImpl::isSmartInsertDeleteEnabled() { #if defined(OS_MACOSX) return true; #else @@ -1480,7 +1487,7 @@ bool RenderView::isSmartInsertDeleteEnabled() { #endif } -bool RenderView::isSelectTrailingWhitespaceEnabled() { +bool RenderViewImpl::isSelectTrailingWhitespaceEnabled() { #if defined(OS_WIN) return true; #else @@ -1488,7 +1495,7 @@ bool RenderView::isSelectTrailingWhitespaceEnabled() { #endif } -void RenderView::didChangeSelection(bool is_empty_selection) { +void RenderViewImpl::didChangeSelection(bool is_empty_selection) { #if defined(OS_POSIX) if (!handling_input_event_ && !handling_select_range_) return; @@ -1498,7 +1505,7 @@ void RenderView::didChangeSelection(bool is_empty_selection) { #endif // defined(OS_POSIX) } -void RenderView::didExecuteCommand(const WebString& command_name) { +void RenderViewImpl::didExecuteCommand(const WebString& command_name) { const std::string& name = UTF16ToUTF8(command_name); if (StartsWithASCII(name, "Move", true) || StartsWithASCII(name, "Insert", true) || @@ -1507,7 +1514,7 @@ void RenderView::didExecuteCommand(const WebString& command_name) { RenderThreadImpl::current()->RecordUserMetrics(name); } -bool RenderView::handleCurrentKeyboardEvent() { +bool RenderViewImpl::handleCurrentKeyboardEvent() { if (edit_commands_.empty()) return false; @@ -1532,7 +1539,7 @@ bool RenderView::handleCurrentKeyboardEvent() { return did_execute_command; } -bool RenderView::runFileChooser( +bool RenderViewImpl::runFileChooser( const WebKit::WebFileChooserParams& params, WebFileChooserCompletion* chooser_completion) { // Do not open the file dialog in a hidden RenderView. @@ -1553,7 +1560,7 @@ bool RenderView::runFileChooser( return ScheduleFileChooser(ipc_params, chooser_completion); } -void RenderView::runModalAlertDialog( +void RenderViewImpl::runModalAlertDialog( WebFrame* frame, const WebString& message) { RunJavaScriptMessage(ui::MessageBoxFlags::kIsJavascriptAlert, message, @@ -1562,7 +1569,7 @@ void RenderView::runModalAlertDialog( NULL); } -bool RenderView::runModalConfirmDialog( +bool RenderViewImpl::runModalConfirmDialog( WebFrame* frame, const WebString& message) { return RunJavaScriptMessage(ui::MessageBoxFlags::kIsJavascriptConfirm, message, @@ -1571,7 +1578,7 @@ bool RenderView::runModalConfirmDialog( NULL); } -bool RenderView::runModalPromptDialog( +bool RenderViewImpl::runModalPromptDialog( WebFrame* frame, const WebString& message, const WebString& default_value, WebString* actual_value) { string16 result; @@ -1585,7 +1592,7 @@ bool RenderView::runModalPromptDialog( return ok; } -bool RenderView::runModalBeforeUnloadDialog( +bool RenderViewImpl::runModalBeforeUnloadDialog( WebFrame* frame, const WebString& message) { // If we are swapping out, we have already run the beforeunload handler. // TODO(creis): Fix OnSwapOut to clear the frame without running beforeunload @@ -1603,7 +1610,7 @@ bool RenderView::runModalBeforeUnloadDialog( return success; } -void RenderView::showContextMenu( +void RenderViewImpl::showContextMenu( WebFrame* frame, const WebContextMenuData& data) { ContextMenuParams params = ContextMenuParams(data); @@ -1622,31 +1629,32 @@ void RenderView::showContextMenu( Send(new ViewHostMsg_ContextMenu(routing_id_, params)); } -bool RenderView::supportsFullscreen() { +bool RenderViewImpl::supportsFullscreen() { return CommandLine::ForCurrentProcess()->HasSwitch( switches::kEnableVideoFullscreen); } -void RenderView::enterFullscreenForNode(const WebKit::WebNode& node) { +void RenderViewImpl::enterFullscreenForNode(const WebKit::WebNode& node) { NOTIMPLEMENTED(); } -void RenderView::exitFullscreenForNode(const WebKit::WebNode& node) { +void RenderViewImpl::exitFullscreenForNode(const WebKit::WebNode& node) { NOTIMPLEMENTED(); } -void RenderView::enterFullscreen() { +void RenderViewImpl::enterFullscreen() { Send(new ViewHostMsg_ToggleFullscreen(routing_id_, true)); } -void RenderView::exitFullscreen() { +void RenderViewImpl::exitFullscreen() { Send(new ViewHostMsg_ToggleFullscreen(routing_id_, false)); } -void RenderView::setStatusText(const WebString& text) { +void RenderViewImpl::setStatusText(const WebString& text) { } -void RenderView::UpdateTargetURL(const GURL& url, const GURL& fallback_url) { +void RenderViewImpl::UpdateTargetURL(const GURL& url, + const GURL& fallback_url) { GURL latest_url = url.is_empty() ? fallback_url : url; if (latest_url == target_url_) return; @@ -1666,7 +1674,7 @@ void RenderView::UpdateTargetURL(const GURL& url, const GURL& fallback_url) { } } -void RenderView::StartNavStateSyncTimerIfNecessary() { +void RenderViewImpl::StartNavStateSyncTimerIfNecessary() { int delay; if (send_content_state_immediately_) delay = 0; @@ -1685,23 +1693,23 @@ void RenderView::StartNavStateSyncTimerIfNecessary() { } nav_state_sync_timer_.Start(FROM_HERE, TimeDelta::FromSeconds(delay), this, - &RenderView::SyncNavigationState); + &RenderViewImpl::SyncNavigationState); } -void RenderView::setMouseOverURL(const WebURL& url) { +void RenderViewImpl::setMouseOverURL(const WebURL& url) { mouse_over_url_ = GURL(url); UpdateTargetURL(mouse_over_url_, focus_url_); } -void RenderView::setKeyboardFocusURL(const WebURL& url) { +void RenderViewImpl::setKeyboardFocusURL(const WebURL& url) { focus_url_ = GURL(url); UpdateTargetURL(focus_url_, mouse_over_url_); } -void RenderView::startDragging(const WebDragData& data, - WebDragOperationsMask mask, - const WebImage& image, - const WebPoint& imageOffset) { +void RenderViewImpl::startDragging(const WebDragData& data, + WebDragOperationsMask mask, + const WebImage& image, + const WebPoint& imageOffset) { #if WEBKIT_USING_SKIA SkBitmap bitmap(image.getSkBitmap()); #elif WEBKIT_USING_CG @@ -1715,43 +1723,43 @@ void RenderView::startDragging(const WebDragData& data, imageOffset)); } -bool RenderView::acceptsLoadDrops() { +bool RenderViewImpl::acceptsLoadDrops() { return renderer_preferences_.can_accept_load_drops; } -void RenderView::focusNext() { +void RenderViewImpl::focusNext() { Send(new ViewHostMsg_TakeFocus(routing_id_, false)); } -void RenderView::focusPrevious() { +void RenderViewImpl::focusPrevious() { Send(new ViewHostMsg_TakeFocus(routing_id_, true)); } -void RenderView::focusedNodeChanged(const WebNode& node) { +void RenderViewImpl::focusedNodeChanged(const WebNode& node) { Send(new ViewHostMsg_FocusedNodeChanged(routing_id_, IsEditableNode(node))); FOR_EACH_OBSERVER(RenderViewObserver, observers_, FocusedNodeChanged(node)); } -void RenderView::navigateBackForwardSoon(int offset) { +void RenderViewImpl::navigateBackForwardSoon(int offset) { Send(new ViewHostMsg_GoToEntryAtOffset(routing_id_, offset)); } -int RenderView::historyBackListCount() { +int RenderViewImpl::historyBackListCount() { return history_list_offset_ < 0 ? 0 : history_list_offset_; } -int RenderView::historyForwardListCount() { +int RenderViewImpl::historyForwardListCount() { return history_list_length_ - historyBackListCount() - 1; } -void RenderView::postAccessibilityNotification( +void RenderViewImpl::postAccessibilityNotification( const WebAccessibilityObject& obj, WebAccessibilityNotification notification) { renderer_accessibility_->PostAccessibilityNotification(obj, notification); } -void RenderView::didUpdateInspectorSetting(const WebString& key, +void RenderViewImpl::didUpdateInspectorSetting(const WebString& key, const WebString& value) { Send(new ViewHostMsg_UpdateInspectorSetting(routing_id_, key.utf8(), @@ -1760,7 +1768,7 @@ void RenderView::didUpdateInspectorSetting(const WebString& key, // WebKit::WebWidgetClient ---------------------------------------------------- -void RenderView::didFocus() { +void RenderViewImpl::didFocus() { // TODO(jcivelli): when https://bugs.webkit.org/show_bug.cgi?id=33389 is fixed // we won't have to test for user gesture anymore and we can // move that code back to render_widget.cc @@ -1770,7 +1778,7 @@ void RenderView::didFocus() { } } -void RenderView::didBlur() { +void RenderViewImpl::didBlur() { // TODO(jcivelli): see TODO above in didFocus(). if (webview() && webview()->mainFrame() && webview()->mainFrame()->isProcessingUserGesture()) { @@ -1779,13 +1787,13 @@ void RenderView::didBlur() { } // We are supposed to get a single call to Show for a newly created RenderView -// that was created via RenderView::CreateWebView. So, we wait until this +// that was created via RenderViewImpl::CreateWebView. So, we wait until this // point to dispatch the ShowView message. // // This method provides us with the information about how to display the newly // created RenderView (i.e., as a blocked popup or as a new tab). // -void RenderView::show(WebNavigationPolicy policy) { +void RenderViewImpl::show(WebNavigationPolicy policy) { DCHECK(!did_show_) << "received extraneous Show call"; DCHECK(opener_id_ != MSG_ROUTING_NONE); @@ -1814,7 +1822,7 @@ void RenderView::show(WebNavigationPolicy policy) { SetPendingWindowRect(initial_pos_); } -void RenderView::runModal() { +void RenderViewImpl::runModal() { DCHECK(did_show_) << "should already have shown the view"; // We must keep WebKit's shared timer running in this case in order to allow @@ -1832,8 +1840,8 @@ void RenderView::runModal() { // WebKit::WebFrameClient ----------------------------------------------------- -WebPlugin* RenderView::createPlugin(WebFrame* frame, - const WebPluginParams& params) { +WebPlugin* RenderViewImpl::createPlugin(WebFrame* frame, + const WebPluginParams& params) { WebPlugin* plugin = NULL; if (content::GetContentClient()->renderer()->OverrideCreatePlugin( this, frame, params, &plugin)) { @@ -1852,7 +1860,8 @@ WebPlugin* RenderView::createPlugin(WebFrame* frame, return CreatePlugin(frame, info, params_to_use); } -WebWorker* RenderView::createWorker(WebFrame* frame, WebWorkerClient* client) { +WebWorker* RenderViewImpl::createWorker(WebFrame* frame, + WebWorkerClient* client) { WebApplicationCacheHostImpl* appcache_host = WebApplicationCacheHostImpl::FromFrame(frame); int appcache_host_id = appcache_host ? appcache_host->host_id() : 0; @@ -1860,7 +1869,7 @@ WebWorker* RenderView::createWorker(WebFrame* frame, WebWorkerClient* client) { appcache_host_id); } -WebSharedWorker* RenderView::createSharedWorker( +WebSharedWorker* RenderViewImpl::createSharedWorker( WebFrame* frame, const WebURL& url, const WebString& name, unsigned long long document_id) { @@ -1889,7 +1898,7 @@ WebSharedWorker* RenderView::createSharedWorker( } } -WebMediaPlayer* RenderView::createMediaPlayer( +WebMediaPlayer* RenderViewImpl::createMediaPlayer( WebFrame* frame, WebMediaPlayerClient* client) { FOR_EACH_OBSERVER( RenderViewObserver, observers_, WillCreateMediaPlayer(frame, client)); @@ -1927,32 +1936,32 @@ WebMediaPlayer* RenderView::createMediaPlayer( return result.release(); } -WebApplicationCacheHost* RenderView::createApplicationCacheHost( +WebApplicationCacheHost* RenderViewImpl::createApplicationCacheHost( WebFrame* frame, WebApplicationCacheHostClient* client) { return new RendererWebApplicationCacheHostImpl( FromWebView(frame->view()), client, RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); } -WebCookieJar* RenderView::cookieJar(WebFrame* frame) { +WebCookieJar* RenderViewImpl::cookieJar(WebFrame* frame) { return &cookie_jar_; } -void RenderView::frameDetached(WebFrame* frame) { +void RenderViewImpl::frameDetached(WebFrame* frame) { FOR_EACH_OBSERVER(RenderViewObserver, observers_, FrameDetached(frame)); } -void RenderView::willClose(WebFrame* frame) { +void RenderViewImpl::willClose(WebFrame* frame) { FOR_EACH_OBSERVER(RenderViewObserver, observers_, FrameWillClose(frame)); } -void RenderView::loadURLExternally( +void RenderViewImpl::loadURLExternally( WebFrame* frame, const WebURLRequest& request, WebNavigationPolicy policy) { loadURLExternally(frame, request, policy, WebString()); } -void RenderView::loadURLExternally( +void RenderViewImpl::loadURLExternally( WebFrame* frame, const WebURLRequest& request, WebNavigationPolicy policy, const WebString& suggested_name) { @@ -1965,7 +1974,7 @@ void RenderView::loadURLExternally( } } -WebNavigationPolicy RenderView::decidePolicyForNavigation( +WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation( WebFrame* frame, const WebURLRequest& request, WebNavigationType type, const WebNode&, WebNavigationPolicy default_policy, bool is_redirect) { // TODO(creis): Remove this when we fix OnSwapOut to not need a navigation. @@ -2116,20 +2125,20 @@ WebNavigationPolicy RenderView::decidePolicyForNavigation( return default_policy; } -bool RenderView::canHandleRequest( +bool RenderViewImpl::canHandleRequest( WebFrame* frame, const WebURLRequest& request) { // We allow WebKit to think that everything can be handled even though // browser-side we limit what we load. return true; } -WebURLError RenderView::cannotHandleRequestError( +WebURLError RenderViewImpl::cannotHandleRequestError( WebFrame* frame, const WebURLRequest& request) { NOTREACHED(); // Since we said we can handle all requests. return WebURLError(); } -WebURLError RenderView::cancelledError( +WebURLError RenderViewImpl::cancelledError( WebFrame* frame, const WebURLRequest& request) { WebURLError error; error.domain = WebString::fromUTF8(net::kErrorDomain); @@ -2138,12 +2147,12 @@ WebURLError RenderView::cancelledError( return error; } -void RenderView::unableToImplementPolicyWithError( +void RenderViewImpl::unableToImplementPolicyWithError( WebFrame*, const WebURLError&) { NOTREACHED(); // Since we said we can handle all requests. } -void RenderView::willSendSubmitEvent(WebKit::WebFrame* frame, +void RenderViewImpl::willSendSubmitEvent(WebKit::WebFrame* frame, const WebKit::WebFormElement& form) { // Some login forms have onSubmit handlers that put a hash of the password // into a hidden field and then clear the password. (Issue 28910.) @@ -2155,7 +2164,8 @@ void RenderView::willSendSubmitEvent(WebKit::WebFrame* frame, PasswordFormDomManager::CreatePasswordForm(form)); } -void RenderView::willSubmitForm(WebFrame* frame, const WebFormElement& form) { +void RenderViewImpl::willSubmitForm(WebFrame* frame, + const WebFormElement& form) { NavigationState* navigation_state = NavigationState::FromDataSource(frame->provisionalDataSource()); @@ -2190,7 +2200,7 @@ void RenderView::willSubmitForm(WebFrame* frame, const WebFormElement& form) { RenderViewObserver, observers_, WillSubmitForm(frame, form)); } -void RenderView::willPerformClientRedirect( +void RenderViewImpl::willPerformClientRedirect( WebFrame* frame, const WebURL& from, const WebURL& to, double interval, double fire_time) { FOR_EACH_OBSERVER( @@ -2198,12 +2208,12 @@ void RenderView::willPerformClientRedirect( WillPerformClientRedirect(frame, from, to, interval, fire_time)); } -void RenderView::didCancelClientRedirect(WebFrame* frame) { +void RenderViewImpl::didCancelClientRedirect(WebFrame* frame) { FOR_EACH_OBSERVER( RenderViewObserver, observers_, DidCancelClientRedirect(frame)); } -void RenderView::didCompleteClientRedirect( +void RenderViewImpl::didCompleteClientRedirect( WebFrame* frame, const WebURL& from) { if (!frame->parent()) completed_client_redirect_src_ = from; @@ -2211,7 +2221,7 @@ void RenderView::didCompleteClientRedirect( RenderViewObserver, observers_, DidCompleteClientRedirect(frame, from)); } -void RenderView::didCreateDataSource(WebFrame* frame, WebDataSource* ds) { +void RenderViewImpl::didCreateDataSource(WebFrame* frame, WebDataSource* ds) { // The rest of RenderView assumes that a WebDataSource will always have a // non-null NavigationState. bool content_initiated = !pending_navigation_state_.get(); @@ -2269,7 +2279,7 @@ void RenderView::didCreateDataSource(WebFrame* frame, WebDataSource* ds) { RenderViewObserver, observers_, DidCreateDataSource(frame, ds)); } -void RenderView::didStartProvisionalLoad(WebFrame* frame) { +void RenderViewImpl::didStartProvisionalLoad(WebFrame* frame) { WebDataSource* ds = frame->provisionalDataSource(); NavigationState* navigation_state = NavigationState::FromDataSource(ds); @@ -2304,7 +2314,8 @@ void RenderView::didStartProvisionalLoad(WebFrame* frame) { ds->request().url())); } -void RenderView::didReceiveServerRedirectForProvisionalLoad(WebFrame* frame) { +void RenderViewImpl::didReceiveServerRedirectForProvisionalLoad( + WebFrame* frame) { if (frame->parent()) return; // Received a redirect on the main frame. @@ -2322,8 +2333,8 @@ void RenderView::didReceiveServerRedirectForProvisionalLoad(WebFrame* frame) { } } -void RenderView::didFailProvisionalLoad(WebFrame* frame, - const WebURLError& error) { +void RenderViewImpl::didFailProvisionalLoad(WebFrame* frame, + const WebURLError& error) { // Notify the browser that we failed a provisional load with an error. // // Note: It is important this notification occur before DidStopLoading so the @@ -2385,7 +2396,7 @@ void RenderView::didFailProvisionalLoad(WebFrame* frame, LoadNavigationErrorPage(frame, failed_request, error, std::string(), replace); } -void RenderView::didReceiveDocumentData( +void RenderViewImpl::didReceiveDocumentData( WebFrame* frame, const char* data, size_t data_len, bool& prevent_default) { NavigationState* navigation_state = @@ -2393,8 +2404,8 @@ void RenderView::didReceiveDocumentData( navigation_state->set_use_error_page(false); } -void RenderView::didCommitProvisionalLoad(WebFrame* frame, - bool is_new_navigation) { +void RenderViewImpl::didCommitProvisionalLoad(WebFrame* frame, + bool is_new_navigation) { NavigationState* navigation_state = NavigationState::FromDataSource(frame->dataSource()); @@ -2463,7 +2474,7 @@ void RenderView::didCommitProvisionalLoad(WebFrame* frame, UpdateEncoding(frame, frame->view()->pageEncoding().utf8()); } -void RenderView::didClearWindowObject(WebFrame* frame) { +void RenderViewImpl::didClearWindowObject(WebFrame* frame) { FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidClearWindowObject(frame)); @@ -2475,7 +2486,7 @@ void RenderView::didClearWindowObject(WebFrame* frame) { } } -void RenderView::didCreateDocumentElement(WebFrame* frame) { +void RenderViewImpl::didCreateDocumentElement(WebFrame* frame) { // Notify the browser about non-blank documents loading in the top frame. GURL url = frame->document().url(); if (url.is_valid() && url.spec() != chrome::kAboutBlankURL) { @@ -2487,20 +2498,20 @@ void RenderView::didCreateDocumentElement(WebFrame* frame) { DidCreateDocumentElement(frame)); } -void RenderView::didReceiveTitle(WebFrame* frame, const WebString& title, - WebTextDirection direction) { +void RenderViewImpl::didReceiveTitle(WebFrame* frame, const WebString& title, + WebTextDirection direction) { UpdateTitle(frame, title, direction); // Also check whether we have new encoding name. UpdateEncoding(frame, frame->view()->pageEncoding().utf8()); } -void RenderView::didChangeIcon(WebFrame* frame, WebIconURL::Type type) { +void RenderViewImpl::didChangeIcon(WebFrame* frame, WebIconURL::Type type) { FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidChangeIcon(frame, type)); } -void RenderView::didFinishDocumentLoad(WebFrame* frame) { +void RenderViewImpl::didFinishDocumentLoad(WebFrame* frame) { WebDataSource* ds = frame->dataSource(); NavigationState* navigation_state = NavigationState::FromDataSource(ds); DCHECK(navigation_state); @@ -2515,18 +2526,18 @@ void RenderView::didFinishDocumentLoad(WebFrame* frame) { UpdateEncoding(frame, frame->view()->pageEncoding().utf8()); } -void RenderView::didHandleOnloadEvents(WebFrame* frame) { +void RenderViewImpl::didHandleOnloadEvents(WebFrame* frame) { if (webview()->mainFrame() == frame) { Send(new ViewHostMsg_DocumentOnLoadCompletedInMainFrame(routing_id_, page_id_)); } } -void RenderView::didFailLoad(WebFrame* frame, const WebURLError& error) { +void RenderViewImpl::didFailLoad(WebFrame* frame, const WebURLError& error) { FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidFailLoad(frame, error)); } -void RenderView::didFinishLoad(WebFrame* frame) { +void RenderViewImpl::didFinishLoad(WebFrame* frame) { WebDataSource* ds = frame->dataSource(); NavigationState* navigation_state = NavigationState::FromDataSource(ds); DCHECK(navigation_state); @@ -2537,7 +2548,7 @@ void RenderView::didFinishLoad(WebFrame* frame) { Send(new ViewHostMsg_DidFinishLoad(routing_id_, frame->identifier())); } -void RenderView::didNavigateWithinPage( +void RenderViewImpl::didNavigateWithinPage( WebFrame* frame, bool is_new_navigation) { // If this was a reference fragment navigation that we initiated, then we // could end up having a non-null pending navigation state. We just need to @@ -2558,19 +2569,19 @@ void RenderView::didNavigateWithinPage( UpdateTitle(frame, datasource->pageTitle(), datasource->pageTitleDirection()); } -void RenderView::didUpdateCurrentHistoryItem(WebFrame* frame) { +void RenderViewImpl::didUpdateCurrentHistoryItem(WebFrame* frame) { StartNavStateSyncTimerIfNecessary(); } -void RenderView::assignIdentifierToRequest( +void RenderViewImpl::assignIdentifierToRequest( WebFrame* frame, unsigned identifier, const WebURLRequest& request) { // Ignore } -void RenderView::willSendRequest(WebFrame* frame, - unsigned identifier, - WebURLRequest& request, - const WebURLResponse& redirect_response) { +void RenderViewImpl::willSendRequest(WebFrame* frame, + unsigned identifier, + WebURLRequest& request, + const WebURLResponse& redirect_response) { WebFrame* top_frame = frame->top(); if (!top_frame) top_frame = frame; @@ -2613,7 +2624,7 @@ void RenderView::willSendRequest(WebFrame* frame, request.clearHTTPHeaderField("Referer"); } -void RenderView::didReceiveResponse( +void RenderViewImpl::didReceiveResponse( WebFrame* frame, unsigned identifier, const WebURLResponse& response) { // Only do this for responses that correspond to a provisional data source @@ -2646,7 +2657,7 @@ void RenderView::didReceiveResponse( navigation_state->set_use_error_page(true); } -void RenderView::didFinishResourceLoad( +void RenderViewImpl::didFinishResourceLoad( WebFrame* frame, unsigned identifier) { NavigationState* navigation_state = NavigationState::FromDataSource(frame->dataSource()); @@ -2674,7 +2685,7 @@ void RenderView::didFinishResourceLoad( navigation_state->set_alt_error_page_fetcher( new AltErrorPageResourceFetcher( error_page_url, frame, original_error, - NewCallback(this, &RenderView::AltErrorPageFinished))); + NewCallback(this, &RenderViewImpl::AltErrorPageFinished))); return; } } @@ -2692,12 +2703,12 @@ void RenderView::didFinishResourceLoad( } } -void RenderView::didFailResourceLoad( +void RenderViewImpl::didFailResourceLoad( WebFrame* frame, unsigned identifier, const WebURLError& error) { // Ignore } -void RenderView::didLoadResourceFromMemoryCache( +void RenderViewImpl::didLoadResourceFromMemoryCache( WebFrame* frame, const WebURLRequest& request, const WebURLResponse& response) { // Let the browser know we loaded a resource from the memory cache. This @@ -2710,11 +2721,11 @@ void RenderView::didLoadResourceFromMemoryCache( ResourceType::FromTargetType(request.targetType()))); } -void RenderView::didDisplayInsecureContent(WebFrame* frame) { +void RenderViewImpl::didDisplayInsecureContent(WebFrame* frame) { Send(new ViewHostMsg_DidDisplayInsecureContent(routing_id_)); } -void RenderView::didRunInsecureContent( +void RenderViewImpl::didRunInsecureContent( WebFrame* frame, const WebSecurityOrigin& origin, const WebURL& target) { Send(new ViewHostMsg_DidRunInsecureContent( routing_id_, @@ -2722,31 +2733,31 @@ void RenderView::didRunInsecureContent( target)); } -void RenderView::didAdoptURLLoader(WebKit::WebURLLoader* loader) { +void RenderViewImpl::didAdoptURLLoader(WebKit::WebURLLoader* loader) { webkit_glue::WebURLLoaderImpl* loader_impl = static_cast<webkit_glue::WebURLLoaderImpl*>(loader); loader_impl->UpdateRoutingId(routing_id_); } -void RenderView::didExhaustMemoryAvailableForScript(WebFrame* frame) { +void RenderViewImpl::didExhaustMemoryAvailableForScript(WebFrame* frame) { Send(new ViewHostMsg_JSOutOfMemory(routing_id_)); } -void RenderView::didCreateScriptContext(WebFrame* frame, - v8::Handle<v8::Context> context, - int world_id) { +void RenderViewImpl::didCreateScriptContext(WebFrame* frame, + v8::Handle<v8::Context> context, + int world_id) { content::GetContentClient()->renderer()->DidCreateScriptContext( frame, context, world_id); } -void RenderView::willReleaseScriptContext(WebFrame* frame, - v8::Handle<v8::Context> context, - int world_id) { +void RenderViewImpl::willReleaseScriptContext(WebFrame* frame, + v8::Handle<v8::Context> context, + int world_id) { content::GetContentClient()->renderer()->WillReleaseScriptContext( frame, context, world_id); } -void RenderView::didUpdateLayout(WebFrame* frame) { +void RenderViewImpl::didUpdateLayout(WebFrame* frame) { // We don't always want to set up a timer, only if we've been put in that // mode by getting a |ViewMsg_EnablePreferredSizeChangedMode| // message. @@ -2757,10 +2768,10 @@ void RenderView::didUpdateLayout(WebFrame* frame) { return; check_preferred_size_timer_.Start(FROM_HERE, TimeDelta::FromMilliseconds(0), this, - &RenderView::CheckPreferredSize); + &RenderViewImpl::CheckPreferredSize); } -void RenderView::CheckPreferredSize() { +void RenderViewImpl::CheckPreferredSize() { // We don't always want to send the change messages over IPC, only if we've // been put in that mode by getting a |ViewMsg_EnablePreferredSizeChangedMode| // message. @@ -2784,7 +2795,8 @@ void RenderView::CheckPreferredSize() { preferred_size_)); } -void RenderView::didChangeContentsSize(WebFrame* frame, const WebSize& size) { +void RenderViewImpl::didChangeContentsSize(WebFrame* frame, + const WebSize& size) { if (webview()->mainFrame() != frame) return; WebView* frameView = frame->view(); @@ -2804,7 +2816,7 @@ void RenderView::didChangeContentsSize(WebFrame* frame, const WebSize& size) { } } -void RenderView::UpdateScrollState(WebFrame* frame) { +void RenderViewImpl::UpdateScrollState(WebFrame* frame) { WebSize offset = frame->scrollOffset(); WebSize minimum_offset = frame->minimumScrollOffset(); WebSize maximum_offset = frame->maximumScrollOffset(); @@ -2822,19 +2834,19 @@ void RenderView::UpdateScrollState(WebFrame* frame) { } } -void RenderView::didChangeScrollOffset(WebFrame* frame) { +void RenderViewImpl::didChangeScrollOffset(WebFrame* frame) { StartNavStateSyncTimerIfNecessary(); if (webview()->mainFrame() == frame) UpdateScrollState(frame); } -void RenderView::numberOfWheelEventHandlersChanged(unsigned num_handlers) { +void RenderViewImpl::numberOfWheelEventHandlersChanged(unsigned num_handlers) { Send(new ViewHostMsg_DidChangeNumWheelEvents(routing_id_, num_handlers)); } -void RenderView::reportFindInPageMatchCount(int request_id, int count, - bool final_update) { +void RenderViewImpl::reportFindInPageMatchCount(int request_id, int count, + bool final_update) { int active_match_ordinal = -1; // -1 = don't update active match ordinal if (!count) active_match_ordinal = 0; @@ -2858,9 +2870,9 @@ void RenderView::reportFindInPageMatchCount(int request_id, int count, } } -void RenderView::reportFindInPageSelection(int request_id, - int active_match_ordinal, - const WebRect& selection_rect) { +void RenderViewImpl::reportFindInPageSelection(int request_id, + int active_match_ordinal, + const WebRect& selection_rect) { // Send the search result over to the browser process. Send(new ViewHostMsg_Find_Reply(routing_id_, request_id, @@ -2870,7 +2882,7 @@ void RenderView::reportFindInPageSelection(int request_id, false)); } -void RenderView::openFileSystem( +void RenderViewImpl::openFileSystem( WebFrame* frame, WebFileSystem::Type type, long long size, @@ -2890,7 +2902,7 @@ void RenderView::openFileSystem( size, create, new WebFileSystemCallbackDispatcher(callbacks)); } -void RenderView::queryStorageUsageAndQuota( +void RenderViewImpl::queryStorageUsageAndQuota( WebFrame* frame, WebStorageQuotaType type, WebStorageQuotaCallbacks* callbacks) { @@ -2907,7 +2919,7 @@ void RenderView::queryStorageUsageAndQuota( QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); } -void RenderView::requestStorageQuota( +void RenderViewImpl::requestStorageQuota( WebFrame* frame, WebStorageQuotaType type, unsigned long long requested_size, @@ -2927,7 +2939,7 @@ void RenderView::requestStorageQuota( // WebKit::WebPageSerializerClient implementation ------------------------------ -void RenderView::didSerializeDataForFrame( +void RenderViewImpl::didSerializeDataForFrame( const WebURL& frame_url, const WebCString& data, WebPageSerializerClient::PageSerializationStatus status) { @@ -2940,35 +2952,35 @@ void RenderView::didSerializeDataForFrame( // content::RenderView implementation ------------------------------------------ -bool RenderView::Send(IPC::Message* message) { +bool RenderViewImpl::Send(IPC::Message* message) { return RenderWidget::Send(message); } -int RenderView::GetRoutingId() const { +int RenderViewImpl::GetRoutingId() const { return routing_id_; } -int RenderView::GetPageId() { +int RenderViewImpl::GetPageId() { return page_id_; } -gfx::Size RenderView::GetSize() { +gfx::Size RenderViewImpl::GetSize() { return size(); } -gfx::NativeViewId RenderView::GetHostWindow() { +gfx::NativeViewId RenderViewImpl::GetHostWindow() { return host_window(); } -WebPreferences& RenderView::GetWebkitPreferences() { +WebPreferences& RenderViewImpl::GetWebkitPreferences() { return webkit_preferences_; } -WebKit::WebView* RenderView::GetWebView() { +WebKit::WebView* RenderViewImpl::GetWebView() { return webview(); } -WebKit::WebNode RenderView::GetFocusedNode() const { +WebKit::WebNode RenderViewImpl::GetFocusedNode() const { if (!webview()) return WebNode(); WebFrame* focused_frame = webview()->focusedFrame(); @@ -2981,11 +2993,11 @@ WebKit::WebNode RenderView::GetFocusedNode() const { return WebNode(); } -WebKit::WebNode RenderView::GetContextMenuNode() const { +WebKit::WebNode RenderViewImpl::GetContextMenuNode() const { return context_menu_node_; } -bool RenderView::IsEditableNode(const WebKit::WebNode& node) { +bool RenderViewImpl::IsEditableNode(const WebKit::WebNode& node) { bool is_editable_node = false; if (!node.isNull()) { if (node.isContentEditable()) { @@ -2998,7 +3010,7 @@ bool RenderView::IsEditableNode(const WebKit::WebNode& node) { return is_editable_node; } -WebKit::WebPlugin* RenderView::CreatePlugin( +WebKit::WebPlugin* RenderViewImpl::CreatePlugin( WebKit::WebFrame* frame, const webkit::WebPluginInfo& info, const WebKit::WebPluginParams& params) { @@ -3017,10 +3029,10 @@ WebKit::WebPlugin* RenderView::CreatePlugin( frame, params, info.path, AsWeakPtr()); } -void RenderView::EvaluateScript(const string16& frame_xpath, - const string16& jscript, - int id, - bool notify_result) { +void RenderViewImpl::EvaluateScript(const string16& frame_xpath, + const string16& jscript, + int id, + bool notify_result) { v8::Handle<v8::Value> result; WebFrame* web_frame = GetChildFrame(frame_xpath); if (web_frame) @@ -3042,43 +3054,43 @@ void RenderView::EvaluateScript(const string16& frame_xpath, } } -bool RenderView::ShouldDisplayScrollbars(int width, int height) const { +bool RenderViewImpl::ShouldDisplayScrollbars(int width, int height) const { return (!send_preferred_size_changes_ || (disable_scrollbars_size_limit_.width() <= width || disable_scrollbars_size_limit_.height() <= height)); } -int RenderView::GetEnabledBindings() { +int RenderViewImpl::GetEnabledBindings() { return enabled_bindings_; } -void RenderView::SetEnabledBindings(int enabled_bindings) { +void RenderViewImpl::SetEnabledBindings(int enabled_bindings) { enabled_bindings_ = enabled_bindings; } -bool RenderView::GetContentStateImmediately() { +bool RenderViewImpl::GetContentStateImmediately() { return send_content_state_immediately_; } -float RenderView::GetFilteredTimePerFrame() { +float RenderViewImpl::GetFilteredTimePerFrame() { return filtered_time_per_frame(); } -void RenderView::ShowContextMenu(WebKit::WebFrame* frame, - const WebKit::WebContextMenuData& data) { +void RenderViewImpl::ShowContextMenu(WebKit::WebFrame* frame, + const WebKit::WebContextMenuData& data) { showContextMenu(frame, data); } -WebKit::WebPageVisibilityState RenderView::GetVisibilityState() const { +WebKit::WebPageVisibilityState RenderViewImpl::GetVisibilityState() const { return visibilityState(); } -void RenderView::RunModalAlertDialog(WebKit::WebFrame* frame, - const WebKit::WebString& message) { +void RenderViewImpl::RunModalAlertDialog(WebKit::WebFrame* frame, + const WebKit::WebString& message) { return runModalAlertDialog(frame, message); } -void RenderView::LoadURLExternally( +void RenderViewImpl::LoadURLExternally( WebKit::WebFrame* frame, const WebKit::WebURLRequest& request, WebKit::WebNavigationPolicy policy) { @@ -3087,7 +3099,7 @@ void RenderView::LoadURLExternally( // webkit_glue::WebPluginPageDelegate ------------------------------------------ -webkit::npapi::WebPluginDelegate* RenderView::CreatePluginDelegate( +webkit::npapi::WebPluginDelegate* RenderViewImpl::CreatePluginDelegate( const FilePath& file_path, const std::string& mime_type) { if (!PluginChannelHost::IsListening()) @@ -3108,38 +3120,39 @@ webkit::npapi::WebPluginDelegate* RenderView::CreatePluginDelegate( return new WebPluginDelegateProxy(mime_type, AsWeakPtr()); } -void RenderView::CreatedPluginWindow(gfx::PluginWindowHandle window) { +void RenderViewImpl::CreatedPluginWindow(gfx::PluginWindowHandle window) { #if defined(USE_X11) Send(new ViewHostMsg_CreatePluginContainer(routing_id(), window)); #endif } -void RenderView::WillDestroyPluginWindow(gfx::PluginWindowHandle window) { +void RenderViewImpl::WillDestroyPluginWindow(gfx::PluginWindowHandle window) { #if defined(USE_X11) Send(new ViewHostMsg_DestroyPluginContainer(routing_id(), window)); #endif CleanupWindowInPluginMoves(window); } -void RenderView::DidMovePlugin(const webkit::npapi::WebPluginGeometry& move) { +void RenderViewImpl::DidMovePlugin( + const webkit::npapi::WebPluginGeometry& move) { SchedulePluginMove(move); } -void RenderView::DidStartLoadingForPlugin() { +void RenderViewImpl::DidStartLoadingForPlugin() { // TODO(darin): Make is_loading_ be a counter! didStartLoading(); } -void RenderView::DidStopLoadingForPlugin() { +void RenderViewImpl::DidStopLoadingForPlugin() { // TODO(darin): Make is_loading_ be a counter! didStopLoading(); } -WebCookieJar* RenderView::GetCookieJar() { +WebCookieJar* RenderViewImpl::GetCookieJar() { return &cookie_jar_; } -void RenderView::SyncNavigationState() { +void RenderViewImpl::SyncNavigationState() { if (!webview()) return; @@ -3151,7 +3164,7 @@ void RenderView::SyncNavigationState() { routing_id_, page_id_, webkit_glue::HistoryItemToString(item))); } -void RenderView::SyncSelectionIfRequired() { +void RenderViewImpl::SyncSelectionIfRequired() { WebFrame* frame = webview()->focusedFrame(); const std::string& text = frame->selectionAsText().utf8(); @@ -3178,8 +3191,8 @@ void RenderView::SyncSelectionIfRequired() { start, end)); } -GURL RenderView::GetAlternateErrorPageURL(const GURL& failed_url, - ErrorPageType error_type) { +GURL RenderViewImpl::GetAlternateErrorPageURL(const GURL& failed_url, + ErrorPageType error_type) { if (failed_url.SchemeIsSecure()) { // If the URL that failed was secure, then the embedding web page was not // expecting a network attacker to be able to manipulate its contents. As @@ -3235,14 +3248,14 @@ GURL RenderView::GetAlternateErrorPageURL(const GURL& failed_url, return url; } -GURL RenderView::GetOpenerUrl() const { +GURL RenderViewImpl::GetOpenerUrl() const { if (opener_id_ == MSG_ROUTING_NONE || opener_suppressed_) return GURL(); else return creator_url_; } -WebUIBindings* RenderView::GetWebUIBindings() { +WebUIBindings* RenderViewImpl::GetWebUIBindings() { if (!web_ui_bindings_.get()) { web_ui_bindings_.reset(new WebUIBindings( static_cast<content::RenderView*>(this), routing_id_)); @@ -3250,12 +3263,12 @@ WebUIBindings* RenderView::GetWebUIBindings() { return web_ui_bindings_.get(); } -WebKit::WebPlugin* RenderView::GetWebPluginFromPluginDocument() { +WebKit::WebPlugin* RenderViewImpl::GetWebPluginFromPluginDocument() { return webview()->mainFrame()->document().to<WebPluginDocument>().plugin(); } -void RenderView::OnFind(int request_id, const string16& search_text, - const WebFindOptions& options) { +void RenderViewImpl::OnFind(int request_id, const string16& search_text, + const WebFindOptions& options) { WebFrame* main_frame = webview()->mainFrame(); // Check if the plugin still exists in the document. @@ -3382,7 +3395,7 @@ void RenderView::OnFind(int request_id, const string16& search_text, } } -void RenderView::OnStopFinding(const ViewMsg_StopFinding_Params& params) { +void RenderViewImpl::OnStopFinding(const ViewMsg_StopFinding_Params& params) { WebView* view = webview(); if (!view) return; @@ -3417,7 +3430,7 @@ void RenderView::OnStopFinding(const ViewMsg_StopFinding_Params& params) { } } -void RenderView::OnFindReplyAck() { +void RenderViewImpl::OnFindReplyAck() { // Check if there is any queued up request waiting to be sent. if (queued_find_reply_message_.get()) { // Send the search result over to the browser process. @@ -3425,7 +3438,7 @@ void RenderView::OnFindReplyAck() { } } -void RenderView::OnZoom(PageZoom::Function function) { +void RenderViewImpl::OnZoom(PageZoom::Function function) { if (!webview()) // Not sure if this can happen, but no harm in being safe. return; @@ -3466,7 +3479,7 @@ void RenderView::OnZoom(PageZoom::Function function) { zoomLevelChanged(); } -void RenderView::OnSetZoomLevel(double zoom_level) { +void RenderViewImpl::OnSetZoomLevel(double zoom_level) { // Don't set zoom level for full-page plugin since they don't use the same // zoom settings. if (webview()->mainFrame()->document().isPluginDocument()) @@ -3477,25 +3490,25 @@ void RenderView::OnSetZoomLevel(double zoom_level) { zoomLevelChanged(); } -void RenderView::OnSetZoomLevelForLoadingURL(const GURL& url, - double zoom_level) { +void RenderViewImpl::OnSetZoomLevelForLoadingURL(const GURL& url, + double zoom_level) { host_zoom_levels_[url] = zoom_level; } -void RenderView::OnExitFullscreen() { +void RenderViewImpl::OnExitFullscreen() { webview()->exitFullscreen(); } -void RenderView::OnSetPageEncoding(const std::string& encoding_name) { +void RenderViewImpl::OnSetPageEncoding(const std::string& encoding_name) { webview()->setPageEncoding(WebString::fromUTF8(encoding_name)); } -void RenderView::OnResetPageEncodingToDefault() { +void RenderViewImpl::OnResetPageEncodingToDefault() { WebString no_encoding; webview()->setPageEncoding(no_encoding); } -WebFrame* RenderView::GetChildFrame(const string16& xpath) const { +WebFrame* RenderViewImpl::GetChildFrame(const string16& xpath) const { if (xpath.empty()) return webview()->mainFrame(); @@ -3516,15 +3529,15 @@ WebFrame* RenderView::GetChildFrame(const string16& xpath) const { return frame; } -void RenderView::OnScriptEvalRequest(const string16& frame_xpath, - const string16& jscript, - int id, - bool notify_result) { +void RenderViewImpl::OnScriptEvalRequest(const string16& frame_xpath, + const string16& jscript, + int id, + bool notify_result) { EvaluateScript(frame_xpath, jscript, id, notify_result); } -void RenderView::OnCSSInsertRequest(const string16& frame_xpath, - const std::string& css) { +void RenderViewImpl::OnCSSInsertRequest(const string16& frame_xpath, + const std::string& css) { WebFrame* frame = GetChildFrame(frame_xpath); if (!frame) return; @@ -3534,24 +3547,24 @@ void RenderView::OnCSSInsertRequest(const string16& frame_xpath, WebDocument::UserStyleAuthorLevel); } -void RenderView::OnAllowBindings(int enabled_bindings_flags) { +void RenderViewImpl::OnAllowBindings(int enabled_bindings_flags) { enabled_bindings_ |= enabled_bindings_flags; } -void RenderView::OnSetWebUIProperty(const std::string& name, - const std::string& value) { +void RenderViewImpl::OnSetWebUIProperty(const std::string& name, + const std::string& value) { DCHECK(BindingsPolicy::is_web_ui_enabled(enabled_bindings_)); GetWebUIBindings()->SetProperty(name, value); } -void RenderView::OnReservePageIDRange(int size_of_range) { +void RenderViewImpl::OnReservePageIDRange(int size_of_range) { next_page_id_ += size_of_range + 1; } -void RenderView::OnDragTargetDragEnter(const WebDropData& drop_data, - const gfx::Point& client_point, - const gfx::Point& screen_point, - WebDragOperationsMask ops) { +void RenderViewImpl::OnDragTargetDragEnter(const WebDropData& drop_data, + const gfx::Point& client_point, + const gfx::Point& screen_point, + WebDragOperationsMask ops) { WebDragOperation operation = webview()->dragTargetDragEnter( drop_data.ToDragData(), client_point, @@ -3561,9 +3574,9 @@ void RenderView::OnDragTargetDragEnter(const WebDropData& drop_data, Send(new DragHostMsg_UpdateDragCursor(routing_id_, operation)); } -void RenderView::OnDragTargetDragOver(const gfx::Point& client_point, - const gfx::Point& screen_point, - WebDragOperationsMask ops) { +void RenderViewImpl::OnDragTargetDragOver(const gfx::Point& client_point, + const gfx::Point& screen_point, + WebDragOperationsMask ops) { WebDragOperation operation = webview()->dragTargetDragOver( client_point, screen_point, @@ -3572,21 +3585,21 @@ void RenderView::OnDragTargetDragOver(const gfx::Point& client_point, Send(new DragHostMsg_UpdateDragCursor(routing_id_, operation)); } -void RenderView::OnDragTargetDragLeave() { +void RenderViewImpl::OnDragTargetDragLeave() { webview()->dragTargetDragLeave(); } -void RenderView::OnDragTargetDrop(const gfx::Point& client_point, - const gfx::Point& screen_point) { +void RenderViewImpl::OnDragTargetDrop(const gfx::Point& client_point, + const gfx::Point& screen_point) { webview()->dragTargetDrop(client_point, screen_point); Send(new DragHostMsg_TargetDrop_ACK(routing_id_)); } -void RenderView::OnDragSourceEndedOrMoved(const gfx::Point& client_point, - const gfx::Point& screen_point, - bool ended, - WebDragOperation op) { +void RenderViewImpl::OnDragSourceEndedOrMoved(const gfx::Point& client_point, + const gfx::Point& screen_point, + bool ended, + WebDragOperation op) { if (ended) { webview()->dragSourceEndedAt(client_point, screen_point, op); } else { @@ -3594,25 +3607,25 @@ void RenderView::OnDragSourceEndedOrMoved(const gfx::Point& client_point, } } -void RenderView::OnDragSourceSystemDragEnded() { +void RenderViewImpl::OnDragSourceSystemDragEnded() { webview()->dragSourceSystemDragEnded(); } -void RenderView::OnUpdateWebPreferences(const WebPreferences& prefs) { +void RenderViewImpl::OnUpdateWebPreferences(const WebPreferences& prefs) { webkit_preferences_ = prefs; webkit_preferences_.Apply(webview()); } -void RenderView::OnUpdateRemoteAccessClientFirewallTraversal( +void RenderViewImpl::OnUpdateRemoteAccessClientFirewallTraversal( const std::string& policy) { pepper_delegate_.PublishPolicy(policy); } -void RenderView::OnSetAltErrorPageURL(const GURL& url) { +void RenderViewImpl::OnSetAltErrorPageURL(const GURL& url) { alternate_error_page_url_ = url; } -void RenderView::OnCustomContextMenuAction( +void RenderViewImpl::OnCustomContextMenuAction( const webkit_glue::CustomContextMenuContext& custom_context, unsigned action) { if (custom_context.is_pepper_menu) @@ -3623,7 +3636,7 @@ void RenderView::OnCustomContextMenuAction( ContextMenuAction(action)); } -void RenderView::OnEnumerateDirectoryResponse( +void RenderViewImpl::OnEnumerateDirectoryResponse( int id, const std::vector<FilePath>& paths) { if (!enumeration_completions_[id]) @@ -3637,7 +3650,7 @@ void RenderView::OnEnumerateDirectoryResponse( enumeration_completions_.erase(id); } -void RenderView::OnFileChooserResponse(const std::vector<FilePath>& paths) { +void RenderViewImpl::OnFileChooserResponse(const std::vector<FilePath>& paths) { // This could happen if we navigated to a different page before the user // closed the chooser. if (file_chooser_completions_.empty()) @@ -3658,7 +3671,7 @@ void RenderView::OnFileChooserResponse(const std::vector<FilePath>& paths) { } } -void RenderView::OnEnablePreferredSizeChangedMode(int flags) { +void RenderViewImpl::OnEnablePreferredSizeChangedMode(int flags) { DCHECK(flags != kPreferredSizeNothing); if (send_preferred_size_changes_) return; @@ -3670,12 +3683,13 @@ void RenderView::OnEnablePreferredSizeChangedMode(int flags) { didUpdateLayout(webview()->mainFrame()); } -void RenderView::OnDisableScrollbarsForSmallWindows( +void RenderViewImpl::OnDisableScrollbarsForSmallWindows( const gfx::Size& disable_scrollbar_size_limit) { disable_scrollbars_size_limit_ = disable_scrollbar_size_limit; } -void RenderView::OnSetRendererPrefs(const RendererPreferences& renderer_prefs) { +void RenderViewImpl::OnSetRendererPrefs( + const RendererPreferences& renderer_prefs) { renderer_preferences_ = renderer_prefs; UpdateFontRenderingFromRendererPrefs(); #if defined(TOOLKIT_USES_GTK) @@ -3702,13 +3716,13 @@ void RenderView::OnSetRendererPrefs(const RendererPreferences& renderer_prefs) { #endif } -void RenderView::OnMediaPlayerActionAt(const gfx::Point& location, - const WebMediaPlayerAction& action) { +void RenderViewImpl::OnMediaPlayerActionAt(const gfx::Point& location, + const WebMediaPlayerAction& action) { if (webview()) webview()->performMediaPlayerAction(action, location); } -void RenderView::OnGetAllSavableResourceLinksForCurrentPage( +void RenderViewImpl::OnGetAllSavableResourceLinksForCurrentPage( const GURL& page_url) { // Prepare list to storage all savable resource links. std::vector<GURL> resources_list; @@ -3737,7 +3751,7 @@ void RenderView::OnGetAllSavableResourceLinksForCurrentPage( frames_list)); } -void RenderView::OnGetSerializedHtmlDataForCurrentPageWithLocalLinks( +void RenderViewImpl::OnGetSerializedHtmlDataForCurrentPageWithLocalLinks( const std::vector<GURL>& links, const std::vector<FilePath>& local_paths, const FilePath& local_directory_name) { @@ -3756,12 +3770,12 @@ void RenderView::OnGetSerializedHtmlDataForCurrentPageWithLocalLinks( local_directory_name)); } -void RenderView::OnShouldClose() { +void RenderViewImpl::OnShouldClose() { bool should_close = webview()->dispatchBeforeUnloadEvent(); Send(new ViewHostMsg_ShouldClose_ACK(routing_id_, should_close)); } -void RenderView::OnSwapOut(const ViewMsg_SwapOut_Params& params) { +void RenderViewImpl::OnSwapOut(const ViewMsg_SwapOut_Params& params) { if (is_swapped_out_) return; @@ -3792,7 +3806,7 @@ void RenderView::OnSwapOut(const ViewMsg_SwapOut_Params& params) { Send(new ViewHostMsg_SwapOut_ACK(routing_id_, params)); } -void RenderView::OnClosePage() { +void RenderViewImpl::OnClosePage() { // TODO(creis): We'd rather use webview()->Close() here, but that currently // sets the WebView's delegate_ to NULL, preventing any JavaScript dialogs // in the onunload handler from appearing. For now, we're bypassing that and @@ -3805,7 +3819,7 @@ void RenderView::OnClosePage() { Send(new ViewHostMsg_ClosePage_ACK(routing_id_)); } -void RenderView::OnThemeChanged() { +void RenderViewImpl::OnThemeChanged() { #if defined(OS_WIN) gfx::NativeThemeWin::instance()->CloseHandles(); if (webview()) @@ -3816,16 +3830,16 @@ void RenderView::OnThemeChanged() { #endif } -void RenderView::OnDisassociateFromPopupCount() { +void RenderViewImpl::OnDisassociateFromPopupCount() { if (decrement_shared_popup_at_destruction_) shared_popup_counter_->data--; shared_popup_counter_ = new SharedRenderViewCounter(0); decrement_shared_popup_at_destruction_ = false; } -bool RenderView::MaybeLoadAlternateErrorPage(WebFrame* frame, - const WebURLError& error, - bool replace) { +bool RenderViewImpl::MaybeLoadAlternateErrorPage(WebFrame* frame, + const WebURLError& error, + bool replace) { // We only show alternate error pages in the main frame. They are // intended to assist the user when navigating, so there is not much // value in showing them for failed subframes. Ideally, we would be @@ -3864,26 +3878,26 @@ bool RenderView::MaybeLoadAlternateErrorPage(WebFrame* frame, navigation_state->set_alt_error_page_fetcher( new AltErrorPageResourceFetcher( error_page_url, frame, error, - NewCallback(this, &RenderView::AltErrorPageFinished))); + NewCallback(this, &RenderViewImpl::AltErrorPageFinished))); return true; } -void RenderView::AltErrorPageFinished(WebFrame* frame, - const WebURLError& original_error, - const std::string& html) { +void RenderViewImpl::AltErrorPageFinished(WebFrame* frame, + const WebURLError& original_error, + const std::string& html) { // Here, we replace the blank page we loaded previously. // If we failed to download the alternate error page, LoadNavigationErrorPage // will simply display a default error page. LoadNavigationErrorPage(frame, WebURLRequest(), original_error, html, true); } -void RenderView::OnMoveOrResizeStarted() { +void RenderViewImpl::OnMoveOrResizeStarted() { if (webview()) webview()->hidePopups(); } -void RenderView::OnResize(const gfx::Size& new_size, - const gfx::Rect& resizer_rect) { +void RenderViewImpl::OnResize(const gfx::Size& new_size, + const gfx::Rect& resizer_rect) { if (webview()) { webview()->hidePopups(); if (send_preferred_size_changes_) { @@ -3896,12 +3910,12 @@ void RenderView::OnResize(const gfx::Size& new_size, RenderWidget::OnResize(new_size, resizer_rect); } -void RenderView::DidInitiatePaint() { +void RenderViewImpl::DidInitiatePaint() { // Notify the pepper plugins that we started painting. pepper_delegate_.ViewInitiatedPaint(); } -void RenderView::DidFlushPaint() { +void RenderViewImpl::DidFlushPaint() { // Notify any pepper plugins that we painted. This will call into the plugin, // and we it may ask to close itself as a result. This will, in turn, modify // our set, possibly invalidating the iterator. So we iterate on a copy that @@ -3934,19 +3948,19 @@ void RenderView::DidFlushPaint() { #endif } -void RenderView::OnViewContextSwapBuffersPosted() { +void RenderViewImpl::OnViewContextSwapBuffersPosted() { RenderWidget::OnSwapBuffersPosted(); } -void RenderView::OnViewContextSwapBuffersComplete() { +void RenderViewImpl::OnViewContextSwapBuffersComplete() { RenderWidget::OnSwapBuffersComplete(); } -void RenderView::OnViewContextSwapBuffersAborted() { +void RenderViewImpl::OnViewContextSwapBuffersAborted() { RenderWidget::OnSwapBuffersAborted(); } -webkit::ppapi::PluginInstance* RenderView::GetBitmapForOptimizedPluginPaint( +webkit::ppapi::PluginInstance* RenderViewImpl::GetBitmapForOptimizedPluginPaint( const gfx::Rect& paint_bounds, TransportDIB** dib, gfx::Rect* location, @@ -3955,24 +3969,24 @@ webkit::ppapi::PluginInstance* RenderView::GetBitmapForOptimizedPluginPaint( paint_bounds, dib, location, clip); } -gfx::Point RenderView::GetScrollOffset() { +gfx::Point RenderViewImpl::GetScrollOffset() { WebSize scroll_offset = webview()->mainFrame()->scrollOffset(); return gfx::Point(scroll_offset.width, scroll_offset.height); } -void RenderView::OnClearFocusedNode() { +void RenderViewImpl::OnClearFocusedNode() { if (webview()) webview()->clearFocusedNode(); } -void RenderView::OnSetBackground(const SkBitmap& background) { +void RenderViewImpl::OnSetBackground(const SkBitmap& background) { if (webview()) webview()->setIsTransparent(!background.empty()); SetBackground(background); } -void RenderView::OnSetActive(bool active) { +void RenderViewImpl::OnSetActive(bool active) { if (webview()) webview()->setIsActive(active); @@ -3986,7 +4000,7 @@ void RenderView::OnSetActive(bool active) { } #if defined(OS_MACOSX) -void RenderView::OnSetWindowVisibility(bool visible) { +void RenderViewImpl::OnSetWindowVisibility(bool visible) { // Inform plugins that their container has changed visibility. std::set<WebPluginDelegateProxy*>::iterator plugin_it; for (plugin_it = plugin_delegates_.begin(); @@ -3995,8 +4009,8 @@ void RenderView::OnSetWindowVisibility(bool visible) { } } -void RenderView::OnWindowFrameChanged(const gfx::Rect& window_frame, - const gfx::Rect& view_frame) { +void RenderViewImpl::OnWindowFrameChanged(const gfx::Rect& window_frame, + const gfx::Rect& view_frame) { // Inform plugins that their window's frame has changed. std::set<WebPluginDelegateProxy*>::iterator plugin_it; for (plugin_it = plugin_delegates_.begin(); @@ -4005,8 +4019,8 @@ void RenderView::OnWindowFrameChanged(const gfx::Rect& window_frame, } } -void RenderView::OnPluginImeCompositionCompleted(const string16& text, - int plugin_id) { +void RenderViewImpl::OnPluginImeCompositionCompleted(const string16& text, + int plugin_id) { // WebPluginDelegateProxy is responsible for figuring out if this event // applies to it or not, so inform all the delegates. std::set<WebPluginDelegateProxy*>::iterator plugin_it; @@ -4017,35 +4031,35 @@ void RenderView::OnPluginImeCompositionCompleted(const string16& text, } #endif // OS_MACOSX -void RenderView::OnSetEditCommandsForNextKeyEvent( +void RenderViewImpl::OnSetEditCommandsForNextKeyEvent( const EditCommands& edit_commands) { edit_commands_ = edit_commands; } -void RenderView::Close() { +void RenderViewImpl::Close() { // We need to grab a pointer to the doomed WebView before we destroy it. WebView* doomed = webview(); RenderWidget::Close(); g_view_map.Get().erase(doomed); } -void RenderView::DidHandleKeyEvent() { +void RenderViewImpl::DidHandleKeyEvent() { edit_commands_.clear(); } -bool RenderView::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { +bool RenderViewImpl::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { return pepper_delegate_.HandleMouseEvent(event); } -void RenderView::DidHandleMouseEvent(const WebKit::WebMouseEvent& event) { +void RenderViewImpl::DidHandleMouseEvent(const WebKit::WebMouseEvent& event) { FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidHandleMouseEvent(event)); } -void RenderView::DidHandleTouchEvent(const WebTouchEvent& event) { +void RenderViewImpl::DidHandleTouchEvent(const WebTouchEvent& event) { FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidHandleTouchEvent(event)); } -void RenderView::OnWasHidden() { +void RenderViewImpl::OnWasHidden() { RenderWidget::OnWasHidden(); if (webview()) { @@ -4064,7 +4078,7 @@ void RenderView::OnWasHidden() { #endif // OS_MACOSX } -void RenderView::OnWasRestored(bool needs_repainting) { +void RenderViewImpl::OnWasRestored(bool needs_repainting) { RenderWidget::OnWasRestored(needs_repainting); if (webview()) { @@ -4083,7 +4097,7 @@ void RenderView::OnWasRestored(bool needs_repainting) { #endif // OS_MACOSX } -bool RenderView::SupportsAsynchronousSwapBuffers() { +bool RenderViewImpl::SupportsAsynchronousSwapBuffers() { if (WebWidgetHandlesCompositorScheduling()) return false; @@ -4095,7 +4109,7 @@ bool RenderView::SupportsAsynchronousSwapBuffers() { std::string::npos; } -void RenderView::OnSetFocus(bool enable) { +void RenderViewImpl::OnSetFocus(bool enable) { RenderWidget::OnSetFocus(enable); if (webview() && webview()->isActive()) { @@ -4117,15 +4131,15 @@ void RenderView::OnSetFocus(bool enable) { } } -void RenderView::PpapiPluginFocusChanged() { +void RenderViewImpl::PpapiPluginFocusChanged() { UpdateInputMethod(); } -void RenderView::RequestRemoteAccessClientFirewallTraversal() { +void RenderViewImpl::RequestRemoteAccessClientFirewallTraversal() { Send(new ViewHostMsg_RequestRemoteAccessClientFirewallTraversal(routing_id_)); } -void RenderView::OnImeSetComposition( +void RenderViewImpl::OnImeSetComposition( const string16& text, const std::vector<WebKit::WebCompositionUnderline>& underlines, int selection_start, @@ -4170,7 +4184,7 @@ void RenderView::OnImeSetComposition( } } -void RenderView::OnImeConfirmComposition(const string16& text) { +void RenderViewImpl::OnImeConfirmComposition(const string16& text) { if (pepper_delegate_.IsPluginFocused()) { // TODO(kinaba) Until PPAPI has an interface for handling IME events, we // send character events. @@ -4204,7 +4218,7 @@ void RenderView::OnImeConfirmComposition(const string16& text) { } } -ui::TextInputType RenderView::GetTextInputType() { +ui::TextInputType RenderViewImpl::GetTextInputType() { if (pepper_delegate_.IsPluginFocused()) { #if !defined(TOUCH_UI) // TODO(kinaba) Until PPAPI has an interface for handling IME events, we @@ -4219,7 +4233,7 @@ ui::TextInputType RenderView::GetTextInputType() { return RenderWidget::GetTextInputType(); } -bool RenderView::CanComposeInline() { +bool RenderViewImpl::CanComposeInline() { if (pepper_delegate_.IsPluginFocused()) { // TODO(kinaba) Until PPAPI has an interface for handling IME events, there // is no way for the browser to know whether the plugin is capable of @@ -4231,7 +4245,7 @@ bool RenderView::CanComposeInline() { } #if defined(OS_WIN) -void RenderView::PluginFocusChanged(bool focused, int plugin_id) { +void RenderViewImpl::PluginFocusChanged(bool focused, int plugin_id) { if (focused) focused_plugin_id_ = plugin_id; else @@ -4240,13 +4254,13 @@ void RenderView::PluginFocusChanged(bool focused, int plugin_id) { #endif #if defined(OS_MACOSX) -void RenderView::PluginFocusChanged(bool focused, int plugin_id) { +void RenderViewImpl::PluginFocusChanged(bool focused, int plugin_id) { IPC::Message* msg = new ViewHostMsg_PluginFocusChanged(routing_id(), focused, plugin_id); Send(msg); } -void RenderView::StartPluginIme() { +void RenderViewImpl::StartPluginIme() { IPC::Message* msg = new ViewHostMsg_StartPluginIme(routing_id()); // This message can be sent during event-handling, and needs to be delivered // within that context. @@ -4254,7 +4268,7 @@ void RenderView::StartPluginIme() { Send(msg); } -gfx::PluginWindowHandle RenderView::AllocateFakePluginWindowHandle( +gfx::PluginWindowHandle RenderViewImpl::AllocateFakePluginWindowHandle( bool opaque, bool root) { gfx::PluginWindowHandle window = NULL; Send(new ViewHostMsg_AllocateFakePluginWindowHandle( @@ -4265,7 +4279,8 @@ gfx::PluginWindowHandle RenderView::AllocateFakePluginWindowHandle( return window; } -void RenderView::DestroyFakePluginWindowHandle(gfx::PluginWindowHandle window) { +void RenderViewImpl::DestroyFakePluginWindowHandle( + gfx::PluginWindowHandle window) { if (window && fake_plugin_window_handles_.find(window) != fake_plugin_window_handles_.end()) { Send(new ViewHostMsg_DestroyFakePluginWindowHandle(routing_id(), window)); @@ -4273,15 +4288,16 @@ void RenderView::DestroyFakePluginWindowHandle(gfx::PluginWindowHandle window) { } } -void RenderView::AcceleratedSurfaceSetIOSurface(gfx::PluginWindowHandle window, - int32 width, - int32 height, - uint64 io_surface_identifier) { +void RenderViewImpl::AcceleratedSurfaceSetIOSurface( + gfx::PluginWindowHandle window, + int32 width, + int32 height, + uint64 io_surface_identifier) { Send(new ViewHostMsg_AcceleratedSurfaceSetIOSurface( routing_id(), window, width, height, io_surface_identifier)); } -void RenderView::AcceleratedSurfaceSetTransportDIB( +void RenderViewImpl::AcceleratedSurfaceSetTransportDIB( gfx::PluginWindowHandle window, int32 width, int32 height, @@ -4290,7 +4306,7 @@ void RenderView::AcceleratedSurfaceSetTransportDIB( routing_id(), window, width, height, transport_dib)); } -TransportDIB::Handle RenderView::AcceleratedSurfaceAllocTransportDIB( +TransportDIB::Handle RenderViewImpl::AcceleratedSurfaceAllocTransportDIB( size_t size) { TransportDIB::Handle dib_handle; // Assume this is a synchronous RPC. @@ -4300,18 +4316,19 @@ TransportDIB::Handle RenderView::AcceleratedSurfaceAllocTransportDIB( return TransportDIB::DefaultHandleValue(); } -void RenderView::AcceleratedSurfaceFreeTransportDIB(TransportDIB::Id dib_id) { +void RenderViewImpl::AcceleratedSurfaceFreeTransportDIB( + TransportDIB::Id dib_id) { Send(new ViewHostMsg_FreeTransportDIB(dib_id)); } -void RenderView::AcceleratedSurfaceBuffersSwapped( +void RenderViewImpl::AcceleratedSurfaceBuffersSwapped( gfx::PluginWindowHandle window, uint64 surface_id) { Send(new ViewHostMsg_AcceleratedSurfaceBuffersSwapped( routing_id(), window, surface_id)); } #endif -bool RenderView::ScheduleFileChooser( +bool RenderViewImpl::ScheduleFileChooser( const ViewHostMsg_RunFileChooser_Params& params, WebFileChooserCompletion* completion) { static const size_t kMaximumPendingFileChooseRequests = 4; @@ -4336,26 +4353,27 @@ bool RenderView::ScheduleFileChooser( return true; } -WebKit::WebGeolocationClient* RenderView::geolocationClient() { +WebKit::WebGeolocationClient* RenderViewImpl::geolocationClient() { if (!geolocation_dispatcher_) geolocation_dispatcher_ = new GeolocationDispatcher(this); return geolocation_dispatcher_; } -WebKit::WebSpeechInputController* RenderView::speechInputController( +WebKit::WebSpeechInputController* RenderViewImpl::speechInputController( WebKit::WebSpeechInputListener* listener) { if (!speech_input_dispatcher_) speech_input_dispatcher_ = new SpeechInputDispatcher(this, listener); return speech_input_dispatcher_; } -WebKit::WebDeviceOrientationClient* RenderView::deviceOrientationClient() { +WebKit::WebDeviceOrientationClient* RenderViewImpl::deviceOrientationClient() { if (!device_orientation_dispatcher_) device_orientation_dispatcher_ = new DeviceOrientationDispatcher(this); return device_orientation_dispatcher_; } -void RenderView::zoomLimitsChanged(double minimum_level, double maximum_level) { +void RenderViewImpl::zoomLimitsChanged(double minimum_level, + double maximum_level) { // For now, don't remember plugin zoom values. We don't want to mix them with // normal web content (i.e. a fixed layout plugin would usually want them // different). @@ -4370,7 +4388,7 @@ void RenderView::zoomLimitsChanged(double minimum_level, double maximum_level) { routing_id_, minimum_percent, maximum_percent, remember)); } -void RenderView::zoomLevelChanged() { +void RenderViewImpl::zoomLevelChanged() { bool remember = !webview()->mainFrame()->document().isPluginDocument(); #if defined(TOUCH_UI) float zoom_level = @@ -4385,10 +4403,10 @@ void RenderView::zoomLevelChanged() { GURL(webview()->mainFrame()->document().url()))); } -void RenderView::registerProtocolHandler(const WebString& scheme, - const WebString& base_url, - const WebString& url, - const WebString& title) { +void RenderViewImpl::registerProtocolHandler(const WebString& scheme, + const WebString& base_url, + const WebString& url, + const WebString& title) { GURL base(base_url); GURL absolute_url = base.Resolve(UTF16ToUTF8(url)); if (base.GetOrigin() != absolute_url.GetOrigin()) { @@ -4400,10 +4418,10 @@ void RenderView::registerProtocolHandler(const WebString& scheme, title)); } -void RenderView::registerIntentHandler(const WebString& action, - const WebString& type, - const WebString& href, - const WebString& title) { +void RenderViewImpl::registerIntentHandler(const WebString& action, + const WebString& type, + const WebString& href, + const WebString& title) { Send(new ViewHostMsg_RegisterIntentHandler(routing_id_, action, type, @@ -4411,7 +4429,7 @@ void RenderView::registerIntentHandler(const WebString& action, title)); } -WebKit::WebPageVisibilityState RenderView::visibilityState() const { +WebKit::WebPageVisibilityState RenderViewImpl::visibilityState() const { WebKit::WebPageVisibilityState current_state = is_hidden() ? WebKit::WebPageVisibilityStateHidden : WebKit::WebPageVisibilityStateVisible; @@ -4423,10 +4441,10 @@ WebKit::WebPageVisibilityState RenderView::visibilityState() const { return current_state; } -void RenderView::startActivity(const WebKit::WebString& action, - const WebKit::WebString& type, - const WebKit::WebString& data, - int intent_id) { +void RenderViewImpl::startActivity(const WebKit::WebString& action, + const WebKit::WebString& type, + const WebKit::WebString& data, + int intent_id) { webkit_glue::WebIntentData intent_data; intent_data.action = action; intent_data.type = type; @@ -4435,7 +4453,7 @@ void RenderView::startActivity(const WebKit::WebString& action, routing_id_, intent_data, intent_id)); } -bool RenderView::IsNonLocalTopLevelNavigation( +bool RenderViewImpl::IsNonLocalTopLevelNavigation( const GURL& url, WebKit::WebFrame* frame, WebKit::WebNavigationType type) { // Must be a top level frame. if (frame->parent() != NULL) @@ -4470,16 +4488,17 @@ bool RenderView::IsNonLocalTopLevelNavigation( return false; } -void RenderView::OnAsyncFileOpened(base::PlatformFileError error_code, - IPC::PlatformFileForTransit file_for_transit, - int message_id) { +void RenderViewImpl::OnAsyncFileOpened( + base::PlatformFileError error_code, + IPC::PlatformFileForTransit file_for_transit, + int message_id) { pepper_delegate_.OnAsyncFileOpened( error_code, IPC::PlatformFileForTransitToPlatformFile(file_for_transit), message_id); } -void RenderView::OnPpapiBrokerChannelCreated( +void RenderViewImpl::OnPpapiBrokerChannelCreated( int request_id, base::ProcessHandle broker_process_handle, const IPC::ChannelHandle& handle) { @@ -4489,7 +4508,7 @@ void RenderView::OnPpapiBrokerChannelCreated( } #if defined(OS_MACOSX) -void RenderView::OnSelectPopupMenuItem(int selected_index) { +void RenderViewImpl::OnSelectPopupMenuItem(int selected_index) { if (external_popup_menu_ == NULL) { // Crash reports from the field indicate that we can be notified with a // NULL external popup menu (we probably get notified twice). @@ -4504,7 +4523,7 @@ void RenderView::OnSelectPopupMenuItem(int selected_index) { #endif #if defined(ENABLE_FLAPPER_HACKS) -void RenderView::OnConnectTcpACK( +void RenderViewImpl::OnConnectTcpACK( int request_id, IPC::PlatformFileForTransit socket_for_transit, const PP_Flash_NetAddress& local_addr, @@ -4517,7 +4536,7 @@ void RenderView::OnConnectTcpACK( } #endif -void RenderView::OnContextMenuClosed( +void RenderViewImpl::OnContextMenuClosed( const webkit_glue::CustomContextMenuContext& custom_context) { if (custom_context.is_pepper_menu) pepper_delegate_.OnContextMenuClosed(custom_context); @@ -4525,7 +4544,7 @@ void RenderView::OnContextMenuClosed( context_menu_node_.reset(); } -void RenderView::OnEnableViewSourceMode() { +void RenderViewImpl::OnEnableViewSourceMode() { if (!webview()) return; WebFrame* main_frame = webview()->mainFrame(); @@ -4534,14 +4553,14 @@ void RenderView::OnEnableViewSourceMode() { main_frame->enableViewSourceMode(true); } -void RenderView::OnLockMouseACK(bool succeeded) { +void RenderViewImpl::OnLockMouseACK(bool succeeded) { pepper_delegate_.OnLockMouseACK(succeeded); } -void RenderView::OnMouseLockLost() { +void RenderViewImpl::OnMouseLockLost() { pepper_delegate_.OnMouseLockLost(); } -bool RenderView::WebWidgetHandlesCompositorScheduling() const { +bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { return webview()->settings()->useThreadedCompositor(); } diff --git a/content/renderer/render_view.h b/content/renderer/render_view_impl.h index 753d92b..d204a5f 100644 --- a/content/renderer/render_view.h +++ b/content/renderer/render_view_impl.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_RENDERER_RENDER_VIEW_H_ -#define CONTENT_RENDERER_RENDER_VIEW_H_ +#ifndef CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ +#define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ #pragma once #include <deque> @@ -47,9 +47,9 @@ #include "webkit/plugins/npapi/webplugin_page_delegate.h" #if defined(OS_WIN) -// RenderView is a diamond-shaped hierarchy, with WebWidgetClient at the root. -// VS warns when we inherit the WebWidgetClient method implementations from -// RenderWidget. It's safe to ignore that warning. +// RenderViewImpl is a diamond-shaped hierarchy, with WebWidgetClient at the +// root. VS warns when we inherit the WebWidgetClient method implementations +// from RenderWidget. It's safe to ignore that warning. #pragma warning(disable: 4250) #endif @@ -147,7 +147,7 @@ struct WebWindowFeatures; // an unlimited chain of RenderViews who only have one RenderView child. // // Therefore, each new top level RenderView creates a new counter and shares it -// with all its children and grandchildren popup RenderViews created with +// with all its children and grandchildren popup RenderViewImpls created with // createView() to have a sort of global limit for the page so no more than // kMaximumNumberOfPopups popups are created. // @@ -159,13 +159,13 @@ typedef base::RefCountedData<int> SharedRenderViewCounter; // RenderView is an object that manages a WebView object, and provides a // communication interface with an embedding application process // -class RenderView : public RenderWidget, - public WebKit::WebViewClient, - public WebKit::WebFrameClient, - public WebKit::WebPageSerializerClient, - public content::RenderView, - public webkit::npapi::WebPluginPageDelegate, - public base::SupportsWeakPtr<RenderView> { +class RenderViewImpl : public RenderWidget, + public WebKit::WebViewClient, + public WebKit::WebFrameClient, + public WebKit::WebPageSerializerClient, + public content::RenderView, + public webkit::npapi::WebPluginPageDelegate, + public base::SupportsWeakPtr<RenderViewImpl> { public: // Creates a new RenderView. The parent_hwnd specifies a HWND to use as the // parent of the WebView HWND that will be created. If this is a blocked @@ -173,7 +173,7 @@ class RenderView : public RenderWidget, // responsible for creating this RenderView (corresponding to parent_hwnd). // |counter| is either a currently initialized counter, or NULL (in which case // we treat this RenderView as a top level window). - CONTENT_EXPORT static RenderView* Create( + CONTENT_EXPORT static RenderViewImpl* Create( gfx::NativeViewId parent_hwnd, int32 opener_id, const RendererPreferences& renderer_prefs, @@ -183,8 +183,8 @@ class RenderView : public RenderWidget, int64 session_storage_namespace_id, const string16& frame_name); - // Returns the RenderView containing the given WebView. - CONTENT_EXPORT static RenderView* FromWebView(WebKit::WebView* webview); + // Returns the RenderViewImpl containing the given WebView. + CONTENT_EXPORT static RenderViewImpl* FromWebView(WebKit::WebView* webview); // Sets the "next page id" counter. static void SetNextPageID(int32 next_page_id); @@ -671,17 +671,17 @@ class RenderView : public RenderWidget, CONNECTION_ERROR, }; - RenderView(gfx::NativeViewId parent_hwnd, - int32 opener_id, - const RendererPreferences& renderer_prefs, - const WebPreferences& webkit_prefs, - SharedRenderViewCounter* counter, - int32 routing_id, - int64 session_storage_namespace_id, - const string16& frame_name); + RenderViewImpl(gfx::NativeViewId parent_hwnd, + int32 opener_id, + const RendererPreferences& renderer_prefs, + const WebPreferences& webkit_prefs, + SharedRenderViewCounter* counter, + int32 routing_id, + int64 session_storage_namespace_id, + const string16& frame_name); // Do not delete directly. This class is reference counted. - virtual ~RenderView(); + virtual ~RenderViewImpl(); void UpdateURL(WebKit::WebFrame* frame); void UpdateTitle(WebKit::WebFrame* frame, const string16& title, @@ -864,13 +864,12 @@ class RenderView : public RenderWidget, void DidDownloadFavicon(webkit_glue::ImageResourceFetcher* fetcher, const SkBitmap& image); - // Requests to download a favicon image. When done, the RenderView - // is notified by way of DidDownloadFavicon. Returns true if the - // request was successfully started, false otherwise. id is used to - // uniquely identify the request and passed back to the - // DidDownloadFavicon method. If the image has multiple frames, the - // frame whose size is image_size is returned. If the image doesn't - // have a frame at the specified size, the first is returned. + // Requests to download a favicon image. When done, the RenderView is notified + // by way of DidDownloadFavicon. Returns true if the request was successfully + // started, false otherwise. id is used to uniquely identify the request and + // passed back to the DidDownloadFavicon method. If the image has multiple + // frames, the frame whose size is image_size is returned. If the image + // doesn't have a frame at the specified size, the first is returned. bool DownloadFavicon(int id, const GURL& image_url, int image_size); GURL GetAlternateErrorPageURL(const GURL& failed_url, @@ -992,7 +991,7 @@ class RenderView : public RenderWidget, scoped_ptr<content::NavigationState> pending_navigation_state_; // Timer used to delay the updating of nav state (see SyncNavigationState). - base::OneShotTimer<RenderView> nav_state_sync_timer_; + base::OneShotTimer<RenderViewImpl> nav_state_sync_timer_; // Page IDs ------------------------------------------------------------------ // See documentation in content::RenderView. @@ -1072,7 +1071,7 @@ class RenderView : public RenderWidget, // Used to delay determining the preferred size (to avoid intermediate // states for the sizes). - base::OneShotTimer<RenderView> check_preferred_size_timer_; + base::OneShotTimer<RenderViewImpl> check_preferred_size_timer_; // These store the "is main frame is scrolled all the way to the left // or right" state that was last sent to the browser. @@ -1094,9 +1093,9 @@ class RenderView : public RenderWidget, PepperPluginDelegateImpl pepper_delegate_; - // All the currently active plugin delegates for this RenderView; kept so that - // we can enumerate them to send updates about things like window location - // or tab focus and visibily. These are non-owning references. + // All the currently active plugin delegates for this RenderView; kept so + // that we can enumerate them to send updates about things like window + // location or tab focus and visibily. These are non-owning references. std::set<WebPluginDelegateProxy*> plugin_delegates_; #if defined(OS_WIN) @@ -1109,8 +1108,8 @@ class RenderView : public RenderWidget, RendererWebCookieJarImpl cookie_jar_; // The next group of objects all implement RenderViewObserver, so are deleted - // along with the RenderView automatically. This is why we just store weak - // references. + // along with the RenderView automatically. This is why we just store + // weak references. // Holds a reference to the service which provides desktop notifications. NotificationProvider* notification_provider_; @@ -1156,9 +1155,9 @@ class RenderView : public RenderWidget, int64 session_storage_namespace_id_; // The total number of unrequested popups that exist and can be followed back - // to a common opener. This count is shared among all RenderViews created - // with createView(). All popups are treated as unrequested until - // specifically instructed otherwise by the Browser process. + // to a common opener. This count is shared among all RenderViews created with + // createView(). All popups are treated as unrequested until specifically + // instructed otherwise by the Browser process. scoped_refptr<SharedRenderViewCounter> shared_popup_counter_; // Whether this is a top level window (instead of a popup). Top level windows @@ -1199,12 +1198,12 @@ class RenderView : public RenderWidget, // ADDING NEW DATA? Please see if it fits appropriately in one of the above // sections rather than throwing it randomly at the end. If you're adding a // bunch of stuff, you should probably create a helper class and put your - // data and methods on that to avoid bloating RenderView more. You can use - // the Observer interface to filter IPC messages and receive frame change + // data and methods on that to avoid bloating RenderView more. You can + // use the Observer interface to filter IPC messages and receive frame change // notifications. // --------------------------------------------------------------------------- - DISALLOW_COPY_AND_ASSIGN(RenderView); + DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); }; -#endif // CONTENT_RENDERER_RENDER_VIEW_H_ +#endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ diff --git a/content/renderer/render_view_linux.cc b/content/renderer/render_view_linux.cc index b8540a9..cbfd254 100644 --- a/content/renderer/render_view_linux.cc +++ b/content/renderer/render_view_linux.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/renderer/render_view.h" +#include "content/renderer/render_view_impl.h" #include "content/common/renderer_preferences.h" #include "third_party/WebKit/Source/WebKit/chromium/public/linux/WebFontRendering.h" @@ -98,7 +98,7 @@ static bool RendererPreferencesToSubpixelGlyphsFlag( return false; } -void RenderView::UpdateFontRenderingFromRendererPrefs() { +void RenderViewImpl::UpdateFontRenderingFromRendererPrefs() { const RendererPreferences& prefs = renderer_preferences_; WebFontRendering::setHinting( RendererPreferencesToSkiaHinting(prefs)); diff --git a/content/renderer/renderer_accessibility.cc b/content/renderer/renderer_accessibility.cc index 49d0d15..8a583ac 100644 --- a/content/renderer/renderer_accessibility.cc +++ b/content/renderer/renderer_accessibility.cc @@ -5,7 +5,7 @@ #include "base/command_line.h" #include "content/common/content_switches.h" #include "content/common/view_messages.h" -#include "content/renderer/render_view.h" +#include "content/renderer/render_view_impl.h" #include "content/renderer/renderer_accessibility.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObject.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" @@ -77,7 +77,7 @@ bool WebAccessibilityNotificationToViewHostMsg( return true; } -RendererAccessibility::RendererAccessibility(RenderView* render_view) +RendererAccessibility::RendererAccessibility(RenderViewImpl* render_view) : content::RenderViewObserver(render_view), ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)), browser_root_(NULL), diff --git a/content/renderer/renderer_accessibility.h b/content/renderer/renderer_accessibility.h index 9535632..887876a 100644 --- a/content/renderer/renderer_accessibility.h +++ b/content/renderer/renderer_accessibility.h @@ -13,6 +13,8 @@ #include "content/public/renderer/render_view_observer.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityNotification.h" +class RenderViewImpl; + namespace WebKit { class WebAccessibilityObject; class WebDocument; @@ -30,7 +32,7 @@ struct WebAccessibility; // nodes in the tree (e.g., change focus, or click on a button). class RendererAccessibility : public content::RenderViewObserver { public: - RendererAccessibility(RenderView* render_view); + RendererAccessibility(RenderViewImpl* render_view); virtual ~RendererAccessibility(); // RenderView::Observer implementation. diff --git a/content/renderer/renderer_webapplicationcachehost_impl.cc b/content/renderer/renderer_webapplicationcachehost_impl.cc index 76731f1..a775f5e 100644 --- a/content/renderer/renderer_webapplicationcachehost_impl.cc +++ b/content/renderer/renderer_webapplicationcachehost_impl.cc @@ -6,7 +6,7 @@ #include "content/common/view_messages.h" #include "content/renderer/render_thread_impl.h" -#include "content/renderer/render_view.h" +#include "content/renderer/render_view_impl.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" @@ -15,7 +15,7 @@ using WebKit::WebApplicationCacheHostClient; using WebKit::WebConsoleMessage; RendererWebApplicationCacheHostImpl::RendererWebApplicationCacheHostImpl( - RenderView* render_view, + RenderViewImpl* render_view, WebApplicationCacheHostClient* client, AppCacheBackend* backend) : WebApplicationCacheHostImpl(client, backend), @@ -25,7 +25,7 @@ RendererWebApplicationCacheHostImpl::RendererWebApplicationCacheHostImpl( void RendererWebApplicationCacheHostImpl::OnLogMessage( appcache::LogLevel log_level, const std::string& message) { - RenderView* render_view = GetRenderView(); + RenderViewImpl* render_view = GetRenderView(); if (!render_view || !render_view->webview() || !render_view->webview()->mainFrame()) return; @@ -51,7 +51,7 @@ void RendererWebApplicationCacheHostImpl::OnCacheSelected( WebApplicationCacheHostImpl::OnCacheSelected(info); } -RenderView* RendererWebApplicationCacheHostImpl::GetRenderView() { - return static_cast<RenderView*> +RenderViewImpl* RendererWebApplicationCacheHostImpl::GetRenderView() { + return static_cast<RenderViewImpl*> (RenderThreadImpl::current()->ResolveRoute(routing_id_)); } diff --git a/content/renderer/renderer_webapplicationcachehost_impl.h b/content/renderer/renderer_webapplicationcachehost_impl.h index 9727315..4b434a9 100644 --- a/content/renderer/renderer_webapplicationcachehost_impl.h +++ b/content/renderer/renderer_webapplicationcachehost_impl.h @@ -8,13 +8,13 @@ #include "webkit/appcache/web_application_cache_host_impl.h" -class RenderView; +class RenderViewImpl; class RendererWebApplicationCacheHostImpl : public appcache::WebApplicationCacheHostImpl { public: RendererWebApplicationCacheHostImpl( - RenderView* render_view, + RenderViewImpl* render_view, WebKit::WebApplicationCacheHostClient* client, appcache::AppCacheBackend* backend); @@ -25,7 +25,7 @@ class RendererWebApplicationCacheHostImpl virtual void OnCacheSelected(const appcache::AppCacheInfo& info); private: - RenderView* GetRenderView(); + RenderViewImpl* GetRenderView(); bool content_blocked_; int routing_id_; diff --git a/content/renderer/renderer_webcookiejar_impl.cc b/content/renderer/renderer_webcookiejar_impl.cc index 1fbc435..56c0e0f 100644 --- a/content/renderer/renderer_webcookiejar_impl.cc +++ b/content/renderer/renderer_webcookiejar_impl.cc @@ -7,7 +7,7 @@ #include "base/utf_string_conversions.h" #include "content/common/view_messages.h" #include "content/public/renderer/content_renderer_client.h" -#include "content/renderer/render_view.h" +#include "content/renderer/render_view_impl.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebCookie.h" #include "webkit/glue/webcookie.h" diff --git a/content/renderer/renderer_webcookiejar_impl.h b/content/renderer/renderer_webcookiejar_impl.h index a8cae40..e390ea6 100644 --- a/content/renderer/renderer_webcookiejar_impl.h +++ b/content/renderer/renderer_webcookiejar_impl.h @@ -14,11 +14,11 @@ namespace IPC { class SyncMessage; } -class RenderView; +class RenderViewImpl; class RendererWebCookieJarImpl : public WebKit::WebCookieJar { public: - explicit RendererWebCookieJarImpl(RenderView* sender) + explicit RendererWebCookieJarImpl(RenderViewImpl* sender) : sender_(sender) { } virtual ~RendererWebCookieJarImpl() {} @@ -40,7 +40,7 @@ class RendererWebCookieJarImpl : public WebKit::WebCookieJar { virtual bool cookiesEnabled( const WebKit::WebURL& url, const WebKit::WebURL& first_party_for_cookies); - RenderView* sender_; + RenderViewImpl* sender_; }; #endif // CONTENT_RENDERER_RENDERER_WEBCOOKIEJAR_IMPL_H_ diff --git a/content/renderer/renderer_webkitplatformsupport_impl.cc b/content/renderer/renderer_webkitplatformsupport_impl.cc index e0198ec..7bbd8da 100644 --- a/content/renderer/renderer_webkitplatformsupport_impl.cc +++ b/content/renderer/renderer_webkitplatformsupport_impl.cc @@ -23,7 +23,6 @@ #include "content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h" #include "content/renderer/media/audio_device.h" #include "content/renderer/render_thread_impl.h" -#include "content/renderer/render_view.h" #include "content/renderer/renderer_webaudiodevice_impl.h" #include "content/renderer/renderer_webidbfactory_impl.h" #include "content/renderer/renderer_webstoragenamespace_impl.h" diff --git a/content/renderer/renderer_webstoragearea_impl.cc b/content/renderer/renderer_webstoragearea_impl.cc index 5ee9c68..d3063ec 100644 --- a/content/renderer/renderer_webstoragearea_impl.cc +++ b/content/renderer/renderer_webstoragearea_impl.cc @@ -6,7 +6,6 @@ #include "content/common/dom_storage_messages.h" #include "content/renderer/render_thread_impl.h" -#include "content/renderer/render_view.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" diff --git a/content/renderer/speech_input_dispatcher.cc b/content/renderer/speech_input_dispatcher.cc index 735cc0b..47cbe99 100644 --- a/content/renderer/speech_input_dispatcher.cc +++ b/content/renderer/speech_input_dispatcher.cc @@ -6,7 +6,7 @@ #include "base/utf_string_conversions.h" #include "content/common/speech_input_messages.h" -#include "content/renderer/render_view.h" +#include "content/renderer/render_view_impl.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" @@ -26,7 +26,7 @@ using WebKit::WebNode; using WebKit::WebView; SpeechInputDispatcher::SpeechInputDispatcher( - RenderView* render_view, + RenderViewImpl* render_view, WebKit::WebSpeechInputListener* listener) : content::RenderViewObserver(render_view), listener_(listener) { diff --git a/content/renderer/speech_input_dispatcher.h b/content/renderer/speech_input_dispatcher.h index 8ab9ca9..c95d99e 100644 --- a/content/renderer/speech_input_dispatcher.h +++ b/content/renderer/speech_input_dispatcher.h @@ -11,6 +11,7 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebSpeechInputController.h" class GURL; +class RenderViewImpl; namespace WebKit { class WebSpeechInputListener; @@ -21,7 +22,7 @@ class WebSpeechInputListener; class SpeechInputDispatcher : public content::RenderViewObserver, public WebKit::WebSpeechInputController { public: - SpeechInputDispatcher(RenderView* render_view, + SpeechInputDispatcher(RenderViewImpl* render_view, WebKit::WebSpeechInputListener* listener); private: diff --git a/content/renderer/text_input_client_observer.cc b/content/renderer/text_input_client_observer.cc index 67d7486..432186c 100644 --- a/content/renderer/text_input_client_observer.cc +++ b/content/renderer/text_input_client_observer.cc @@ -6,7 +6,7 @@ #include "base/memory/scoped_ptr.h" #include "content/common/text_input_client_messages.h" -#include "content/renderer/render_view.h" +#include "content/renderer/render_view_impl.h" #include "ipc/ipc_message_macros.h" #include "third_party/WebKit/Source/WebKit/chromium/public/mac/WebSubstringUtil.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" @@ -16,7 +16,7 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "ui/gfx/rect.h" -TextInputClientObserver::TextInputClientObserver(RenderView* render_view) +TextInputClientObserver::TextInputClientObserver(RenderViewImpl* render_view) : content::RenderViewObserver(render_view) { } diff --git a/content/renderer/text_input_client_observer.h b/content/renderer/text_input_client_observer.h index e9c20cc..9fe9edc 100644 --- a/content/renderer/text_input_client_observer.h +++ b/content/renderer/text_input_client_observer.h @@ -11,6 +11,8 @@ #include "ui/base/range/range.h" #include "ui/gfx/point.h" +class RenderViewImpl; + namespace WebKit { class WebView; } @@ -20,7 +22,7 @@ class WebView; // content/browser/renderer_host/text_input_client_mac.h for more information. class TextInputClientObserver : public content::RenderViewObserver { public: - explicit TextInputClientObserver(RenderView* render_view); + explicit TextInputClientObserver(RenderViewImpl* render_view); virtual ~TextInputClientObserver(); // RenderViewObserver overrides: diff --git a/content/renderer/webplugin_delegate_proxy.cc b/content/renderer/webplugin_delegate_proxy.cc index 88fb6af..7bc3875 100644 --- a/content/renderer/webplugin_delegate_proxy.cc +++ b/content/renderer/webplugin_delegate_proxy.cc @@ -32,7 +32,7 @@ #include "content/renderer/gpu/command_buffer_proxy.h" #include "content/renderer/plugin_channel_host.h" #include "content/renderer/render_thread_impl.h" -#include "content/renderer/render_view.h" +#include "content/renderer/render_view_impl.h" #include "ipc/ipc_channel_handle.h" #include "net/base/mime_util.h" #include "skia/ext/platform_canvas.h" @@ -165,7 +165,7 @@ class ResourceClientProxy : public webkit::npapi::WebPluginResourceClient { WebPluginDelegateProxy::WebPluginDelegateProxy( const std::string& mime_type, - const base::WeakPtr<RenderView>& render_view) + const base::WeakPtr<RenderViewImpl>& render_view) : render_view_(render_view), plugin_(NULL), uses_shared_bitmaps_(false), diff --git a/content/renderer/webplugin_delegate_proxy.h b/content/renderer/webplugin_delegate_proxy.h index 6cfc3a3..02a87e6 100644 --- a/content/renderer/webplugin_delegate_proxy.h +++ b/content/renderer/webplugin_delegate_proxy.h @@ -26,14 +26,15 @@ #include "base/memory/linked_ptr.h" #endif -struct NPObject; class NPObjectStub; -struct NPVariant_Param; class PluginChannelHost; -struct PluginHostMsg_URLRequest_Params; -class RenderView; +class RenderViewImpl; class SkBitmap; +struct NPObject; +struct NPVariant_Param; +struct PluginHostMsg_URLRequest_Params; + namespace base { class SharedMemory; class WaitableEvent; @@ -58,7 +59,7 @@ class WebPluginDelegateProxy public base::SupportsWeakPtr<WebPluginDelegateProxy> { public: WebPluginDelegateProxy(const std::string& mime_type, - const base::WeakPtr<RenderView>& render_view); + const base::WeakPtr<RenderViewImpl>& render_view); // WebPluginDelegate implementation: virtual void PluginDestroyed(); @@ -269,7 +270,7 @@ class WebPluginDelegateProxy bool UseSynchronousGeometryUpdates(); #endif - base::WeakPtr<RenderView> render_view_; + base::WeakPtr<RenderViewImpl> render_view_; webkit::npapi::WebPlugin* plugin_; bool uses_shared_bitmaps_; gfx::PluginWindowHandle window_; diff --git a/content/test/render_view_fake_resources_test.cc b/content/test/render_view_fake_resources_test.cc index a3a6867..3be34ad 100644 --- a/content/test/render_view_fake_resources_test.cc +++ b/content/test/render_view_fake_resources_test.cc @@ -15,7 +15,7 @@ #include "content/common/view_messages.h" #include "content/renderer/mock_render_process.h" #include "content/renderer/render_thread_impl.h" -#include "content/renderer/render_view.h" +#include "content/renderer/render_view_impl.h" #include "googleurl/src/gurl.h" #include "net/base/upload_data.h" #include "net/http/http_response_headers.h" @@ -48,7 +48,7 @@ bool RenderViewFakeResourcesTest::OnMessageReceived( } bool RenderViewFakeResourcesTest::Visit(content::RenderView* render_view) { - view_ = static_cast<RenderView*>(render_view); + view_ = render_view; return false; } @@ -94,7 +94,7 @@ void RenderViewFakeResourcesTest::TearDown() { do { message_loop_.RunAllPending(); view_ = NULL; - RenderView::ForEach(this); + content::RenderView::ForEach(this); } while (view_); mock_process_.reset(); @@ -105,7 +105,7 @@ content::RenderView* RenderViewFakeResourcesTest::view() { } WebKit::WebFrame* RenderViewFakeResourcesTest::GetMainFrame() { - return view_->webview()->mainFrame(); + return view_->GetWebView()->mainFrame(); } void RenderViewFakeResourcesTest::LoadURL(const std::string& url) { @@ -181,7 +181,7 @@ void RenderViewFakeResourcesTest::OnRequestResource( void RenderViewFakeResourcesTest::OnRenderViewReady() { // Grab a pointer to the new view using RenderViewVisitor. ASSERT_TRUE(!view_); - RenderView::ForEach(this); + content::RenderView::ForEach(this); ASSERT_TRUE(view_); message_loop_.Quit(); } @@ -189,18 +189,19 @@ void RenderViewFakeResourcesTest::OnRenderViewReady() { void RenderViewFakeResourcesTest::GoToOffset( int offset, const WebKit::WebHistoryItem& history_item) { + RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); ViewMsg_Navigate_Params params; - params.page_id = view_->GetPageId() + offset; + params.page_id = impl->GetPageId() + offset; params.pending_history_list_offset = - view_->history_list_offset() + offset; - params.current_history_list_offset = view_->history_list_offset(); - params.current_history_list_length = (view_->historyBackListCount() + - view_->historyForwardListCount() + 1); + impl->history_list_offset() + offset; + params.current_history_list_offset = impl->history_list_offset(); + params.current_history_list_length = (impl->historyBackListCount() + + impl->historyForwardListCount() + 1); params.url = GURL(history_item.urlString()); params.transition = PageTransition::FORWARD_BACK; params.state = webkit_glue::HistoryItemToString(history_item); params.navigation_type = ViewMsg_Navigate_Type::NORMAL; params.request_time = base::Time::Now(); - channel_->Send(new ViewMsg_Navigate(view_->routing_id(), params)); + channel_->Send(new ViewMsg_Navigate(impl->routing_id(), params)); message_loop_.Run(); } diff --git a/content/test/render_view_fake_resources_test.h b/content/test/render_view_fake_resources_test.h index b0b28b7..272170c 100644 --- a/content/test/render_view_fake_resources_test.h +++ b/content/test/render_view_fake_resources_test.h @@ -130,7 +130,7 @@ class RenderViewFakeResourcesTest : public ::testing::Test, scoped_ptr<IPC::Channel> channel_; RenderThreadImpl* render_thread_; // owned by mock_process_ scoped_ptr<MockRenderProcess> mock_process_; - RenderView* view_; // not owned, deletes itself on close + content::RenderView* view_; // not owned, deletes itself on close // Map of url -> response body for network requests from the renderer. // Any urls not in this map are served a 404 error. |