diff options
author | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-07 15:02:11 +0000 |
---|---|---|
committer | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-07 15:02:11 +0000 |
commit | eaabba206ae14905ef3a922e7b839cab285dd940 (patch) | |
tree | 13f52a325e90d2d5522ddac3e558a54eea026d06 | |
parent | 15b43fba084a9880c76736167c782dea8df24a78 (diff) | |
download | chromium_src-eaabba206ae14905ef3a922e7b839cab285dd940.zip chromium_src-eaabba206ae14905ef3a922e7b839cab285dd940.tar.gz chromium_src-eaabba206ae14905ef3a922e7b839cab285dd940.tar.bz2 |
Move Render(View|Widget)Host and associated classes to content namespace.
TBR=jam@chromium.org
BUG=98716
Review URL: https://chromiumcodereview.appspot.com/9600036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125388 0039d316-1c4b-4281-b951-d872f2087c98
328 files changed, 927 insertions, 611 deletions
diff --git a/chrome/browser/accessibility/accessibility_win_browsertest.cc b/chrome/browser/accessibility/accessibility_win_browsertest.cc index 72cb5ad..d0206c4 100644 --- a/chrome/browser/accessibility/accessibility_win_browsertest.cc +++ b/chrome/browser/accessibility/accessibility_win_browsertest.cc @@ -196,7 +196,7 @@ void RecursiveFindNodeInAccessibilityTree( // of the selected tab. IAccessible* AccessibilityWinBrowserTest::GetRendererAccessible() { - TestRenderViewHost::EnableAccessibilityUpdatedNotifications( + content::TestRenderViewHost::EnableAccessibilityUpdatedNotifications( browser()->GetSelectedWebContents()->GetRenderViewHost()); HWND hwnd_render_widget_host_view = diff --git a/chrome/browser/aeropeek_manager.cc b/chrome/browser/aeropeek_manager.cc index f7c1bf7..77360cf 100644 --- a/chrome/browser/aeropeek_manager.cc +++ b/chrome/browser/aeropeek_manager.cc @@ -991,7 +991,7 @@ bool AeroPeekManager::GetTabPreview(int tab_id, SkBitmap* preview) { if (!contents) return false; - RenderViewHost* render_view_host = contents->GetRenderViewHost(); + content::RenderViewHost* render_view_host = contents->GetRenderViewHost(); if (!render_view_host) return false; diff --git a/chrome/browser/autocomplete/autocomplete_edit.cc b/chrome/browser/autocomplete/autocomplete_edit.cc index 6c80558..379a6f9 100644 --- a/chrome/browser/autocomplete/autocomplete_edit.cc +++ b/chrome/browser/autocomplete/autocomplete_edit.cc @@ -1118,7 +1118,8 @@ void AutocompleteEditModel::DoPrerender(const AutocompleteMatch& match) { prerender::PrerenderManager* prerender_manager = prerender::PrerenderManagerFactory::GetForProfile(tab->profile()); if (prerender_manager) { - RenderViewHost* current_host = tab->web_contents()->GetRenderViewHost(); + content::RenderViewHost* current_host = + tab->web_contents()->GetRenderViewHost(); prerender_manager->AddPrerenderFromOmnibox( match.destination_url, current_host->GetSessionStorageNamespace()); } diff --git a/chrome/browser/autofill/autofill_browsertest.cc b/chrome/browser/autofill/autofill_browsertest.cc index 7f2e6e4..39eeac7 100644 --- a/chrome/browser/autofill/autofill_browsertest.cc +++ b/chrome/browser/autofill/autofill_browsertest.cc @@ -35,6 +35,7 @@ #include "testing/gtest/include/gtest/gtest.h" #include "ui/base/keycodes/keyboard_codes.h" +using content::RenderViewHost; using content::WebContents; static const char* kDataURIPrefix = "data:text/html;charset=utf-8,"; diff --git a/chrome/browser/autofill/autofill_external_delegate.cc b/chrome/browser/autofill/autofill_external_delegate.cc index da3c9ab..4105709 100644 --- a/chrome/browser/autofill/autofill_external_delegate.cc +++ b/chrome/browser/autofill/autofill_external_delegate.cc @@ -14,6 +14,8 @@ #include "grit/generated_resources.h" #include "ui/base/l10n/l10n_util.h" +using content::RenderViewHost; + AutofillExternalDelegate::~AutofillExternalDelegate() { } diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc index 9ed1e9b..571e05f3 100644 --- a/chrome/browser/autofill/autofill_manager.cc +++ b/chrome/browser/autofill/autofill_manager.cc @@ -60,6 +60,7 @@ using base::TimeTicks; using content::BrowserThread; +using content::RenderViewHost; using switches::kEnableAutofillFeedback; using webkit::forms::FormData; using webkit::forms::FormDataPredictions; diff --git a/chrome/browser/autofill/autofill_manager.h b/chrome/browser/autofill/autofill_manager.h index 058ee25..f372819 100644 --- a/chrome/browser/autofill/autofill_manager.h +++ b/chrome/browser/autofill/autofill_manager.h @@ -31,14 +31,17 @@ class AutofillMetrics; class CreditCard; class PersonalDataManager; class PrefService; -class RenderViewHost; class TabContentsWrapper; struct ViewHostMsg_FrameNavigate_Params; +namespace content { +class RenderViewHost; +} + namespace gfx { class Rect; -}; +} namespace IPC { class Message; @@ -167,7 +170,7 @@ class AutofillManager : public content::WebContentsObserver, // Returns false if Autofill is disabled or if the host is unavailable. bool GetHost(const std::vector<AutofillProfile*>& profiles, const std::vector<CreditCard*>& credit_cards, - RenderViewHost** host) const WARN_UNUSED_RESULT; + content::RenderViewHost** host) const WARN_UNUSED_RESULT; // Unpacks |unique_id| and fills |profile| or |credit_card| with the // appropriate data source. Returns false if the unpacked id cannot be found. diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index b08703b..5a42b09 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -101,6 +101,7 @@ using base::Time; using content::BrowserThread; using content::DownloadItem; using content::NavigationController; +using content::RenderViewHost; using content::WebContents; namespace { diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h index 3a61cda..d589e15 100644 --- a/chrome/browser/automation/automation_provider.h +++ b/chrome/browser/automation/automation_provider.h @@ -53,7 +53,6 @@ class LoginHandler; class MetricEventDurationObserver; class NavigationControllerRestoredObserver; class Profile; -class RenderViewHost; class TabContents; struct AutomationMsg_Find_Params; struct Reposition_Params; @@ -65,6 +64,7 @@ class ChannelProxy; namespace content { class NavigationController; +class RenderViewHost; } namespace base { @@ -194,7 +194,7 @@ class AutomationProvider // Returns the associated view for the tab handle passed in. // Returns NULL on failure. - RenderViewHost* GetViewForTab(int tab_handle); + content::RenderViewHost* GetViewForTab(int tab_handle); // Called on IPC message deserialization failure. Prints an error message // and closes the IPC channel. diff --git a/chrome/browser/automation/automation_provider_json.cc b/chrome/browser/automation/automation_provider_json.cc index c43ad04..a1764dc 100644 --- a/chrome/browser/automation/automation_provider_json.cc +++ b/chrome/browser/automation/automation_provider_json.cc @@ -153,7 +153,7 @@ bool GetAutomationIdFromJSONArgs( bool GetRenderViewFromJSONArgs( DictionaryValue* args, Profile* profile, - RenderViewHost** rvh, + content::RenderViewHost** rvh, std::string* error) { Value* id_value; if (args->Get("auto_id", &id_value)) { diff --git a/chrome/browser/automation/automation_provider_json.h b/chrome/browser/automation/automation_provider_json.h index 10e9077..d2ced1b 100644 --- a/chrome/browser/automation/automation_provider_json.h +++ b/chrome/browser/automation/automation_provider_json.h @@ -18,7 +18,6 @@ class AutomationProvider; class Browser; class Extension; class Profile; -class RenderViewHost; namespace base { class DictionaryValue; @@ -26,6 +25,7 @@ class Value; } namespace content { +class RenderViewHost; class WebContents; } @@ -103,7 +103,7 @@ bool GetAutomationIdFromJSONArgs( bool GetRenderViewFromJSONArgs( base::DictionaryValue* args, Profile* profile, - RenderViewHost** rvh, + content::RenderViewHost** rvh, std::string* error) WARN_UNUSED_RESULT; // Gets the extension specified by the given dictionary |args|. |args| diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc index 9e00632..6dc3ea7 100644 --- a/chrome/browser/automation/automation_provider_observers.cc +++ b/chrome/browser/automation/automation_provider_observers.cc @@ -90,6 +90,7 @@ using content::DomOperationNotificationDetails; using content::DownloadItem; using content::DownloadManager; using content::NavigationController; +using content::RenderViewHost; using content::WebContents; // Holds onto start and stop timestamps for a particular tab diff --git a/chrome/browser/automation/automation_provider_observers.h b/chrome/browser/automation/automation_provider_observers.h index 80c7d19..879bfdb 100644 --- a/chrome/browser/automation/automation_provider_observers.h +++ b/chrome/browser/automation/automation_provider_observers.h @@ -63,7 +63,6 @@ class ExtensionService; class InfoBarTabHelper; class Notification; class Profile; -class RenderViewHost; class SavePackage; class TabContents; class TranslateInfoBarDelegate; @@ -80,6 +79,7 @@ class Message; namespace content { class NavigationController; +class RenderViewHost; class WebContents; } @@ -1432,7 +1432,7 @@ class AppLaunchObserver : public content::NotificationObserver { class AutofillDisplayedObserver : public content::NotificationObserver { public: AutofillDisplayedObserver(int notification, - RenderViewHost* render_view_host, + content::RenderViewHost* render_view_host, AutomationProvider* automation, IPC::Message* reply_message); virtual ~AutofillDisplayedObserver(); @@ -1444,7 +1444,7 @@ class AutofillDisplayedObserver : public content::NotificationObserver { private: int notification_; - RenderViewHost* render_view_host_; + content::RenderViewHost* render_view_host_; base::WeakPtr<AutomationProvider> automation_; scoped_ptr<IPC::Message> reply_message_; content::NotificationRegistrar registrar_; diff --git a/chrome/browser/automation/automation_provider_win.cc b/chrome/browser/automation/automation_provider_win.cc index d03aca7..e348c29 100644 --- a/chrome/browser/automation/automation_provider_win.cc +++ b/chrome/browser/automation/automation_provider_win.cc @@ -32,6 +32,7 @@ #include "ui/views/widget/root_view.h" using content::NavigationController; +using content::RenderViewHost; using content::WebContents; namespace { diff --git a/chrome/browser/automation/automation_tab_helper_browsertest.cc b/chrome/browser/automation/automation_tab_helper_browsertest.cc index 060e666..59ae8af 100644 --- a/chrome/browser/automation/automation_tab_helper_browsertest.cc +++ b/chrome/browser/automation/automation_tab_helper_browsertest.cc @@ -90,7 +90,7 @@ class AutomationTabHelperBrowserTest : public InProcessBrowserTest { void RunTestCaseInJavaScript(int test_case_number, bool wait_for_response) { std::string script = base::StringPrintf("runTestCase(%d);", test_case_number); - RenderViewHost* host = + content::RenderViewHost* host = browser()->GetSelectedWebContents()->GetRenderViewHost(); if (wait_for_response) { ASSERT_TRUE(ui_test_utils::ExecuteJavaScript( diff --git a/chrome/browser/automation/automation_util.cc b/chrome/browser/automation/automation_util.cc index 9d77012..abd305e 100644 --- a/chrome/browser/automation/automation_util.cc +++ b/chrome/browser/automation/automation_util.cc @@ -38,6 +38,7 @@ #include "net/url_request/url_request_context_getter.h" using content::BrowserThread; +using content::RenderViewHost; using content::WebContents; namespace { diff --git a/chrome/browser/automation/automation_util.h b/chrome/browser/automation/automation_util.h index 164bb2f..3ebd640 100644 --- a/chrome/browser/automation/automation_util.h +++ b/chrome/browser/automation/automation_util.h @@ -17,10 +17,10 @@ class Extension; class ExtensionHost; class GURL; class Profile; -class RenderViewHost; class TabContentsWrapper; namespace content { +class RenderViewHost; class WebContents; } @@ -104,7 +104,7 @@ bool GetTabForId(const AutomationId& id, content::WebContents** tab); // Gets the render view for the given ID. Returns true on success. bool GetRenderViewForId(const AutomationId& id, Profile* profile, - RenderViewHost** rvh); + content::RenderViewHost** rvh); // Gets the extension for the given ID. Returns true on success. bool GetExtensionForId(const AutomationId& id, diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc index 83dcbda..6cb173d 100644 --- a/chrome/browser/automation/testing_automation_provider.cc +++ b/chrome/browser/automation/testing_automation_provider.cc @@ -172,6 +172,7 @@ using content::NavigationEntry; using content::PluginService; using content::OpenURLParams; using content::Referrer; +using content::RenderViewHost; using content::SSLStatus; using content::WebContents; diff --git a/chrome/browser/browser_focus_uitest.cc b/chrome/browser/browser_focus_uitest.cc index 20b829a..b2138b8 100644 --- a/chrome/browser/browser_focus_uitest.cc +++ b/chrome/browser/browser_focus_uitest.cc @@ -54,6 +54,7 @@ using content::InterstitialPage; using content::NavigationController; +using content::RenderViewHost; using content::WebContents; #if defined(OS_MACOSX) diff --git a/chrome/browser/browser_keyevents_browsertest.cc b/chrome/browser/browser_keyevents_browsertest.cc index 6865bc4..edf9fa3 100644 --- a/chrome/browser/browser_keyevents_browsertest.cc +++ b/chrome/browser/browser_keyevents_browsertest.cc @@ -27,6 +27,7 @@ using content::DomOperationNotificationDetails; using content::NavigationController; +using content::RenderViewHost; namespace { diff --git a/chrome/browser/chrome_browser_application_mac.mm b/chrome/browser/chrome_browser_application_mac.mm index 449777cb..fb4b525 100644 --- a/chrome/browser/chrome_browser_application_mac.mm +++ b/chrome/browser/chrome_browser_application_mac.mm @@ -478,7 +478,7 @@ void SwizzleInit() { !it.done(); ++it) { if (TabContentsWrapper* contents = *it) { - if (RenderViewHost* rvh = + if (content::RenderViewHost* rvh = contents->web_contents()->GetRenderViewHost()) { rvh->EnableRendererAccessibility(); } diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index 901f43e..2f58b57 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc @@ -140,6 +140,7 @@ using content::AccessTokenStore; using content::BrowserThread; using content::ChildProcessSecurityPolicy; using content::QuotaPermissionContext; +using content::RenderViewHost; using content::SiteInstance; using content::WebContents; diff --git a/chrome/browser/chrome_content_browser_client.h b/chrome/browser/chrome_content_browser_client.h index a38b6bb..748eef9 100644 --- a/chrome/browser/chrome_content_browser_client.h +++ b/chrome/browser/chrome_content_browser_client.h @@ -27,7 +27,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { const content::MainFunctionParams& parameters) OVERRIDE; virtual content::WebContentsView* CreateWebContentsView( content::WebContents* web_contents) OVERRIDE; - virtual void RenderViewHostCreated(RenderViewHost* render_view_host) OVERRIDE; + virtual void RenderViewHostCreated( + content::RenderViewHost* render_view_host) OVERRIDE; virtual void RenderProcessHostCreated( content::RenderProcessHost* host) OVERRIDE; virtual content::WebUIControllerFactory* GetWebUIControllerFactory() OVERRIDE; @@ -150,16 +151,16 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { virtual net::NetLog* GetNetLog() OVERRIDE; virtual content::AccessTokenStore* CreateAccessTokenStore() OVERRIDE; virtual bool IsFastShutdownPossible() OVERRIDE; - virtual void OverrideWebkitPrefs(RenderViewHost* rvh, + virtual void OverrideWebkitPrefs(content::RenderViewHost* rvh, const GURL& url, WebPreferences* prefs) OVERRIDE; - virtual void UpdateInspectorSetting(RenderViewHost* rvh, + virtual void UpdateInspectorSetting(content::RenderViewHost* rvh, const std::string& key, const std::string& value) OVERRIDE; - virtual void ClearInspectorSettings(RenderViewHost* rvh) OVERRIDE; + virtual void ClearInspectorSettings(content::RenderViewHost* rvh) OVERRIDE; virtual void BrowserURLHandlerCreated(BrowserURLHandler* handler) OVERRIDE; - virtual void ClearCache(RenderViewHost* rvh) OVERRIDE; - virtual void ClearCookies(RenderViewHost* rvh) OVERRIDE; + virtual void ClearCache(content::RenderViewHost* rvh) OVERRIDE; + virtual void ClearCookies(content::RenderViewHost* rvh) OVERRIDE; virtual FilePath GetDefaultDownloadDirectory() OVERRIDE; virtual std::string GetDefaultDownloadName() OVERRIDE; virtual bool AllowSocketAPI(content::BrowserContext* browser_context, diff --git a/chrome/browser/chromeos/accessibility/accessibility_util.cc b/chrome/browser/chromeos/accessibility/accessibility_util.cc index 4176b26..30b407c 100644 --- a/chrome/browser/chromeos/accessibility/accessibility_util.cc +++ b/chrome/browser/chromeos/accessibility/accessibility_util.cc @@ -27,6 +27,8 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" +using content::RenderViewHost; + namespace chromeos { namespace accessibility { diff --git a/chrome/browser/chromeos/boot_times_loader.cc b/chrome/browser/chromeos/boot_times_loader.cc index fd5bd93..aef4f79 100644 --- a/chrome/browser/chromeos/boot_times_loader.cc +++ b/chrome/browser/chromeos/boot_times_loader.cc @@ -34,6 +34,7 @@ using content::BrowserThread; using content::NavigationController; +using content::RenderWidgetHost; using content::RenderWidgetHostView; using content::WebContents; diff --git a/chrome/browser/chromeos/boot_times_loader.h b/chrome/browser/chromeos/boot_times_loader.h index 0bf9407..6a9f86d 100644 --- a/chrome/browser/chromeos/boot_times_loader.h +++ b/chrome/browser/chromeos/boot_times_loader.h @@ -180,7 +180,7 @@ class BootTimesLoader std::vector<TimeMarker> login_time_markers_; std::vector<TimeMarker> logout_time_markers_; - std::set<RenderWidgetHost*> render_widget_hosts_loading_; + std::set<content::RenderWidgetHost*> render_widget_hosts_loading_; DISALLOW_COPY_AND_ASSIGN(BootTimesLoader); }; diff --git a/chrome/browser/chromeos/login/screen_locker_tester.cc b/chrome/browser/chromeos/login/screen_locker_tester.cc index 5e7a9fe..02dfb42 100644 --- a/chrome/browser/chromeos/login/screen_locker_tester.cc +++ b/chrome/browser/chromeos/login/screen_locker_tester.cc @@ -180,7 +180,7 @@ views::Widget* WebUIScreenLockerTester::GetChildWidget() const { base::Value* WebUIScreenLockerTester::ExecuteJavascriptAndGetValue( const std::string& js_text) { - RenderViewHost* rvh = webui()->GetWebContents()->GetRenderViewHost(); + content::RenderViewHost* rvh = webui()->GetWebContents()->GetRenderViewHost(); return rvh->ExecuteJavascriptAndGetValue(string16(), ASCIIToUTF16(js_text)); } diff --git a/chrome/browser/chromeos/login/webui_login_view.cc b/chrome/browser/chromeos/login/webui_login_view.cc index efac7eb..01f1e6f 100644 --- a/chrome/browser/chromeos/login/webui_login_view.cc +++ b/chrome/browser/chromeos/login/webui_login_view.cc @@ -40,6 +40,7 @@ #include "chrome/browser/ui/views/ash/chrome_shell_delegate.h" #endif +using content::RenderViewHost; using content::WebContents; namespace { diff --git a/chrome/browser/chromeos/login/webui_login_view.h b/chrome/browser/chromeos/login/webui_login_view.h index 62bc37b..6332860 100644 --- a/chrome/browser/chromeos/login/webui_login_view.h +++ b/chrome/browser/chromeos/login/webui_login_view.h @@ -94,7 +94,7 @@ class WebUILoginView : public views::WidgetDelegateView, virtual void ButtonVisibilityChanged(views::View* button_view) OVERRIDE; // TabRenderWatcher::Delegate implementation. - virtual void OnRenderHostCreated(RenderViewHost* host) OVERRIDE; + virtual void OnRenderHostCreated(content::RenderViewHost* host) OVERRIDE; virtual void OnTabMainFrameLoaded() OVERRIDE; virtual void OnTabMainFrameRender() OVERRIDE; diff --git a/chrome/browser/content_settings/tab_specific_content_settings.cc b/chrome/browser/content_settings/tab_specific_content_settings.cc index a522c04..47b8964 100644 --- a/chrome/browser/content_settings/tab_specific_content_settings.cc +++ b/chrome/browser/content_settings/tab_specific_content_settings.cc @@ -36,6 +36,7 @@ using content::BrowserThread; using content::NavigationController; using content::NavigationEntry; +using content::RenderViewHost; using content::WebContents; namespace { diff --git a/chrome/browser/content_settings/tab_specific_content_settings.h b/chrome/browser/content_settings/tab_specific_content_settings.h index 9a70d8e..7b8ccf7 100644 --- a/chrome/browser/content_settings/tab_specific_content_settings.h +++ b/chrome/browser/content_settings/tab_specific_content_settings.h @@ -28,6 +28,10 @@ class CannedBrowsingDataLocalStorageHelper; class CookiesTreeModel; class Profile; +namespace content { +class RenderViewHost; +} + namespace net { class CookieList; class CookieOptions; @@ -216,7 +220,7 @@ class TabSpecificContentSettings : public content::WebContentsObserver, bool is_main_frame, const GURL& validated_url, bool is_error_page, - RenderViewHost* render_view_host) OVERRIDE; + content::RenderViewHost* render_view_host) OVERRIDE; virtual void AppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy) OVERRIDE; diff --git a/chrome/browser/debugger/devtools_sanity_unittest.cc b/chrome/browser/debugger/devtools_sanity_unittest.cc index bcbee3c..9f8380d 100644 --- a/chrome/browser/debugger/devtools_sanity_unittest.cc +++ b/chrome/browser/debugger/devtools_sanity_unittest.cc @@ -42,6 +42,7 @@ using content::DevToolsManager; using content::DevToolsAgentHost; using content::DevToolsAgentHostRegistry; using content::NavigationController; +using content::RenderViewHost; using content::WebContents; using content::WorkerService; using content::WorkerServiceObserver; diff --git a/chrome/browser/debugger/devtools_window.cc b/chrome/browser/debugger/devtools_window.cc index 0088eef..5bfdae3 100644 --- a/chrome/browser/debugger/devtools_window.cc +++ b/chrome/browser/debugger/devtools_window.cc @@ -60,6 +60,7 @@ using content::DevToolsManager; using content::NavigationController; using content::NavigationEntry; using content::OpenURLParams; +using content::RenderViewHost; using content::WebContents; const char DevToolsWindow::kDevToolsApp[] = "DevToolsApp"; diff --git a/chrome/browser/debugger/devtools_window.h b/chrome/browser/debugger/devtools_window.h index 3c26c71..4b2c7d5 100644 --- a/chrome/browser/debugger/devtools_window.h +++ b/chrome/browser/debugger/devtools_window.h @@ -25,7 +25,6 @@ class Browser; class BrowserWindow; class PrefService; class Profile; -class RenderViewHost; class TabContentsWrapper; namespace base { @@ -35,6 +34,7 @@ class Value; namespace content { class DevToolsAgentHost; class DevToolsClientHost; +class RenderViewHost; class WebContents; } @@ -46,23 +46,26 @@ class DevToolsWindow : private content::NotificationObserver, static void RegisterUserPrefs(PrefService* prefs); static TabContentsWrapper* GetDevToolsContents( content::WebContents* inspected_tab); - static bool IsDevToolsWindow(RenderViewHost* window_rvh); + static bool IsDevToolsWindow(content::RenderViewHost* window_rvh); static DevToolsWindow* OpenDevToolsWindowForWorker( Profile* profile, content::DevToolsAgentHost* worker_agent); static DevToolsWindow* CreateDevToolsWindowForWorker(Profile* profile); - static DevToolsWindow* OpenDevToolsWindow(RenderViewHost* inspected_rvh); - static DevToolsWindow* ToggleDevToolsWindow(RenderViewHost* inspected_rvh, - DevToolsToggleAction action); - static void InspectElement(RenderViewHost* inspected_rvh, int x, int y); + static DevToolsWindow* OpenDevToolsWindow( + content::RenderViewHost* inspected_rvh); + static DevToolsWindow* ToggleDevToolsWindow( + content::RenderViewHost* inspected_rvh, + DevToolsToggleAction action); + static void InspectElement( + content::RenderViewHost* inspected_rvh, int x, int y); virtual ~DevToolsWindow(); // Overridden from DevToolsClientHost. virtual void InspectedTabClosing() OVERRIDE; virtual void TabReplaced(content::WebContents* new_tab) OVERRIDE; - RenderViewHost* GetRenderViewHost(); + content::RenderViewHost* GetRenderViewHost(); void Show(DevToolsToggleAction action); @@ -75,10 +78,10 @@ class DevToolsWindow : private content::NotificationObserver, private: static DevToolsWindow* Create(Profile* profile, - RenderViewHost* inspected_rvh, + content::RenderViewHost* inspected_rvh, bool docked, bool shared_worker_frontend); DevToolsWindow(TabContentsWrapper* tab_contents, Profile* profile, - RenderViewHost* inspected_rvh, bool docked); + content::RenderViewHost* inspected_rvh, bool docked); void CreateDevToolsBrowser(); bool FindInspectedBrowserAndTabIndex(Browser**, int* tab); @@ -119,9 +122,10 @@ class DevToolsWindow : private content::NotificationObserver, virtual void FrameNavigating(const std::string& url) OVERRIDE {} - static DevToolsWindow* ToggleDevToolsWindow(RenderViewHost* inspected_rvh, - bool force_open, - DevToolsToggleAction action); + static DevToolsWindow* ToggleDevToolsWindow( + content::RenderViewHost* inspected_rvh, + bool force_open, + DevToolsToggleAction action); static DevToolsWindow* AsDevToolsWindow(content::DevToolsClientHost*); // content::DevToolsClientHandlerDelegate overrides. diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc index 5874cce..7e11f42 100644 --- a/chrome/browser/download/download_browsertest.cc +++ b/chrome/browser/download/download_browsertest.cc @@ -1956,7 +1956,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, SavePageNonHTMLViaPost) { content::NOTIFICATION_NAV_ENTRY_COMMITTED, content::Source<content::NavigationController>( &web_contents->GetController())); - RenderViewHost* render_view_host = web_contents->GetRenderViewHost(); + content::RenderViewHost* render_view_host = web_contents->GetRenderViewHost(); ASSERT_TRUE(render_view_host != NULL); render_view_host->ExecuteJavascriptInWebFrame( string16(), ASCIIToUTF16("SubmitForm()")); diff --git a/chrome/browser/extensions/app_process_apitest.cc b/chrome/browser/extensions/app_process_apitest.cc index 6ad15cf..561dc70 100644 --- a/chrome/browser/extensions/app_process_apitest.cc +++ b/chrome/browser/extensions/app_process_apitest.cc @@ -26,6 +26,7 @@ #include "net/base/mock_host_resolver.h" using content::NavigationController; +using content::RenderViewHost; using content::WebContents; // Simulates a page calling window.open on an URL, and waits for the navigation. diff --git a/chrome/browser/extensions/extension_debugger_api.cc b/chrome/browser/extensions/extension_debugger_api.cc index c040165..4fab1b0 100644 --- a/chrome/browser/extensions/extension_debugger_api.cc +++ b/chrome/browser/extensions/extension_debugger_api.cc @@ -147,7 +147,7 @@ class AttachedClientHosts { DevToolsManager::GetInstance()->GetDevToolsAgentHostFor(*it); if (!agent_host) continue; - RenderViewHost* rvh = + content::RenderViewHost* rvh = DevToolsAgentHostRegistry::GetRenderViewHost(agent_host); if (rvh && rvh->GetDelegate() && rvh->GetDelegate()->GetAsWebContents() == contents) diff --git a/chrome/browser/extensions/extension_function.cc b/chrome/browser/extensions/extension_function.cc index 5c22043..44d5a74 100644 --- a/chrome/browser/extensions/extension_function.cc +++ b/chrome/browser/extensions/extension_function.cc @@ -19,6 +19,7 @@ #include "content/public/common/result_codes.h" using content::BrowserThread; +using content::RenderViewHost; using content::UserMetricsAction; // static diff --git a/chrome/browser/extensions/extension_function.h b/chrome/browser/extensions/extension_function.h index b595fb5..45c7326 100644 --- a/chrome/browser/extensions/extension_function.h +++ b/chrome/browser/extensions/extension_function.h @@ -31,13 +31,16 @@ class UIThreadExtensionFunction; class IOThreadExtensionFunction; class Profile; class QuotaLimitHeuristic; -class RenderViewHost; namespace base { class ListValue; class Value; } +namespace content { +class RenderViewHost; +} + #define EXTENSION_FUNCTION_VALIDATE(test) do { \ if (!(test)) { \ bad_message_ = true; \ @@ -237,8 +240,10 @@ class UIThreadExtensionFunction : public ExtensionFunction { void set_profile(Profile* profile) { profile_ = profile; } Profile* profile() const { return profile_; } - void SetRenderViewHost(RenderViewHost* render_view_host); - RenderViewHost* render_view_host() const { return render_view_host_; } + void SetRenderViewHost(content::RenderViewHost* render_view_host); + content::RenderViewHost* render_view_host() const { + return render_view_host_; + } void set_dispatcher( const base::WeakPtr<ExtensionFunctionDispatcher>& dispatcher) { @@ -279,7 +284,7 @@ class UIThreadExtensionFunction : public ExtensionFunction { base::WeakPtr<ExtensionFunctionDispatcher> dispatcher_; // The RenderViewHost we will send responses too. - RenderViewHost* render_view_host_; + content::RenderViewHost* render_view_host_; // The Profile of this function's extension. Profile* profile_; @@ -296,14 +301,14 @@ class UIThreadExtensionFunction : public ExtensionFunction { public content::RenderViewHostObserver { public: RenderViewHostTracker(UIThreadExtensionFunction* function, - RenderViewHost* render_view_host); + content::RenderViewHost* render_view_host); private: virtual void Observe(int type, const content::NotificationSource& source, const content::NotificationDetails& details) OVERRIDE; virtual void RenderViewHostDestroyed( - RenderViewHost* render_view_host) OVERRIDE; + content::RenderViewHost* render_view_host) OVERRIDE; virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; UIThreadExtensionFunction* function_; diff --git a/chrome/browser/extensions/extension_function_dispatcher.cc b/chrome/browser/extensions/extension_function_dispatcher.cc index f0d5426..c7f8c5f 100644 --- a/chrome/browser/extensions/extension_function_dispatcher.cc +++ b/chrome/browser/extensions/extension_function_dispatcher.cc @@ -98,6 +98,7 @@ #endif using extensions::ExtensionAPI; +using content::RenderViewHost; using WebKit::WebSecurityOrigin; // FactoryRegistry ------------------------------------------------------------- diff --git a/chrome/browser/extensions/extension_function_dispatcher.h b/chrome/browser/extensions/extension_function_dispatcher.h index cb429e0..6a8dbe9 100644 --- a/chrome/browser/extensions/extension_function_dispatcher.h +++ b/chrome/browser/extensions/extension_function_dispatcher.h @@ -19,10 +19,10 @@ class ChromeRenderMessageFilter; class Extension; class ExtensionFunction; class Profile; -class RenderViewHost; struct ExtensionHostMsg_Request_Params; namespace content { +class RenderViewHost; class WebContents; } @@ -98,7 +98,7 @@ class ExtensionFunctionDispatcher // Message handlers. void Dispatch(const ExtensionHostMsg_Request_Params& params, - RenderViewHost* sender); + content::RenderViewHost* sender); // Called when an ExtensionFunction is done executing, after it has sent // a response (if any) to the extension. @@ -110,7 +110,7 @@ class ExtensionFunctionDispatcher // // See the comments for ExtensionFunction::GetCurrentBrowser() for more // details. - Browser* GetCurrentBrowser(RenderViewHost* render_view_host, + Browser* GetCurrentBrowser(content::RenderViewHost* render_view_host, bool include_incognito); // The profile that this dispatcher is associated with. diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc index af00fad..71c7442 100644 --- a/chrome/browser/extensions/extension_host.cc +++ b/chrome/browser/extensions/extension_host.cc @@ -53,6 +53,7 @@ using WebKit::WebDragOperation; using WebKit::WebDragOperationsMask; using content::OpenURLParams; +using content::RenderViewHost; using content::SiteInstance; using content::WebContents; diff --git a/chrome/browser/extensions/extension_host.h b/chrome/browser/extensions/extension_host.h index 71fd2de..8c1a36c 100644 --- a/chrome/browser/extensions/extension_host.h +++ b/chrome/browser/extensions/extension_host.h @@ -112,7 +112,7 @@ class ExtensionHost : public content::WebContentsDelegate, const Extension* extension() const { return extension_; } const std::string& extension_id() const { return extension_id_; } content::WebContents* host_contents() const { return host_contents_.get(); } - RenderViewHost* render_view_host() const; + content::RenderViewHost* render_view_host() const; content::RenderProcessHost* render_process_host() const; bool did_stop_loading() const { return did_stop_loading_; } bool document_element_available() const { @@ -147,8 +147,10 @@ class ExtensionHost : public content::WebContentsDelegate, // content::WebContentsObserver virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; - virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; - virtual void RenderViewDeleted(RenderViewHost* render_view_host) OVERRIDE; + virtual void RenderViewCreated( + content::RenderViewHost* render_view_host) OVERRIDE; + virtual void RenderViewDeleted( + content::RenderViewHost* render_view_host) OVERRIDE; virtual void RenderViewReady() OVERRIDE; virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; virtual void DocumentAvailableInMainFrame() OVERRIDE; @@ -240,7 +242,7 @@ class ExtensionHost : public content::WebContentsDelegate, // A weak pointer to the current or pending RenderViewHost. We don't access // this through the host_contents because we want to deal with the pending // host, so we can send messages to it before it finishes loading. - RenderViewHost* render_view_host_; + content::RenderViewHost* render_view_host_; // Whether the RenderWidget has reported that it has stopped loading. bool did_stop_loading_; diff --git a/chrome/browser/extensions/extension_message_handler.cc b/chrome/browser/extensions/extension_message_handler.cc index 3b216b7..1317549 100644 --- a/chrome/browser/extensions/extension_message_handler.cc +++ b/chrome/browser/extensions/extension_message_handler.cc @@ -12,7 +12,7 @@ #include "content/public/browser/render_view_host_delegate.h" ExtensionMessageHandler::ExtensionMessageHandler( - RenderViewHost* render_view_host) + content::RenderViewHost* render_view_host) : content::RenderViewHostObserver(render_view_host) { } diff --git a/chrome/browser/extensions/extension_message_handler.h b/chrome/browser/extensions/extension_message_handler.h index 9ace4ae..fc63043 100644 --- a/chrome/browser/extensions/extension_message_handler.h +++ b/chrome/browser/extensions/extension_message_handler.h @@ -22,7 +22,7 @@ class ExtensionMessageHandler : public content::RenderViewHostObserver { public: // |sender| is guaranteed to outlive this object. - explicit ExtensionMessageHandler(RenderViewHost* render_view_host); + explicit ExtensionMessageHandler(content::RenderViewHost* render_view_host); virtual ~ExtensionMessageHandler(); // RenderViewHostObserver overrides. diff --git a/chrome/browser/extensions/extension_message_service.cc b/chrome/browser/extensions/extension_message_service.cc index 5392e2c..cf14021 100644 --- a/chrome/browser/extensions/extension_message_service.cc +++ b/chrome/browser/extensions/extension_message_service.cc @@ -359,7 +359,7 @@ void ExtensionMessageService::Observe( break; } case content::NOTIFICATION_RENDER_VIEW_HOST_DELETED: - OnSenderClosed(content::Source<RenderViewHost>(source).ptr()); + OnSenderClosed(content::Source<content::RenderViewHost>(source).ptr()); break; default: NOTREACHED(); diff --git a/chrome/browser/extensions/extension_process_manager.cc b/chrome/browser/extensions/extension_process_manager.cc index 5ecd548..b74a33d 100644 --- a/chrome/browser/extensions/extension_process_manager.cc +++ b/chrome/browser/extensions/extension_process_manager.cc @@ -34,6 +34,7 @@ using content::BrowserThread; using content::OpenURLParams; using content::Referrer; +using content::RenderViewHost; using content::SiteInstance; namespace { diff --git a/chrome/browser/extensions/extension_process_manager.h b/chrome/browser/extensions/extension_process_manager.h index 70a2e28..c7686ad 100644 --- a/chrome/browser/extensions/extension_process_manager.h +++ b/chrome/browser/extensions/extension_process_manager.h @@ -21,9 +21,9 @@ class Extension; class ExtensionHost; class GURL; class Profile; -class RenderViewHost; namespace content { +class RenderViewHost; class SiteInstance; }; @@ -75,15 +75,15 @@ class ExtensionProcessManager : public content::NotificationObserver { virtual content::SiteInstance* GetSiteInstanceForURL(const GURL& url); // Registers a RenderViewHost as hosting a given extension. - void RegisterRenderViewHost(RenderViewHost* render_view_host, + void RegisterRenderViewHost(content::RenderViewHost* render_view_host, const Extension* extension); // Unregisters a RenderViewHost as hosting any extension. - void UnregisterRenderViewHost(RenderViewHost* render_view_host); + void UnregisterRenderViewHost(content::RenderViewHost* render_view_host); // Returns all RenderViewHosts that are registered for the specified // extension. - std::set<RenderViewHost*> GetRenderViewHostsForExtension( + std::set<content::RenderViewHost*> GetRenderViewHostsForExtension( const std::string& extension_id); // Returns true if |host| is managed by this process manager. @@ -103,8 +103,8 @@ class ExtensionProcessManager : public content::NotificationObserver { // Tracks network requests for a given RenderViewHost, used to know // when network activity is idle for lazy background pages. - void OnNetworkRequestStarted(RenderViewHost* render_view_host); - void OnNetworkRequestDone(RenderViewHost* render_view_host); + void OnNetworkRequestStarted(content::RenderViewHost* render_view_host); + void OnNetworkRequestDone(content::RenderViewHost* render_view_host); typedef std::set<ExtensionHost*> ExtensionHostSet; typedef ExtensionHostSet::const_iterator const_iterator; @@ -146,7 +146,8 @@ class ExtensionProcessManager : public content::NotificationObserver { // Contains all extension-related RenderViewHost instances for all extensions. // We also keep a cache of the host's view type, because that information // is not accessible at registration/deregistration time. - typedef std::map<RenderViewHost*, content::ViewType> ExtensionRenderViews; + typedef std::map<content::RenderViewHost*, + content::ViewType> ExtensionRenderViews; ExtensionRenderViews all_extension_views_; // Close the given |host| iff it's a background page. @@ -160,7 +161,7 @@ class ExtensionProcessManager : public content::NotificationObserver { // Updates a potentially-registered RenderViewHost once it has been // associated with a WebContents. This allows us to gather information that // was not available when the host was first registered. - void UpdateRegisteredRenderView(RenderViewHost* render_view_host); + void UpdateRegisteredRenderView(content::RenderViewHost* render_view_host); DISALLOW_COPY_AND_ASSIGN(ExtensionProcessManager); }; diff --git a/chrome/browser/extensions/extension_tab_id_map.cc b/chrome/browser/extensions/extension_tab_id_map.cc index 52e256d..caf7b5a 100644 --- a/chrome/browser/extensions/extension_tab_id_map.cc +++ b/chrome/browser/extensions/extension_tab_id_map.cc @@ -21,6 +21,7 @@ #include "content/public/browser/web_contents.h" using content::BrowserThread; +using content::RenderViewHost; using content::WebContents; // diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc index 02575ef..1f7d530 100644 --- a/chrome/browser/extensions/extension_tabs_module.cc +++ b/chrome/browser/extensions/extension_tabs_module.cc @@ -76,6 +76,7 @@ using content::NavigationController; using content::NavigationEntry; using content::OpenURLParams; using content::Referrer; +using content::RenderViewHost; using content::WebContents; using namespace extensions::api::windows; diff --git a/chrome/browser/extensions/extension_webnavigation_api.cc b/chrome/browser/extensions/extension_webnavigation_api.cc index 25956fd..0b365c3 100644 --- a/chrome/browser/extensions/extension_webnavigation_api.cc +++ b/chrome/browser/extensions/extension_webnavigation_api.cc @@ -557,7 +557,7 @@ void ExtensionWebNavigationTabObserver::DidStartProvisionalLoadForFrame( bool is_main_frame, const GURL& validated_url, bool is_error_page, - RenderViewHost* render_view_host) { + content::RenderViewHost* render_view_host) { // Ignore navigations of sub frames, if the main frame isn't committed yet. // This might happen if a sub frame triggers a navigation for both the main // frame and itself. Since the sub frame is about to be deleted, and there's diff --git a/chrome/browser/extensions/extension_webnavigation_api.h b/chrome/browser/extensions/extension_webnavigation_api.h index 5aaf6bb0..2458533 100644 --- a/chrome/browser/extensions/extension_webnavigation_api.h +++ b/chrome/browser/extensions/extension_webnavigation_api.h @@ -151,7 +151,7 @@ class ExtensionWebNavigationTabObserver : public content::NotificationObserver, bool is_main_frame, const GURL& validated_url, bool is_error_page, - RenderViewHost* render_view_host) OVERRIDE; + content::RenderViewHost* render_view_host) OVERRIDE; virtual void DidCommitProvisionalLoadForFrame( int64 frame_id, bool is_main_frame, diff --git a/chrome/browser/external_tab_container_win.cc b/chrome/browser/external_tab_container_win.cc index 7c9e1d9..53a3a1b 100644 --- a/chrome/browser/external_tab_container_win.cc +++ b/chrome/browser/external_tab_container_win.cc @@ -73,6 +73,7 @@ using content::NavigationController; using content::NavigationEntry; using content::OpenURLParams; using content::SSLStatus; +using content::RenderViewHost; using content::WebContents; using ui::ViewProp; using WebKit::WebCString; diff --git a/chrome/browser/external_tab_container_win.h b/chrome/browser/external_tab_container_win.h index 7accea4..8f15f6d 100644 --- a/chrome/browser/external_tab_container_win.h +++ b/chrome/browser/external_tab_container_win.h @@ -189,8 +189,8 @@ class ExternalTabContainer : public content::WebContentsDelegate, virtual void CrashedPlugin(content::WebContents* tab, const FilePath& plugin_path) OVERRIDE; - void RegisterRenderViewHost(RenderViewHost* render_view_host); - void UnregisterRenderViewHost(RenderViewHost* render_view_host); + void RegisterRenderViewHost(content::RenderViewHost* render_view_host); + void UnregisterRenderViewHost(content::RenderViewHost* render_view_host); // Overridden from content::WebContentsObserver: virtual bool OnMessageReceived(const IPC::Message& message); @@ -253,8 +253,9 @@ class ExternalTabContainer : public content::WebContentsDelegate, // Helper resource automation registration method, allowing registration of // pending RenderViewHosts. - void RegisterRenderViewHostForAutomation(RenderViewHost* render_view_host, - bool pending_view); + void RegisterRenderViewHostForAutomation( + content::RenderViewHost* render_view_host, + bool pending_view); // Helper function for processing keystokes coming back from the renderer // process. diff --git a/chrome/browser/favicon/favicon_tab_helper.cc b/chrome/browser/favicon/favicon_tab_helper.cc index 3bb104a..b4c396a0 100644 --- a/chrome/browser/favicon/favicon_tab_helper.cc +++ b/chrome/browser/favicon/favicon_tab_helper.cc @@ -140,7 +140,7 @@ NavigationEntry* FaviconTabHelper::GetActiveEntry() { } void FaviconTabHelper::StartDownload(int id, const GURL& url, int image_size) { - RenderViewHost* host = web_contents()->GetRenderViewHost(); + content::RenderViewHost* host = web_contents()->GetRenderViewHost(); host->Send(new IconMsg_DownloadFavicon( host->GetRoutingID(), id, url, image_size)); } diff --git a/chrome/browser/file_select_helper.cc b/chrome/browser/file_select_helper.cc index 1b0b036..5ed79eb 100644 --- a/chrome/browser/file_select_helper.cc +++ b/chrome/browser/file_select_helper.cc @@ -27,6 +27,8 @@ #include "ui/base/l10n/l10n_util.h" using content::BrowserThread; +using content::RenderViewHost; +using content::RenderWidgetHost; using content::WebContents; namespace { diff --git a/chrome/browser/file_select_helper.h b/chrome/browser/file_select_helper.h index 5b58ecb..9f79df6 100644 --- a/chrome/browser/file_select_helper.h +++ b/chrome/browser/file_select_helper.h @@ -16,9 +16,9 @@ #include "net/base/directory_lister.h" class Profile; -class RenderViewHost; namespace content { +class RenderViewHost; struct FileChooserParams; } @@ -33,13 +33,13 @@ class FileSelectHelper explicit FileSelectHelper(Profile* profile); // Show the file chooser dialog. - void RunFileChooser(RenderViewHost* render_view_host, + void RunFileChooser(content::RenderViewHost* render_view_host, content::WebContents* tab_contents, const content::FileChooserParams& params); // Enumerates all the files in directory. void EnumerateDirectory(int request_id, - RenderViewHost* render_view_host, + content::RenderViewHost* render_view_host, const FilePath& path); private: @@ -94,7 +94,7 @@ class FileSelectHelper // Kicks off a new directory enumeration. void StartNewEnumeration(const FilePath& path, int request_id, - RenderViewHost* render_view_host); + content::RenderViewHost* render_view_host); // Callbacks from directory enumeration. virtual void OnListFile( @@ -118,7 +118,7 @@ class FileSelectHelper // The RenderViewHost and WebContents for the page showing a file dialog // (may only be one such dialog). - RenderViewHost* render_view_host_; + content::RenderViewHost* render_view_host_; content::WebContents* web_contents_; // Dialog box used for choosing files to upload from file form fields. diff --git a/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc b/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc index e218c25..f4bad47 100644 --- a/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc +++ b/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc @@ -207,7 +207,7 @@ void GeolocationPermissionContextTests::AddNewTab(const GURL& url) { WebContents::Create(profile(), NULL, MSG_ROUTING_NONE, NULL, NULL); new_tab->GetController().LoadURL( url, content::Referrer(), content::PAGE_TRANSITION_TYPED, std::string()); - static_cast<TestRenderViewHost*>(new_tab->GetRenderViewHost())-> + static_cast<content::TestRenderViewHost*>(new_tab->GetRenderViewHost())-> SendNavigate(extra_tabs_.size() + 1, url); extra_tabs_.push_back(new TabContentsWrapper(new_tab)); } diff --git a/chrome/browser/geolocation/geolocation_browsertest.cc b/chrome/browser/geolocation/geolocation_browsertest.cc index 49a2627..e4f4380 100644 --- a/chrome/browser/geolocation/geolocation_browsertest.cc +++ b/chrome/browser/geolocation/geolocation_browsertest.cc @@ -133,7 +133,7 @@ class GeolocationNotificationObserver : public content::NotificationObserver { } } - void AddWatchAndWaitForNotification(RenderViewHost* render_view_host, + void AddWatchAndWaitForNotification(content::RenderViewHost* render_view_host, const std::wstring& iframe_xpath) { LOG(WARNING) << "will add geolocation watch"; std::string script = diff --git a/chrome/browser/instant/instant_browsertest.cc b/chrome/browser/instant/instant_browsertest.cc index 6ef2750..3447b8f 100644 --- a/chrome/browser/instant/instant_browsertest.cc +++ b/chrome/browser/instant/instant_browsertest.cc @@ -141,7 +141,8 @@ class InstantTest : public InProcessBrowserTest { bool SetSuggestionsJavascriptArgument(const std::string& argument) { std::wstring script = UTF8ToWide(base::StringPrintf( "window.setSuggestionsArgument = %s;", argument.c_str())); - RenderViewHost* rvh = preview()->web_contents()->GetRenderViewHost(); + content::RenderViewHost* rvh = + preview()->web_contents()->GetRenderViewHost(); return ui_test_utils::ExecuteJavaScript(rvh, std::wstring(), script); } diff --git a/chrome/browser/instant/instant_loader.cc b/chrome/browser/instant/instant_loader.cc index ae6ed5e..14cbf31 100644 --- a/chrome/browser/instant/instant_loader.cc +++ b/chrome/browser/instant/instant_loader.cc @@ -55,6 +55,8 @@ using content::NavigationController; using content::NavigationEntry; +using content::RenderViewHost; +using content::RenderWidgetHost; using content::SessionStorageNamespace; using content::WebContents; diff --git a/chrome/browser/memory_details.cc b/chrome/browser/memory_details.cc index c5b8a69..3237eb7 100644 --- a/chrome/browser/memory_details.cc +++ b/chrome/browser/memory_details.cc @@ -38,6 +38,8 @@ using content::BrowserChildProcessHostIterator; using content::BrowserThread; using content::NavigationEntry; +using content::RenderViewHost; +using content::RenderWidgetHost; using content::WebContents; // static diff --git a/chrome/browser/memory_purger.cc b/chrome/browser/memory_purger.cc index 2fd534b..f3f6272 100644 --- a/chrome/browser/memory_purger.cc +++ b/chrome/browser/memory_purger.cc @@ -85,7 +85,7 @@ void MemoryPurger::PurgeAll() { // static void MemoryPurger::PurgeBrowser() { // Dump the backing stores. - RenderWidgetHost::RemoveAllBackingStores(); + content::RenderWidgetHost::RemoveAllBackingStores(); // Per-profile cleanup. scoped_refptr<PurgeMemoryIOHelper> purge_memory_io_helper( diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc index d8b67a1..c0e350f 100644 --- a/chrome/browser/net/chrome_network_delegate.cc +++ b/chrome/browser/net/chrome_network_delegate.cc @@ -31,6 +31,7 @@ #endif using content::BrowserThread; +using content::RenderViewHost; namespace { diff --git a/chrome/browser/notifications/balloon_host.cc b/chrome/browser/notifications/balloon_host.cc index 7934a44..bc79b3c 100644 --- a/chrome/browser/notifications/balloon_host.cc +++ b/chrome/browser/notifications/balloon_host.cc @@ -85,7 +85,7 @@ void BalloonHost::AddNewContents(WebContents* source, browser->AddWebContents(new_contents, disposition, initial_pos, user_gesture); } -void BalloonHost::RenderViewCreated(RenderViewHost* render_view_host) { +void BalloonHost::RenderViewCreated(content::RenderViewHost* render_view_host) { render_view_host->DisableScrollbarsForThreshold( balloon_->min_scrollbar_size()); render_view_host->WasResized(); diff --git a/chrome/browser/notifications/balloon_host.h b/chrome/browser/notifications/balloon_host.h index f05d53e..3913c71 100644 --- a/chrome/browser/notifications/balloon_host.h +++ b/chrome/browser/notifications/balloon_host.h @@ -68,7 +68,8 @@ class BalloonHost : public content::WebContentsDelegate, bool user_gesture) OVERRIDE; // content::WebContentsObserver implementation: - virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; + virtual void RenderViewCreated( + content::RenderViewHost* render_view_host) OVERRIDE; virtual void RenderViewReady() OVERRIDE; virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; diff --git a/chrome/browser/notifications/desktop_notification_service.cc b/chrome/browser/notifications/desktop_notification_service.cc index f22b2a0..92c0ee7 100644 --- a/chrome/browser/notifications/desktop_notification_service.cc +++ b/chrome/browser/notifications/desktop_notification_service.cc @@ -43,6 +43,7 @@ #include "ui/base/resource/resource_bundle.h" using content::BrowserThread; +using content::RenderViewHost; using content::WebContents; using WebKit::WebNotificationPresenter; using WebKit::WebTextDirection; diff --git a/chrome/browser/notifications/notification_object_proxy.cc b/chrome/browser/notifications/notification_object_proxy.cc index e8afece..6c838df 100644 --- a/chrome/browser/notifications/notification_object_proxy.cc +++ b/chrome/browser/notifications/notification_object_proxy.cc @@ -7,6 +7,8 @@ #include "base/stringprintf.h" #include "content/public/browser/render_view_host.h" +using content::RenderViewHost; + NotificationObjectProxy::NotificationObjectProxy(int process_id, int route_id, int notification_id, bool worker) : process_id_(process_id), diff --git a/chrome/browser/oom_priority_manager.cc b/chrome/browser/oom_priority_manager.cc index 423f894..0d23aae 100644 --- a/chrome/browser/oom_priority_manager.cc +++ b/chrome/browser/oom_priority_manager.cc @@ -217,7 +217,8 @@ void OomPriorityManager::Observe(int type, case content::NOTIFICATION_RENDER_WIDGET_VISIBILITY_CHANGED: { bool visible = *content::Details<bool>(details).ptr(); if (visible) { - focused_tab_pid_ = content::Source<RenderWidgetHost>(source).ptr()-> + focused_tab_pid_ = + content::Source<content::RenderWidgetHost>(source).ptr()-> GetProcess()->GetHandle(); // If the currently focused tab already has a lower score, do not diff --git a/chrome/browser/prerender/prerender_browsertest.cc b/chrome/browser/prerender/prerender_browsertest.cc index bc1d191..8cd4ecc 100644 --- a/chrome/browser/prerender/prerender_browsertest.cc +++ b/chrome/browser/prerender/prerender_browsertest.cc @@ -53,6 +53,8 @@ using content::DevToolsManager; using content::NavigationController; using content::OpenURLParams; using content::Referrer; +using content::RenderViewHost; +using content::RenderWidgetHost; using content::WebContents; // Prerender tests work as follows: diff --git a/chrome/browser/prerender/prerender_contents.cc b/chrome/browser/prerender/prerender_contents.cc index c8bbffb..92ba801 100644 --- a/chrome/browser/prerender/prerender_contents.cc +++ b/chrome/browser/prerender/prerender_contents.cc @@ -35,6 +35,7 @@ using content::DownloadItem; using content::OpenURLParams; +using content::RenderViewHost; using content::WebContents; namespace prerender { diff --git a/chrome/browser/prerender/prerender_contents.h b/chrome/browser/prerender/prerender_contents.h index d43558a..139e4ff 100644 --- a/chrome/browser/prerender/prerender_contents.h +++ b/chrome/browser/prerender/prerender_contents.h @@ -20,7 +20,6 @@ #include "content/public/common/referrer.h" class Profile; -class RenderViewHost; class TabContentsWrapper; struct FaviconURL; @@ -29,6 +28,7 @@ class ProcessMetrics; } namespace content { +class RenderViewHost; class RenderViewHostDelegate; class SessionStorageNamespace; } @@ -107,15 +107,15 @@ class PrerenderContents : public content::NotificationObserver, // |source_render_view_host| is the RenderViewHost that initiated // prerendering. virtual void StartPrerendering( - const RenderViewHost* source_render_view_host, + const content::RenderViewHost* source_render_view_host, content::SessionStorageNamespace* session_storage_namespace); // Verifies that the prerendering is not using too many resources, and kills // it if not. void DestroyWhenUsingTooManyResources(); - RenderViewHost* render_view_host_mutable(); - const RenderViewHost* render_view_host() const; + content::RenderViewHost* render_view_host_mutable(); + const content::RenderViewHost* render_view_host() const; string16 title() const { return title_; } int32 page_id() const { return page_id_; } GURL icon_url() const { return icon_url_; } @@ -165,7 +165,7 @@ class PrerenderContents : public content::NotificationObserver, bool is_main_frame, const GURL& validated_url, bool is_error_page, - RenderViewHost* render_view_host) OVERRIDE; + content::RenderViewHost* render_view_host) OVERRIDE; virtual void DidFinishLoad(int64 frame_id, const GURL& validated_url, bool is_main_frame) OVERRIDE; @@ -231,7 +231,8 @@ class PrerenderContents : public content::NotificationObserver, // Called whenever a RenderViewHost is created for prerendering. Only called // once the RenderViewHost has a RenderView and RenderWidgetHostView. - virtual void OnRenderViewHostCreated(RenderViewHost* new_render_view_host); + virtual void OnRenderViewHostCreated( + content::RenderViewHost* new_render_view_host); content::NotificationRegistrar& notification_registrar() { return notification_registrar_; diff --git a/chrome/browser/prerender/prerender_manager.cc b/chrome/browser/prerender/prerender_manager.cc index 86ed1cd..0b8589f 100644 --- a/chrome/browser/prerender/prerender_manager.cc +++ b/chrome/browser/prerender/prerender_manager.cc @@ -49,6 +49,7 @@ #include "content/public/browser/web_contents_delegate.h" using content::BrowserThread; +using content::RenderViewHost; using content::SessionStorageNamespace; using content::WebContents; diff --git a/chrome/browser/prerender/prerender_manager.h b/chrome/browser/prerender/prerender_manager.h index 5bba188..2d515b5 100644 --- a/chrome/browser/prerender/prerender_manager.h +++ b/chrome/browser/prerender/prerender_manager.h @@ -181,7 +181,8 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>, void MarkWebContentsAsNotPrerendered(content::WebContents* web_contents); bool IsWebContentsPrerendered(content::WebContents* web_contents) const; bool WouldWebContentsBePrerendered(content::WebContents* web_contents) const; - bool IsOldRenderViewHost(const RenderViewHost* render_view_host) const; + bool IsOldRenderViewHost( + const content::RenderViewHost* render_view_host) const; // Checks whether navigation to the provided URL has occurred in a visible // tab recently. diff --git a/chrome/browser/prerender/prerender_manager_unittest.cc b/chrome/browser/prerender/prerender_manager_unittest.cc index 29e19ec..8eb1aec 100644 --- a/chrome/browser/prerender/prerender_manager_unittest.cc +++ b/chrome/browser/prerender/prerender_manager_unittest.cc @@ -42,7 +42,7 @@ class DummyPrerenderContents : public PrerenderContents { } virtual void StartPrerendering( - const RenderViewHost* source_render_view_host, + const content::RenderViewHost* source_render_view_host, content::SessionStorageNamespace* session_storage_namespace) OVERRIDE { has_started_ = true; } diff --git a/chrome/browser/prerender/prerender_render_view_host_observer.cc b/chrome/browser/prerender/prerender_render_view_host_observer.cc index 7a5d168..fdc6342 100644 --- a/chrome/browser/prerender/prerender_render_view_host_observer.cc +++ b/chrome/browser/prerender/prerender_render_view_host_observer.cc @@ -8,6 +8,8 @@ #include "chrome/common/icon_messages.h" #include "chrome/common/render_messages.h" +using content::RenderViewHost; + namespace prerender { PrerenderRenderViewHostObserver::PrerenderRenderViewHostObserver( diff --git a/chrome/browser/prerender/prerender_render_view_host_observer.h b/chrome/browser/prerender/prerender_render_view_host_observer.h index 86f3620..e6ecf8e 100644 --- a/chrome/browser/prerender/prerender_render_view_host_observer.h +++ b/chrome/browser/prerender/prerender_render_view_host_observer.h @@ -10,7 +10,10 @@ #include "content/public/browser/render_view_host_observer.h" struct FaviconURL; + +namespace content { class RenderViewHost; +} namespace IPC { class Message; @@ -24,9 +27,9 @@ class PrerenderContents; class PrerenderRenderViewHostObserver : public content::RenderViewHostObserver { public: PrerenderRenderViewHostObserver(PrerenderContents* prerender_contents, - RenderViewHost* render_view_host); + content::RenderViewHost* render_view_host); - virtual void RenderViewHostDestroyed(RenderViewHost* rvh) OVERRIDE; + virtual void RenderViewHostDestroyed(content::RenderViewHost* rvh) OVERRIDE; virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; virtual bool Send(IPC::Message* message) OVERRIDE; diff --git a/chrome/browser/prerender/prerender_tab_helper.cc b/chrome/browser/prerender/prerender_tab_helper.cc index 07f704b..badb85c 100644 --- a/chrome/browser/prerender/prerender_tab_helper.cc +++ b/chrome/browser/prerender/prerender_tab_helper.cc @@ -225,7 +225,7 @@ void PrerenderTabHelper::DidStartProvisionalLoadForFrame( bool is_main_frame, const GURL& validated_url, bool is_error_page, - RenderViewHost* render_view_host) { + content::RenderViewHost* render_view_host) { if (is_main_frame) { RecordPageviewEvent(PAGEVIEW_EVENT_LOAD_START); if (IsTopSite(validated_url)) diff --git a/chrome/browser/prerender/prerender_tab_helper.h b/chrome/browser/prerender/prerender_tab_helper.h index b937506..156bcc5 100644 --- a/chrome/browser/prerender/prerender_tab_helper.h +++ b/chrome/browser/prerender/prerender_tab_helper.h @@ -33,7 +33,7 @@ class PrerenderTabHelper : public content::WebContentsObserver { bool is_main_frame, const GURL& validated_url, bool is_error_page, - RenderViewHost* render_view_host) OVERRIDE; + content::RenderViewHost* render_view_host) OVERRIDE; // Called when this prerendered TabContents has just been swapped in. void PrerenderSwappedIn(); diff --git a/chrome/browser/prerender/prerender_tracker.cc b/chrome/browser/prerender/prerender_tracker.cc index 1198a11..1eb0b0a 100644 --- a/chrome/browser/prerender/prerender_tracker.cc +++ b/chrome/browser/prerender/prerender_tracker.cc @@ -15,6 +15,7 @@ #include "net/base/load_flags.h" using content::BrowserThread; +using content::RenderViewHost; namespace prerender { diff --git a/chrome/browser/printing/cloud_print/cloud_print_setup_flow.cc b/chrome/browser/printing/cloud_print/cloud_print_setup_flow.cc index 65dda87..e907fea 100644 --- a/chrome/browser/printing/cloud_print/cloud_print_setup_flow.cc +++ b/chrome/browser/printing/cloud_print/cloud_print_setup_flow.cc @@ -336,7 +336,8 @@ void CloudPrintSetupFlow::ExecuteJavascriptInIFrame( const string16& iframe_xpath, const string16& js) { if (web_ui_) { - RenderViewHost* rvh = web_ui_->GetWebContents()->GetRenderViewHost(); + content::RenderViewHost* rvh = + web_ui_->GetWebContents()->GetRenderViewHost(); rvh->ExecuteJavascriptInWebFrame(iframe_xpath, js); } } diff --git a/chrome/browser/printing/print_dialog_cloud.cc b/chrome/browser/printing/print_dialog_cloud.cc index b293094..ea70c51 100644 --- a/chrome/browser/printing/print_dialog_cloud.cc +++ b/chrome/browser/printing/print_dialog_cloud.cc @@ -114,6 +114,7 @@ using content::BrowserThread; using content::NavigationController; using content::NavigationEntry; +using content::RenderViewHost; using content::WebContents; using content::WebUIMessageHandler; diff --git a/chrome/browser/printing/print_dialog_cloud_unittest.cc b/chrome/browser/printing/print_dialog_cloud_unittest.cc index 22f7a1a..96da34b 100644 --- a/chrome/browser/printing/print_dialog_cloud_unittest.cc +++ b/chrome/browser/printing/print_dialog_cloud_unittest.cc @@ -138,7 +138,7 @@ using internal_cloud_print_helpers::CloudPrintDataSender; class MockExternalHtmlDialogUI : public ExternalHtmlDialogUI { public: MOCK_METHOD1(RenderViewCreated, - void(RenderViewHost* render_view_host)); + void(content::RenderViewHost* render_view_host)); }; class MockCloudPrintDataSenderHelper : public CloudPrintDataSenderHelper { diff --git a/chrome/browser/printing/print_view_manager.cc b/chrome/browser/printing/print_view_manager.cc index 10e7d1c..59342d8 100644 --- a/chrome/browser/printing/print_view_manager.cc +++ b/chrome/browser/printing/print_view_manager.cc @@ -34,6 +34,7 @@ using base::TimeDelta; using content::BrowserThread; +using content::RenderViewHost; namespace { diff --git a/chrome/browser/renderer_host/chrome_render_view_host_observer.cc b/chrome/browser/renderer_host/chrome_render_view_host_observer.cc index 4877bf4..91da264 100644 --- a/chrome/browser/renderer_host/chrome_render_view_host_observer.cc +++ b/chrome/browser/renderer_host/chrome_render_view_host_observer.cc @@ -21,6 +21,7 @@ #include "content/public/browser/site_instance.h" using content::ChildProcessSecurityPolicy; +using content::RenderViewHost; using content::SiteInstance; ChromeRenderViewHostObserver::ChromeRenderViewHostObserver( diff --git a/chrome/browser/renderer_host/chrome_render_view_host_observer.h b/chrome/browser/renderer_host/chrome_render_view_host_observer.h index a7ab2d6..3d43e53 100644 --- a/chrome/browser/renderer_host/chrome_render_view_host_observer.h +++ b/chrome/browser/renderer_host/chrome_render_view_host_observer.h @@ -19,13 +19,13 @@ class Profile; // same lifetime. class ChromeRenderViewHostObserver : public content::RenderViewHostObserver { public: - ChromeRenderViewHostObserver(RenderViewHost* render_view_host, + ChromeRenderViewHostObserver(content::RenderViewHost* render_view_host, chrome_browser_net::Predictor* predictor); virtual ~ChromeRenderViewHostObserver(); // content::RenderViewHostObserver overrides. virtual void RenderViewHostInitialized() OVERRIDE; - virtual void RenderViewHostDestroyed(RenderViewHost* rvh) OVERRIDE; + virtual void RenderViewHostDestroyed(content::RenderViewHost* rvh) OVERRIDE; virtual void Navigate(const GURL& url) OVERRIDE; virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; @@ -39,7 +39,7 @@ class ChromeRenderViewHostObserver : public content::RenderViewHostObserver { // Gets the extension or app (if any) that is associated with the RVH. const Extension* GetExtension(); // Cleans up when a RenderViewHost is removed, or on destruction. - void RemoveRenderViewHostForExtensions(RenderViewHost* rvh); + void RemoveRenderViewHostForExtensions(content::RenderViewHost* rvh); void OnFocusedEditableNodeTouched(); Profile* profile_; diff --git a/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.h b/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.h index f3607be..c5d6613 100644 --- a/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.h +++ b/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.h @@ -11,7 +11,9 @@ #include "base/memory/scoped_ptr.h" #import "content/public/browser/render_widget_host_view_mac_delegate.h" +namespace content { class RenderWidgetHost; +} namespace ChromeRenderWidgetHostViewMacDelegateInternal { class SpellCheckRenderViewObserver; @@ -20,7 +22,7 @@ class SpellCheckRenderViewObserver; @interface ChromeRenderWidgetHostViewMacDelegate : NSObject<RenderWidgetHostViewMacDelegate> { @private - RenderWidgetHost* renderWidgetHost_; // weak + content::RenderWidgetHost* renderWidgetHost_; // weak scoped_ptr<ChromeRenderWidgetHostViewMacDelegateInternal:: SpellCheckRenderViewObserver> spellingObserver_; @@ -48,7 +50,7 @@ class SpellCheckRenderViewObserver; BOOL spellcheckChecked_; } -- (id)initWithRenderWidgetHost:(RenderWidgetHost*)renderWidgetHost; +- (id)initWithRenderWidgetHost:(content::RenderWidgetHost*)renderWidgetHost; - (void)viewGone:(NSView*)view; - (BOOL)handleEvent:(NSEvent*)event; diff --git a/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm b/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm index 2a7bf97..8599093 100644 --- a/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm +++ b/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm @@ -22,6 +22,8 @@ #include "content/public/browser/render_widget_host_view.h" #include "content/public/browser/web_contents.h" +using content::RenderViewHost; + // Declare things that are part of the 10.7 SDK. #if !defined(MAC_OS_X_VERSION_10_7) || \ MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 @@ -108,7 +110,7 @@ class SpellCheckRenderViewObserver : public content::RenderViewHostObserver { @implementation ChromeRenderWidgetHostViewMacDelegate -- (id)initWithRenderWidgetHost:(RenderWidgetHost*)renderWidgetHost { +- (id)initWithRenderWidgetHost:(content::RenderWidgetHost*)renderWidgetHost { self = [super init]; if (self) { renderWidgetHost_ = renderWidgetHost; diff --git a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc index 4be386f..b217056 100644 --- a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc +++ b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc @@ -44,6 +44,7 @@ #endif using content::BrowserThread; +using content::RenderViewHost; using content::ResourceDispatcherHostLoginDelegate; namespace { diff --git a/chrome/browser/renderer_host/offline_resource_throttle.cc b/chrome/browser/renderer_host/offline_resource_throttle.cc index a7f370c..06d88b0 100644 --- a/chrome/browser/renderer_host/offline_resource_throttle.cc +++ b/chrome/browser/renderer_host/offline_resource_throttle.cc @@ -28,6 +28,7 @@ #include "webkit/appcache/appcache_service.h" using content::BrowserThread; +using content::RenderViewHost; using content::ResourceContext; using content::WebContents; diff --git a/chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc b/chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc index b3a7dbd..34aa193 100644 --- a/chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc +++ b/chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc @@ -14,6 +14,9 @@ #include "content/public/browser/render_view_host.h" #include "content/public/browser/render_view_host_delegate.h" +using content::RenderViewHost; +using content::RenderWidgetHost; + namespace { RenderViewHost* FindFirstDevToolsHost() { diff --git a/chrome/browser/renderer_host/transfer_navigation_resource_throttle.cc b/chrome/browser/renderer_host/transfer_navigation_resource_throttle.cc index d676438..ee03ac3 100644 --- a/chrome/browser/renderer_host/transfer_navigation_resource_throttle.cc +++ b/chrome/browser/renderer_host/transfer_navigation_resource_throttle.cc @@ -26,8 +26,8 @@ void RequestTransferURLOnUIThread(int render_process_id, WindowOpenDisposition window_open_disposition, int64 frame_id, const GlobalRequestID& request_id) { - RenderViewHost* rvh = RenderViewHost::FromID(render_process_id, - render_view_id); + content::RenderViewHost* rvh = + content::RenderViewHost::FromID(render_process_id, render_view_id); if (!rvh) return; diff --git a/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc b/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc index 1346236..1a0bad6 100644 --- a/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc +++ b/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc @@ -96,7 +96,7 @@ class BrowserFeatureExtractorTest : public ChromeRenderViewHostTestHarness { type, std::string()); static int page_id = 0; - RenderViewHost* rvh = contents()->pending_rvh(); + content::RenderViewHost* rvh = contents()->pending_rvh(); if (!rvh) { rvh = contents()->GetRenderViewHost(); } diff --git a/chrome/browser/safe_browsing/client_side_detection_host.cc b/chrome/browser/safe_browsing/client_side_detection_host.cc index d4b9696..0c69c6e 100644 --- a/chrome/browser/safe_browsing/client_side_detection_host.cc +++ b/chrome/browser/safe_browsing/client_side_detection_host.cc @@ -216,7 +216,7 @@ class ClientSideDetectionHost::ShouldClassifyUrlRequest // before it is. VLOG(1) << "Instruct renderer to start phishing detection for URL: " << params_.url; - RenderViewHost* rvh = web_contents_->GetRenderViewHost(); + content::RenderViewHost* rvh = web_contents_->GetRenderViewHost(); rvh->Send(new SafeBrowsingMsg_StartPhishingDetection( rvh->GetRoutingID(), params_.url)); } diff --git a/chrome/browser/safe_browsing/malware_details.cc b/chrome/browser/safe_browsing/malware_details.cc index 877830e..9324aa1 100644 --- a/chrome/browser/safe_browsing/malware_details.cc +++ b/chrome/browser/safe_browsing/malware_details.cc @@ -213,7 +213,7 @@ void MalwareDetails::StartCollection() { // Get URLs of frames, scripts etc from the DOM. // OnReceivedMalwareDOMDetails will be called when the renderer replies. - RenderViewHost* view = web_contents()->GetRenderViewHost(); + content::RenderViewHost* view = web_contents()->GetRenderViewHost(); view->Send(new SafeBrowsingMsg_GetMalwareDOMDetails(view->GetRoutingID())); } diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc index c0da7dd..07c5003 100644 --- a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc +++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc @@ -121,7 +121,7 @@ class SafeBrowsingBlockingPageTest : public ChromeRenderViewHostTestHarness { contents()->GetController().GoBack(); // The pending RVH should commit for cross-site navigations. - RenderViewHost* rvh = is_cross_site ? + content::RenderViewHost* rvh = is_cross_site ? contents()->pending_rvh() : contents()->GetRenderViewHost(); contents()->TestDidNavigate(rvh, entry->GetPageID(), GURL(entry->GetURL()), diff --git a/chrome/browser/safe_browsing/safe_browsing_tab_observer.cc b/chrome/browser/safe_browsing/safe_browsing_tab_observer.cc index a625a24..c7c9fb1 100644 --- a/chrome/browser/safe_browsing/safe_browsing_tab_observer.cc +++ b/chrome/browser/safe_browsing/safe_browsing_tab_observer.cc @@ -90,7 +90,7 @@ void SafeBrowsingTabObserver::UpdateSafebrowsingDetectionHost() { safebrowsing_detection_host_.reset(); } - RenderViewHost* rvh = wrapper_->web_contents()->GetRenderViewHost(); + content::RenderViewHost* rvh = wrapper_->web_contents()->GetRenderViewHost(); rvh->Send(new ChromeViewMsg_SetClientSidePhishingDetection( rvh->GetRoutingID(), safe_browsing)); #endif diff --git a/chrome/browser/sessions/restore_tab_helper.cc b/chrome/browser/sessions/restore_tab_helper.cc index 3a3f21a..277fc5e 100644 --- a/chrome/browser/sessions/restore_tab_helper.cc +++ b/chrome/browser/sessions/restore_tab_helper.cc @@ -40,7 +40,8 @@ void RestoreTabHelper::SetWindowID(const SessionID& id) { web_contents()->GetRenderViewHost()->GetRoutingID(), id.id())); } -void RestoreTabHelper::RenderViewCreated(RenderViewHost* render_view_host) { +void RestoreTabHelper::RenderViewCreated( + content::RenderViewHost* render_view_host) { render_view_host->Send( new ExtensionMsg_UpdateBrowserWindowId(render_view_host->GetRoutingID(), window_id_.id())); diff --git a/chrome/browser/sessions/restore_tab_helper.h b/chrome/browser/sessions/restore_tab_helper.h index c5abbea..4d05228 100644 --- a/chrome/browser/sessions/restore_tab_helper.h +++ b/chrome/browser/sessions/restore_tab_helper.h @@ -25,7 +25,8 @@ class RestoreTabHelper : public content::WebContentsObserver { const SessionID& window_id() const { return window_id_; } // content::WebContentsObserver: - virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; + virtual void RenderViewCreated( + content::RenderViewHost* render_view_host) OVERRIDE; private: // Unique identifier of the tab for session restore. This id is only unique diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc index 8065582..06e47e7 100644 --- a/chrome/browser/sessions/session_restore.cc +++ b/chrome/browser/sessions/session_restore.cc @@ -47,6 +47,7 @@ #endif using content::NavigationController; +using content::RenderWidgetHost; using content::WebContents; namespace { diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc index 297225a..fabbb0f 100644 --- a/chrome/browser/ssl/ssl_browser_tests.cc +++ b/chrome/browser/ssl/ssl_browser_tests.cc @@ -391,7 +391,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, // Wait until we hear the load failure, and make sure we haven't swapped out // the previous page. Prevents regression of http://crbug.com/82667. load_failed_observer.Wait(); - EXPECT_FALSE(TestRenderViewHost::IsRenderViewHostSwappedOut( + EXPECT_FALSE(content::TestRenderViewHost::IsRenderViewHostSwappedOut( tab->GetRenderViewHost())); // We should be back at the original good page. diff --git a/chrome/browser/tab_contents/chrome_web_contents_view_gtk_delegate.cc b/chrome/browser/tab_contents/chrome_web_contents_view_gtk_delegate.cc index 9585146..86af489 100644 --- a/chrome/browser/tab_contents/chrome_web_contents_view_gtk_delegate.cc +++ b/chrome/browser/tab_contents/chrome_web_contents_view_gtk_delegate.cc @@ -112,7 +112,8 @@ void ChromeWebContentsViewGtkDelegate::ShowContextMenu( NOTREACHED(); return; } - view = RenderWidgetHost::FromIPCChannelListener(listener)->GetView(); + view = + content::RenderWidgetHost::FromIPCChannelListener(listener)->GetView(); } else { view = view_->web_contents()->GetRenderWidgetHostView(); } diff --git a/chrome/browser/tab_contents/chrome_web_contents_view_mac_delegate.h b/chrome/browser/tab_contents/chrome_web_contents_view_mac_delegate.h index 4713743..18267b3 100644 --- a/chrome/browser/tab_contents/chrome_web_contents_view_mac_delegate.h +++ b/chrome/browser/tab_contents/chrome_web_contents_view_mac_delegate.h @@ -30,7 +30,7 @@ class ChromeWebContentsViewMacDelegate // Overridden from WebContentsViewMacDelegate: virtual NSObject<RenderWidgetHostViewMacDelegate>* CreateRenderWidgetHostViewDelegate( - RenderWidgetHost* render_widget_host) OVERRIDE; + content::RenderWidgetHost* render_widget_host) OVERRIDE; virtual content::WebDragDestDelegate* DragDelegate() OVERRIDE; virtual void ShowContextMenu( const content::ContextMenuParams& params) OVERRIDE; diff --git a/chrome/browser/tab_contents/chrome_web_contents_view_mac_delegate.mm b/chrome/browser/tab_contents/chrome_web_contents_view_mac_delegate.mm index 2b787a02..e9117762 100644 --- a/chrome/browser/tab_contents/chrome_web_contents_view_mac_delegate.mm +++ b/chrome/browser/tab_contents/chrome_web_contents_view_mac_delegate.mm @@ -29,7 +29,7 @@ ChromeWebContentsViewMacDelegate::~ChromeWebContentsViewMacDelegate() { NSObject<RenderWidgetHostViewMacDelegate>* ChromeWebContentsViewMacDelegate::CreateRenderWidgetHostViewDelegate( - RenderWidgetHost* render_widget_host) { + content::RenderWidgetHost* render_widget_host) { return [[ChromeRenderWidgetHostViewMacDelegate alloc] initWithRenderWidgetHost:render_widget_host]; } diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc index 2bf2ebe..796003c 100644 --- a/chrome/browser/tab_contents/render_view_context_menu.cc +++ b/chrome/browser/tab_contents/render_view_context_menu.cc @@ -93,6 +93,7 @@ using content::DownloadManager; using content::NavigationController; using content::NavigationEntry; using content::OpenURLParams; +using content::RenderViewHost; using content::SSLStatus; using content::UserMetricsAction; using content::WebContents; diff --git a/chrome/browser/tab_contents/render_view_context_menu.h b/chrome/browser/tab_contents/render_view_context_menu.h index 23b49d5..24b4513 100644 --- a/chrome/browser/tab_contents/render_view_context_menu.h +++ b/chrome/browser/tab_contents/render_view_context_menu.h @@ -25,11 +25,11 @@ class ExtensionMenuItem; class PrintPreviewContextMenuObserver; class Profile; -class RenderViewHost; class SpellingMenuObserver; class SpellCheckerSubMenuObserver; namespace content { +class RenderViewHost; class WebContents; } @@ -112,7 +112,7 @@ class RenderViewContextMenuProxy { // Retrieve the RenderViewHost (or Profile) instance associated with a context // menu, respectively. - virtual RenderViewHost* GetRenderViewHost() const = 0; + virtual content::RenderViewHost* GetRenderViewHost() const = 0; virtual Profile* GetProfile() const = 0; }; @@ -152,7 +152,7 @@ class RenderViewContextMenu : public ui::SimpleMenuModel::Delegate, bool enabled, bool hidden, const string16& title) OVERRIDE; - virtual RenderViewHost* GetRenderViewHost() const OVERRIDE; + virtual content::RenderViewHost* GetRenderViewHost() const OVERRIDE; virtual Profile* GetProfile() const OVERRIDE; protected: diff --git a/chrome/browser/tab_contents/spellchecker_submenu_observer_hunspell.cc b/chrome/browser/tab_contents/spellchecker_submenu_observer_hunspell.cc index 5f8868a..9277f9e 100644 --- a/chrome/browser/tab_contents/spellchecker_submenu_observer_hunspell.cc +++ b/chrome/browser/tab_contents/spellchecker_submenu_observer_hunspell.cc @@ -166,7 +166,7 @@ void SpellCheckerSubMenuObserver::ExecuteCommand(int command_id) { return; } - RenderViewHost* rvh = proxy_->GetRenderViewHost(); + content::RenderViewHost* rvh = proxy_->GetRenderViewHost(); switch (command_id) { case IDC_CHECK_SPELLING_OF_THIS_FIELD: rvh->Send(new SpellCheckMsg_ToggleSpellCheck(rvh->GetRoutingID())); diff --git a/chrome/browser/tab_contents/spellchecker_submenu_observer_mac.cc b/chrome/browser/tab_contents/spellchecker_submenu_observer_mac.cc index 67ed833..e8e6bf3 100644 --- a/chrome/browser/tab_contents/spellchecker_submenu_observer_mac.cc +++ b/chrome/browser/tab_contents/spellchecker_submenu_observer_mac.cc @@ -117,7 +117,7 @@ bool SpellCheckerSubMenuObserver::IsCommandIdEnabled(int command_id) { void SpellCheckerSubMenuObserver::ExecuteCommand(int command_id) { DCHECK(IsCommandIdSupported(command_id)); - RenderViewHost* rvh = proxy_->GetRenderViewHost(); + content::RenderViewHost* rvh = proxy_->GetRenderViewHost(); switch (command_id) { case IDC_CHECK_SPELLING_OF_THIS_FIELD: rvh->Send(new SpellCheckMsg_ToggleSpellCheck(rvh->GetRoutingID())); diff --git a/chrome/browser/tab_contents/spelling_menu_observer.cc b/chrome/browser/tab_contents/spelling_menu_observer.cc index 39fa4b1..47e835b 100644 --- a/chrome/browser/tab_contents/spelling_menu_observer.cc +++ b/chrome/browser/tab_contents/spelling_menu_observer.cc @@ -229,7 +229,7 @@ void SpellingMenuObserver::ExecuteCommand(int command_id) { // item, we directly update/ the profile and stop integrating the spelling // service immediately. if (!integrate_spelling_service_) { - RenderViewHost* rvh = proxy_->GetRenderViewHost(); + content::RenderViewHost* rvh = proxy_->GetRenderViewHost(); gfx::Rect rect = rvh->GetView()->GetViewBounds(); ConfirmBubbleModel::Show(rvh->GetView()->GetNativeView(), gfx::Point(rect.CenterPoint().x(), rect.y()), diff --git a/chrome/browser/tab_contents/spelling_menu_observer_browsertest.cc b/chrome/browser/tab_contents/spelling_menu_observer_browsertest.cc index 8d87286..af1f18f 100644 --- a/chrome/browser/tab_contents/spelling_menu_observer_browsertest.cc +++ b/chrome/browser/tab_contents/spelling_menu_observer_browsertest.cc @@ -15,6 +15,8 @@ #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/testing_profile.h" +using content::RenderViewHost; + namespace { // A mock context menu used in this test. This class overrides virtual methods diff --git a/chrome/browser/tab_contents/tab_util.cc b/chrome/browser/tab_contents/tab_util.cc index 6d62095..266f94c 100644 --- a/chrome/browser/tab_contents/tab_util.cc +++ b/chrome/browser/tab_contents/tab_util.cc @@ -14,6 +14,7 @@ #include "content/public/browser/web_contents.h" #include "googleurl/src/gurl.h" +using content::RenderViewHost; using content::SiteInstance; using content::WebContents; diff --git a/chrome/browser/tab_contents/thumbnail_generator.cc b/chrome/browser/tab_contents/thumbnail_generator.cc index 51e4f9d..83899a22 100644 --- a/chrome/browser/tab_contents/thumbnail_generator.cc +++ b/chrome/browser/tab_contents/thumbnail_generator.cc @@ -51,6 +51,8 @@ // We'll likely revise the algorithm to improve quality of thumbnails this // service generates. +using content::RenderViewHost; +using content::RenderWidgetHost; using content::WebContents; namespace { diff --git a/chrome/browser/tab_contents/thumbnail_generator.h b/chrome/browser/tab_contents/thumbnail_generator.h index 5a4dc0a..5ef3bcc 100644 --- a/chrome/browser/tab_contents/thumbnail_generator.h +++ b/chrome/browser/tab_contents/thumbnail_generator.h @@ -20,9 +20,12 @@ class GURL; class Profile; -class RenderWidgetHost; class SkBitmap; +namespace content { +class RenderWidgetHost; +} + namespace gfx { class Size; } @@ -80,7 +83,7 @@ class ThumbnailGenerator : public content::NotificationObserver, // set, and the backing store is used, then the resulting image will // be less then twice the size of the |desired_size| in both // dimensions, but might not be the exact size requested. - void AskForSnapshot(RenderWidgetHost* renderer, + void AskForSnapshot(content::RenderWidgetHost* renderer, bool prefer_backing_store, const ThumbnailReadyCallback& callback, gfx::Size page_size, @@ -88,18 +91,19 @@ class ThumbnailGenerator : public content::NotificationObserver, // This returns a thumbnail of a fixed, small size for the given // renderer. - SkBitmap GetThumbnailForRenderer(RenderWidgetHost* renderer) const; + SkBitmap GetThumbnailForRenderer(content::RenderWidgetHost* renderer) const; // This returns a thumbnail of a fixed, small size for the given // renderer. |options| is a bitmask of ThumbnailOptions. If // |clip_result| is non-NULL, the result of clipping will be written. - SkBitmap GetThumbnailForRendererWithOptions(RenderWidgetHost* renderer, - int options, - ClipResult* clip_result) const; + SkBitmap GetThumbnailForRendererWithOptions( + content::RenderWidgetHost* renderer, + int options, + ClipResult* clip_result) const; // Start or stop monitoring notifications for |renderer| based on the value // of |monitor|. - void MonitorRenderer(RenderWidgetHost* renderer, bool monitor); + void MonitorRenderer(content::RenderWidgetHost* renderer, bool monitor); // Calculates how "boring" a thumbnail is. The boring score is the // 0,1 ranged percentage of pixels that are the most common @@ -135,7 +139,7 @@ class ThumbnailGenerator : public content::NotificationObserver, private: virtual void WidgetDidReceivePaintAtSizeAck( - RenderWidgetHost* widget, + content::RenderWidgetHost* widget, int tag, const gfx::Size& size); @@ -145,7 +149,7 @@ class ThumbnailGenerator : public content::NotificationObserver, const content::NotificationDetails& details) OVERRIDE; // Indicates that the given widget has changed is visibility. - void WidgetHidden(RenderWidgetHost* widget); + void WidgetHidden(content::RenderWidgetHost* widget); // Called when the given web contents are disconnected (either // through being closed, or because the renderer is no longer there). diff --git a/chrome/browser/tab_render_watcher.cc b/chrome/browser/tab_render_watcher.cc index 46ee3ee..160199f 100644 --- a/chrome/browser/tab_render_watcher.cc +++ b/chrome/browser/tab_render_watcher.cc @@ -10,6 +10,7 @@ #include "content/public/browser/render_view_host.h" #include "content/public/browser/web_contents.h" +using content::RenderWidgetHost; using content::WebContents; TabRenderWatcher::TabRenderWatcher(WebContents* tab, Delegate* delegate) @@ -34,7 +35,7 @@ void TabRenderWatcher::Observe(int type, content::NOTIFICATION_RENDER_WIDGET_HOST_DID_PAINT, content::Source<RenderWidgetHost>(rwh)); delegate_->OnRenderHostCreated( - content::Details<RenderViewHost>(details).ptr()); + content::Details<content::RenderViewHost>(details).ptr()); break; } case content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME: diff --git a/chrome/browser/tab_render_watcher.h b/chrome/browser/tab_render_watcher.h index 72b99ca..07b66365 100644 --- a/chrome/browser/tab_render_watcher.h +++ b/chrome/browser/tab_render_watcher.h @@ -10,9 +10,8 @@ #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" -class RenderViewHost; - namespace content { +class RenderViewHost; class WebContents; } @@ -21,7 +20,7 @@ class TabRenderWatcher : public content::NotificationObserver { public: class Delegate { public: - virtual void OnRenderHostCreated(RenderViewHost* host) = 0; + virtual void OnRenderHostCreated(content::RenderViewHost* host) = 0; virtual void OnTabMainFrameLoaded() = 0; virtual void OnTabMainFrameRender() = 0; }; diff --git a/chrome/browser/tab_render_watcher_browsertest.cc b/chrome/browser/tab_render_watcher_browsertest.cc index b16c7b4..8d84e5d 100644 --- a/chrome/browser/tab_render_watcher_browsertest.cc +++ b/chrome/browser/tab_render_watcher_browsertest.cc @@ -36,7 +36,7 @@ class TabRenderWatcherTest : public InProcessBrowserTest, } // TabRenderWatcher::Delegate implementation. - virtual void OnRenderHostCreated(RenderViewHost* host) OVERRIDE { + virtual void OnRenderHostCreated(content::RenderViewHost* host) OVERRIDE { host_created_ = true; } diff --git a/chrome/browser/task_manager/task_manager_resource_providers.cc b/chrome/browser/task_manager/task_manager_resource_providers.cc index 53d2dde..6c974c8 100644 --- a/chrome/browser/task_manager/task_manager_resource_providers.cc +++ b/chrome/browser/task_manager/task_manager_resource_providers.cc @@ -103,7 +103,7 @@ int GetMessagePrefixID(bool is_app, // TaskManagerRendererResource class //////////////////////////////////////////////////////////////////////////////// TaskManagerRendererResource::TaskManagerRendererResource( - base::ProcessHandle process, RenderViewHost* render_view_host) + base::ProcessHandle process, content::RenderViewHost* render_view_host) : process_(process), render_view_host_(render_view_host), pending_stats_update_(false), diff --git a/chrome/browser/task_manager/task_manager_resource_providers.h b/chrome/browser/task_manager/task_manager_resource_providers.h index 43ac910..7f82dcd 100644 --- a/chrome/browser/task_manager/task_manager_resource_providers.h +++ b/chrome/browser/task_manager/task_manager_resource_providers.h @@ -23,9 +23,12 @@ class BackgroundContents; class BalloonHost; class Extension; class ExtensionHost; -class RenderViewHost; class TabContentsWrapper; +namespace content { +class RenderViewHost; +} + // These file contains the resource providers used in the task manager. // Base class for various types of render process resources that provides common @@ -33,7 +36,7 @@ class TabContentsWrapper; class TaskManagerRendererResource : public TaskManager::Resource { public: TaskManagerRendererResource(base::ProcessHandle process, - RenderViewHost* render_view_host); + content::RenderViewHost* render_view_host); virtual ~TaskManagerRendererResource(); // TaskManager::Resource methods: @@ -73,7 +76,7 @@ class TaskManagerRendererResource : public TaskManager::Resource { int pid_; // RenderViewHost we use to fetch stats. - RenderViewHost* render_view_host_; + content::RenderViewHost* render_view_host_; // The stats_ field holds information about resource usage in the renderer // process and so it is updated asynchronously by the Refresh() call. WebKit::WebCache::ResourceTypeStats stats_; diff --git a/chrome/browser/translate/translate_manager.cc b/chrome/browser/translate/translate_manager.cc index 41a4c4a..d8b9b72 100644 --- a/chrome/browser/translate/translate_manager.cc +++ b/chrome/browser/translate/translate_manager.cc @@ -617,7 +617,7 @@ void TranslateManager::TranslatePage(WebContents* web_contents, // The script is not available yet. Queue that request and query for the // script. Once it is downloaded we'll do the translate. - RenderViewHost* rvh = web_contents->GetRenderViewHost(); + content::RenderViewHost* rvh = web_contents->GetRenderViewHost(); PendingRequest request; request.render_process_id = rvh->GetProcess()->GetID(); request.render_view_id = rvh->GetRoutingID(); diff --git a/chrome/browser/ui/alternate_error_tab_observer.cc b/chrome/browser/ui/alternate_error_tab_observer.cc index 7b94bd8..37b5e46 100644 --- a/chrome/browser/ui/alternate_error_tab_observer.cc +++ b/chrome/browser/ui/alternate_error_tab_observer.cc @@ -13,6 +13,7 @@ #include "content/public/browser/render_view_host.h" #include "content/public/browser/web_contents.h" +using content::RenderViewHost; using content::WebContents; AlternateErrorPageTabObserver::AlternateErrorPageTabObserver( diff --git a/chrome/browser/ui/alternate_error_tab_observer.h b/chrome/browser/ui/alternate_error_tab_observer.h index 1fb1b6a..da81c74 100644 --- a/chrome/browser/ui/alternate_error_tab_observer.h +++ b/chrome/browser/ui/alternate_error_tab_observer.h @@ -27,7 +27,8 @@ class AlternateErrorPageTabObserver : public content::WebContentsObserver, Profile* GetProfile() const; // content::WebContentsObserver overrides: - virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; + virtual void RenderViewCreated( + content::RenderViewHost* render_view_host) OVERRIDE; // content::NotificationObserver overrides: virtual void Observe(int type, @@ -41,7 +42,7 @@ class AlternateErrorPageTabObserver : public content::WebContentsObserver, GURL GetAlternateErrorPageURL() const; // Send the alternate error page URL to the renderer. - void UpdateAlternateErrorPageURL(RenderViewHost* rvh); + void UpdateAlternateErrorPageURL(content::RenderViewHost* rvh); content::NotificationRegistrar registrar_; PrefChangeRegistrar pref_change_registrar_; diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc index 7fe897a..91b4efd 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -2070,7 +2070,7 @@ void Browser::Zoom(content::PageZoom zoom) { if (is_devtools()) return; - RenderViewHost* host = GetSelectedWebContents()->GetRenderViewHost(); + content::RenderViewHost* host = GetSelectedWebContents()->GetRenderViewHost(); if (zoom == content::PAGE_ZOOM_RESET) { host->SetZoomLevel(0); content::RecordAction(UserMetricsAction("ZoomNormal")); diff --git a/chrome/browser/ui/browser_list_unittest.cc b/chrome/browser/ui/browser_list_unittest.cc index b3ea909..fba764e 100644 --- a/chrome/browser/ui/browser_list_unittest.cc +++ b/chrome/browser/ui/browser_list_unittest.cc @@ -31,7 +31,7 @@ size_t CountAllTabs() { // Helper function to navigate to the print preview page. void NavigateToPrintUrl(TabContentsWrapper* tab, int page_id) { - static_cast<TestRenderViewHost*>( + static_cast<content::TestRenderViewHost*>( tab->web_contents()->GetRenderViewHost())->SendNavigate( page_id, GURL(chrome::kChromeUIPrintURL)); } diff --git a/chrome/browser/ui/cocoa/applescript/tab_applescript.mm b/chrome/browser/ui/cocoa/applescript/tab_applescript.mm index 2702de1..7cbcb69 100644 --- a/chrome/browser/ui/cocoa/applescript/tab_applescript.mm +++ b/chrome/browser/ui/cocoa/applescript/tab_applescript.mm @@ -29,6 +29,7 @@ using content::NavigationController; using content::NavigationEntry; using content::OpenURLParams; +using content::RenderViewHost; using content::Referrer; using content::WebContents; diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm index 9edcb46..9ff9fc6 100644 --- a/chrome/browser/ui/cocoa/browser_window_controller.mm +++ b/chrome/browser/ui/cocoa/browser_window_controller.mm @@ -934,7 +934,7 @@ enum { if (resizeRectDirty) { // Send new resize rect to foreground tab. if (content::WebContents* contents = browser_->GetSelectedWebContents()) { - if (RenderViewHost* rvh = contents->GetRenderViewHost()) { + if (content::RenderViewHost* rvh = contents->GetRenderViewHost()) { rvh->ResizeRectChanged(windowShim_->GetRootWindowResizerRect()); } } diff --git a/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm b/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm index c3de086..6bccfde 100644 --- a/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm +++ b/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm @@ -20,6 +20,8 @@ #include "content/public/browser/notification_registrar.h" #include "content/public/browser/notification_source.h" +using content::RenderViewHost; + namespace { // The duration for any animations that might be invoked by this controller. const NSTimeInterval kAnimationDuration = 0.2; diff --git a/chrome/browser/ui/cocoa/extensions/extension_view_mac.h b/chrome/browser/ui/cocoa/extensions/extension_view_mac.h index c17380b..68ba481d 100644 --- a/chrome/browser/ui/cocoa/extensions/extension_view_mac.h +++ b/chrome/browser/ui/cocoa/extensions/extension_view_mac.h @@ -13,9 +13,12 @@ class Browser; class ExtensionHost; -class RenderViewHost; class SkBitmap; +namespace content { +class RenderViewHost; +} + // This class represents extension views. An extension view internally contains // a bridge to an extension process, which draws to the extension view's // native view object through IPC. @@ -73,7 +76,7 @@ class ExtensionViewMac { static const CGFloat kMaxHeight; private: - RenderViewHost* render_view_host() const; + content::RenderViewHost* render_view_host() const; void CreateWidgetHostView(); diff --git a/chrome/browser/ui/cocoa/extensions/extension_view_mac.mm b/chrome/browser/ui/cocoa/extensions/extension_view_mac.mm index 6d55f33..8336858 100644 --- a/chrome/browser/ui/cocoa/extensions/extension_view_mac.mm +++ b/chrome/browser/ui/cocoa/extensions/extension_view_mac.mm @@ -39,7 +39,7 @@ gfx::NativeView ExtensionViewMac::native_view() { return extension_host_->host_contents()->GetView()->GetNativeView(); } -RenderViewHost* ExtensionViewMac::render_view_host() const { +content::RenderViewHost* ExtensionViewMac::render_view_host() const { return extension_host_->render_view_host(); } diff --git a/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm b/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm index e421475..b47cfd2 100644 --- a/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm +++ b/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm @@ -234,7 +234,7 @@ const float kRightEdgeOffset = 25; // |ForwardKeyboardEvent()| directly ignores edit commands, which breaks // cmd-up/down if we ever decide to include |moveToBeginningOfDocument:| in // the list above. - RenderViewHost* render_view_host = + content::RenderViewHost* render_view_host = contents->web_contents()->GetRenderViewHost(); render_view_host->ForwardKeyboardEvent(NativeWebKeyboardEvent(event)); return YES; diff --git a/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm b/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm index 2b44bc2..02d91c9 100644 --- a/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm +++ b/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm @@ -77,7 +77,7 @@ using content::WebContents; // The RWHV is ripped out of the view hierarchy on tab switches, so it never // formally resigns first responder status. Handle this by explicitly sending // a Blur() message to the renderer, but only if the RWHV currently has focus. - RenderViewHost* rvh = [self webContents]->GetRenderViewHost(); + content::RenderViewHost* rvh = [self webContents]->GetRenderViewHost(); if (rvh && rvh->GetView() && rvh->GetView()->HasFocus()) rvh->Blur(); } diff --git a/chrome/browser/ui/cocoa/tabpose_window.mm b/chrome/browser/ui/cocoa/tabpose_window.mm index 9cf821c..981deab 100644 --- a/chrome/browser/ui/cocoa/tabpose_window.mm +++ b/chrome/browser/ui/cocoa/tabpose_window.mm @@ -41,6 +41,7 @@ #include "ui/gfx/scoped_cg_context_save_gstate_mac.h" using content::BrowserThread; +using content::RenderWidgetHost; // Height of the bottom gradient, in pixels. const CGFloat kBottomGradientHeight = 50; diff --git a/chrome/browser/ui/constrained_window_tab_helper.cc b/chrome/browser/ui/constrained_window_tab_helper.cc index 27b50a5..ed113fa 100644 --- a/chrome/browser/ui/constrained_window_tab_helper.cc +++ b/chrome/browser/ui/constrained_window_tab_helper.cc @@ -78,7 +78,7 @@ void ConstrainedWindowTabHelper::BlockTabContent(bool blocked) { } // RenderViewHost may be NULL during shutdown. - RenderViewHost* host = contents->GetRenderViewHost(); + content::RenderViewHost* host = contents->GetRenderViewHost(); if (host) { host->SetIgnoreInputEvents(blocked); host->Send(new ChromeViewMsg_SetVisuallyDeemphasized( diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc index 539145f..ad7398e 100644 --- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc +++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc @@ -383,7 +383,8 @@ class ContentSettingPluginBubbleModel : public ContentSettingSingleRadioGroup { virtual void OnCustomLinkClicked() OVERRIDE { content::RecordAction(UserMetricsAction("ClickToPlay_LoadAll_Bubble")); DCHECK(tab_contents()); - RenderViewHost* host = tab_contents()->web_contents()->GetRenderViewHost(); + content::RenderViewHost* host = + tab_contents()->web_contents()->GetRenderViewHost(); host->Send(new ChromeViewMsg_LoadBlockedPlugins(host->GetRoutingID())); set_custom_link_enabled(false); tab_contents()->content_settings()->set_load_plugins_link_enabled(false); diff --git a/chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc b/chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc index f1c1f6d..93b2909 100644 --- a/chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc +++ b/chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc @@ -27,6 +27,8 @@ #include "content/public/browser/render_widget_host_view.h" #include "googleurl/src/gurl.h" +using content::RenderViewHost; + ExtensionPopupGtk* ExtensionPopupGtk::current_extension_popup_ = NULL; // The minimum/maximum dimensions of the extension popup. diff --git a/chrome/browser/ui/gtk/extensions/extension_view_gtk.cc b/chrome/browser/ui/gtk/extensions/extension_view_gtk.cc index 1b82a09..97f52ec 100644 --- a/chrome/browser/ui/gtk/extensions/extension_view_gtk.cc +++ b/chrome/browser/ui/gtk/extensions/extension_view_gtk.cc @@ -26,7 +26,7 @@ gfx::NativeView ExtensionViewGtk::native_view() { return extension_host_->host_contents()->GetView()->GetNativeView(); } -RenderViewHost* ExtensionViewGtk::render_view_host() const { +content::RenderViewHost* ExtensionViewGtk::render_view_host() const { return extension_host_->render_view_host(); } diff --git a/chrome/browser/ui/gtk/extensions/extension_view_gtk.h b/chrome/browser/ui/gtk/extensions/extension_view_gtk.h index 39a9a16..5476148 100644 --- a/chrome/browser/ui/gtk/extensions/extension_view_gtk.h +++ b/chrome/browser/ui/gtk/extensions/extension_view_gtk.h @@ -13,9 +13,12 @@ class Browser; class ExtensionHost; -class RenderViewHost; class SkBitmap; +namespace content { +class RenderViewHost; +} + class ExtensionViewGtk { public: ExtensionViewGtk(ExtensionHost* extension_host, Browser* browser); @@ -45,7 +48,7 @@ class ExtensionViewGtk { // connection. void RenderViewCreated(); - RenderViewHost* render_view_host() const; + content::RenderViewHost* render_view_host() const; private: void CreateWidgetHostView(); diff --git a/chrome/browser/ui/gtk/find_bar_gtk.cc b/chrome/browser/ui/gtk/find_bar_gtk.cc index a9f4a96..1ecfed6 100644 --- a/chrome/browser/ui/gtk/find_bar_gtk.cc +++ b/chrome/browser/ui/gtk/find_bar_gtk.cc @@ -676,7 +676,7 @@ bool FindBarGtk::MaybeForwardKeyEventToRenderer(GdkEventKey* event) { if (!contents) return false; - RenderViewHost* render_view_host = + content::RenderViewHost* render_view_host = contents->web_contents()->GetRenderViewHost(); // Make sure we don't have a text field element interfering with keyboard diff --git a/chrome/browser/ui/gtk/gtk_util.cc b/chrome/browser/ui/gtk/gtk_util.cc index dd31ffb5..cbf2286 100644 --- a/chrome/browser/ui/gtk/gtk_util.cc +++ b/chrome/browser/ui/gtk/gtk_util.cc @@ -55,6 +55,7 @@ #include <gdk/gdkx.h> // NOLINT #include <gtk/gtk.h> // NOLINT +using content::RenderWidgetHost; using content::WebContents; namespace { diff --git a/chrome/browser/ui/gtk/notifications/balloon_view_host_gtk.cc b/chrome/browser/ui/gtk/notifications/balloon_view_host_gtk.cc index 74eaa46..7f31844 100644 --- a/chrome/browser/ui/gtk/notifications/balloon_view_host_gtk.cc +++ b/chrome/browser/ui/gtk/notifications/balloon_view_host_gtk.cc @@ -20,7 +20,7 @@ BalloonViewHost::~BalloonViewHost() { } void BalloonViewHost::UpdateActualSize(const gfx::Size& new_size) { - RenderViewHost* host = web_contents_->GetRenderViewHost(); + content::RenderViewHost* host = web_contents_->GetRenderViewHost(); if (host) { content::RenderWidgetHostView* view = host->GetView(); if (view) diff --git a/chrome/browser/ui/gtk/tabs/dragged_view_gtk.cc b/chrome/browser/ui/gtk/tabs/dragged_view_gtk.cc index b4c0ec0..5f7d433 100644 --- a/chrome/browser/ui/gtk/tabs/dragged_view_gtk.cc +++ b/chrome/browser/ui/gtk/tabs/dragged_view_gtk.cc @@ -399,8 +399,8 @@ gboolean DraggedViewGtk::OnExpose(GtkWidget* widget, GdkEventExpose* event) { // Draw the render area. if (!attached_) { - RenderWidgetHost* render_widget_host = drag_data_->GetSourceWebContents()-> - GetRenderViewHost(); + content::RenderWidgetHost* render_widget_host = + drag_data_->GetSourceWebContents()->GetRenderViewHost(); // This leaves room for the border. gfx::Rect dest_rect(kDragFrameBorderSize, tab_height, diff --git a/chrome/browser/ui/login/login_prompt.cc b/chrome/browser/ui/login/login_prompt.cc index bf700b8..abf03fc 100644 --- a/chrome/browser/ui/login/login_prompt.cc +++ b/chrome/browser/ui/login/login_prompt.cc @@ -34,6 +34,7 @@ using content::BrowserThread; using content::NavigationController; +using content::RenderViewHost; using content::RenderViewHostDelegate; using content::WebContents; using webkit::forms::PasswordForm; diff --git a/chrome/browser/ui/panels/panel.cc b/chrome/browser/ui/panels/panel.cc index ac3027f..9544590 100644 --- a/chrome/browser/ui/panels/panel.cc +++ b/chrome/browser/ui/panels/panel.cc @@ -29,6 +29,7 @@ #include "chrome/browser/ui/panels/panel_browser_view.h" #endif +using content::RenderViewHost; using content::SSLStatus; using content::WebContents; diff --git a/chrome/browser/ui/prefs/prefs_tab_helper.cc b/chrome/browser/ui/prefs/prefs_tab_helper.cc index d522b73..7352d63 100644 --- a/chrome/browser/ui/prefs/prefs_tab_helper.cc +++ b/chrome/browser/ui/prefs/prefs_tab_helper.cc @@ -569,7 +569,8 @@ void PrefsTabHelper::RegisterUserPrefs(PrefService* prefs) { MigratePreferences(prefs); } -void PrefsTabHelper::RenderViewCreated(RenderViewHost* render_view_host) { +void PrefsTabHelper::RenderViewCreated( + content::RenderViewHost* render_view_host) { UpdateWebPreferences(); } diff --git a/chrome/browser/ui/prefs/prefs_tab_helper.h b/chrome/browser/ui/prefs/prefs_tab_helper.h index 3d5756b..47c1f4b 100644 --- a/chrome/browser/ui/prefs/prefs_tab_helper.h +++ b/chrome/browser/ui/prefs/prefs_tab_helper.h @@ -35,7 +35,8 @@ class PrefsTabHelper : public content::WebContentsObserver, virtual void UpdateWebPreferences(); // content::WebContentsObserver overrides, exposed as protected for testing. - virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; + virtual void RenderViewCreated( + content::RenderViewHost* render_view_host) OVERRIDE; private: // content::WebContentsObserver overrides: diff --git a/chrome/browser/ui/views/ash/panel_view_aura.cc b/chrome/browser/ui/views/ash/panel_view_aura.cc index b45805e..16e6df5 100644 --- a/chrome/browser/ui/views/ash/panel_view_aura.cc +++ b/chrome/browser/ui/views/ash/panel_view_aura.cc @@ -26,6 +26,8 @@ #include "ui/aura/window.h" #include "ui/views/widget/widget.h" +using content::RenderViewHost; + namespace { const int kMinWidth = 100; const int kMinHeight = 100; diff --git a/chrome/browser/ui/views/extensions/extension_popup.cc b/chrome/browser/ui/views/extensions/extension_popup.cc index 34b799a..c7b24cd 100644 --- a/chrome/browser/ui/views/extensions/extension_popup.cc +++ b/chrome/browser/ui/views/extensions/extension_popup.cc @@ -24,6 +24,7 @@ #include "ui/aura/window.h" #endif +using content::RenderViewHost; using content::WebContents; namespace { diff --git a/chrome/browser/ui/views/extensions/extension_view.cc b/chrome/browser/ui/views/extensions/extension_view.cc index ebe237a..fd5861f 100644 --- a/chrome/browser/ui/views/extensions/extension_view.cc +++ b/chrome/browser/ui/views/extensions/extension_view.cc @@ -37,7 +37,7 @@ const Extension* ExtensionView::extension() const { return host_->extension(); } -RenderViewHost* ExtensionView::render_view_host() const { +content::RenderViewHost* ExtensionView::render_view_host() const { return host_->render_view_host(); } diff --git a/chrome/browser/ui/views/extensions/extension_view.h b/chrome/browser/ui/views/extensions/extension_view.h index 0ed7962..660773a1 100644 --- a/chrome/browser/ui/views/extensions/extension_view.h +++ b/chrome/browser/ui/views/extensions/extension_view.h @@ -15,7 +15,10 @@ class Browser; class Extension; class ExtensionHost; class ExtensionView; + +namespace content { class RenderViewHost; +} // This handles the display portion of an ExtensionHost. class ExtensionView : public views::NativeViewHost { @@ -35,7 +38,7 @@ class ExtensionView : public views::NativeViewHost { ExtensionHost* host() const { return host_; } Browser* browser() const { return browser_; } const Extension* extension() const; - RenderViewHost* render_view_host() const; + content::RenderViewHost* render_view_host() const; void DidStopLoading(); void SetIsClipped(bool is_clipped); diff --git a/chrome/browser/ui/views/find_bar_host.cc b/chrome/browser/ui/views/find_bar_host.cc index 2169b8f..2705e24 100644 --- a/chrome/browser/ui/views/find_bar_host.cc +++ b/chrome/browser/ui/views/find_bar_host.cc @@ -69,7 +69,7 @@ bool FindBarHost::MaybeForwardKeyEventToWebpage( if (!contents) return false; - RenderViewHost* render_view_host = + content::RenderViewHost* render_view_host = contents->web_contents()->GetRenderViewHost(); // Make sure we don't have a text field element interfering with keyboard diff --git a/chrome/browser/ui/views/html_dialog_view.cc b/chrome/browser/ui/views/html_dialog_view.cc index ea11280..9d0994a8a 100644 --- a/chrome/browser/ui/views/html_dialog_view.cc +++ b/chrome/browser/ui/views/html_dialog_view.cc @@ -30,8 +30,6 @@ #include "ui/views/widget/native_widget_aura.h" #endif -class RenderWidgetHost; - using content::WebContents; using content::WebUIMessageHandler; @@ -310,7 +308,7 @@ void HtmlDialogView::RegisterDialogAccelerators() { AddAccelerator(ui::Accelerator(ui::VKEY_ESCAPE, false, false, false)); } -void HtmlDialogView::OnRenderHostCreated(RenderViewHost* host) { +void HtmlDialogView::OnRenderHostCreated(content::RenderViewHost* host) { } void HtmlDialogView::OnTabMainFrameLoaded() { diff --git a/chrome/browser/ui/views/html_dialog_view.h b/chrome/browser/ui/views/html_dialog_view.h index bea8c94..690dc4d 100644 --- a/chrome/browser/ui/views/html_dialog_view.h +++ b/chrome/browser/ui/views/html_dialog_view.h @@ -104,7 +104,7 @@ class HtmlDialogView virtual void RegisterDialogAccelerators(); // TabRenderWatcher::Delegate implementation. - virtual void OnRenderHostCreated(RenderViewHost* host) OVERRIDE; + virtual void OnRenderHostCreated(content::RenderViewHost* host) OVERRIDE; virtual void OnTabMainFrameLoaded() OVERRIDE; virtual void OnTabMainFrameRender() OVERRIDE; diff --git a/chrome/browser/ui/views/hung_renderer_view.cc b/chrome/browser/ui/views/hung_renderer_view.cc index 9db6abc..594c5af 100644 --- a/chrome/browser/ui/views/hung_renderer_view.cc +++ b/chrome/browser/ui/views/hung_renderer_view.cc @@ -46,6 +46,7 @@ class HungRendererDialogView; +using content::RenderViewHost; using content::WebContents; namespace { diff --git a/chrome/browser/ui/views/select_file_dialog_extension.cc b/chrome/browser/ui/views/select_file_dialog_extension.cc index 7c3631e..2fb805e 100644 --- a/chrome/browser/ui/views/select_file_dialog_extension.cc +++ b/chrome/browser/ui/views/select_file_dialog_extension.cc @@ -189,7 +189,7 @@ void SelectFileDialogExtension::OnFileSelectionCanceled(int32 tab_id) { dialog->selection_index_ = 0; } -RenderViewHost* SelectFileDialogExtension::GetRenderViewHost() { +content::RenderViewHost* SelectFileDialogExtension::GetRenderViewHost() { if (extension_dialog_) return extension_dialog_->host()->render_view_host(); return NULL; diff --git a/chrome/browser/ui/views/select_file_dialog_extension.h b/chrome/browser/ui/views/select_file_dialog_extension.h index 7e604c6..bafbe9f 100644 --- a/chrome/browser/ui/views/select_file_dialog_extension.h +++ b/chrome/browser/ui/views/select_file_dialog_extension.h @@ -16,7 +16,10 @@ class Browser; class ExtensionDialog; + +namespace content { class RenderViewHost; +} // Shows a dialog box for selecting a file or a folder, using the // file manager extension implementation. @@ -43,7 +46,7 @@ class SelectFileDialogExtension static void OnFileSelectionCanceled(int32 tab_id); // For testing, so we can inject JavaScript into the contained view. - RenderViewHost* GetRenderViewHost(); + content::RenderViewHost* GetRenderViewHost(); protected: // SelectFileDialog implementation. diff --git a/chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc b/chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc index 37cac15..c296a69 100644 --- a/chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc +++ b/chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc @@ -172,7 +172,7 @@ class SelectFileDialogExtensionBrowserTest : public ExtensionBrowserTest { ui_test_utils::WindowedNotificationObserver host_destroyed( content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, content::NotificationService::AllSources()); - RenderViewHost* host = dialog_->GetRenderViewHost(); + content::RenderViewHost* host = dialog_->GetRenderViewHost(); string16 main_frame; std::string button_class = (button_type == DIALOG_BTN_OK) ? ".ok" : ".cancel"; diff --git a/chrome/browser/ui/views/tab_contents/native_tab_contents_container.h b/chrome/browser/ui/views/tab_contents/native_tab_contents_container.h index 6879bd9..9dc9713 100644 --- a/chrome/browser/ui/views/tab_contents/native_tab_contents_container.h +++ b/chrome/browser/ui/views/tab_contents/native_tab_contents_container.h @@ -6,10 +6,10 @@ #define CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_NATIVE_TAB_CONTENTS_CONTAINER_H_ #pragma once -class RenderViewHost; class TabContentsContainer; namespace content { +class RenderViewHost; class WebContents; } @@ -41,8 +41,8 @@ class NativeTabContentsContainer { // Tells the container that the RenderViewHost for the attached WebContents // has changed and it should update focus. - virtual void RenderViewHostChanged(RenderViewHost* old_host, - RenderViewHost* new_host) = 0; + virtual void RenderViewHostChanged(content::RenderViewHost* old_host, + content::RenderViewHost* new_host) = 0; // Tells the container that |contents| got the focus. virtual void WebContentsFocused(content::WebContents* contents) = 0; diff --git a/chrome/browser/ui/views/tab_contents/native_tab_contents_container_aura.cc b/chrome/browser/ui/views/tab_contents/native_tab_contents_container_aura.cc index 8e6363b..9ff8bd7 100644 --- a/chrome/browser/ui/views/tab_contents/native_tab_contents_container_aura.cc +++ b/chrome/browser/ui/views/tab_contents/native_tab_contents_container_aura.cc @@ -14,6 +14,7 @@ #include "ui/views/focus/widget_focus_manager.h" #include "ui/views/views_delegate.h" +using content::RenderViewHost; using content::WebContents; //////////////////////////////////////////////////////////////////////////////// diff --git a/chrome/browser/ui/views/tab_contents/native_tab_contents_container_aura.h b/chrome/browser/ui/views/tab_contents/native_tab_contents_container_aura.h index 83845d5..e68ddb7 100644 --- a/chrome/browser/ui/views/tab_contents/native_tab_contents_container_aura.h +++ b/chrome/browser/ui/views/tab_contents/native_tab_contents_container_aura.h @@ -21,8 +21,9 @@ class NativeTabContentsContainerAura : public NativeTabContentsContainer, virtual void SetFastResize(bool fast_resize) OVERRIDE; virtual bool GetFastResize() const OVERRIDE; virtual bool FastResizeAtLastLayout() const OVERRIDE; - virtual void RenderViewHostChanged(RenderViewHost* old_host, - RenderViewHost* new_host) OVERRIDE; + virtual void RenderViewHostChanged( + content::RenderViewHost* old_host, + content::RenderViewHost* new_host) OVERRIDE; virtual void WebContentsFocused(content::WebContents* contents) OVERRIDE; virtual views::View* GetView() OVERRIDE; diff --git a/chrome/browser/ui/views/tab_contents/native_tab_contents_container_gtk.cc b/chrome/browser/ui/views/tab_contents/native_tab_contents_container_gtk.cc index 9e56f44..77abc80 100644 --- a/chrome/browser/ui/views/tab_contents/native_tab_contents_container_gtk.cc +++ b/chrome/browser/ui/views/tab_contents/native_tab_contents_container_gtk.cc @@ -12,6 +12,7 @@ #include "ui/base/accessibility/accessible_view_state.h" #include "ui/views/focus/focus_manager.h" +using content::RenderViewHost; using content::WebContents; //////////////////////////////////////////////////////////////////////////////// diff --git a/chrome/browser/ui/views/tab_contents/native_tab_contents_container_gtk.h b/chrome/browser/ui/views/tab_contents/native_tab_contents_container_gtk.h index ac51fa1..a6fe8ad 100644 --- a/chrome/browser/ui/views/tab_contents/native_tab_contents_container_gtk.h +++ b/chrome/browser/ui/views/tab_contents/native_tab_contents_container_gtk.h @@ -23,8 +23,9 @@ class NativeTabContentsContainerGtk : public NativeTabContentsContainer, virtual void SetFastResize(bool fast_resize) OVERRIDE; virtual bool GetFastResize() const OVERRIDE; virtual bool FastResizeAtLastLayout() const OVERRIDE; - virtual void RenderViewHostChanged(RenderViewHost* old_host, - RenderViewHost* new_host) OVERRIDE; + virtual void RenderViewHostChanged( + content::RenderViewHost* old_host, + content::RenderViewHost* new_host) OVERRIDE; virtual void WebContentsFocused(content::WebContents* contents) OVERRIDE; virtual views::View* GetView() OVERRIDE; diff --git a/chrome/browser/ui/views/tab_contents/native_tab_contents_container_win.cc b/chrome/browser/ui/views/tab_contents/native_tab_contents_container_win.cc index be229ba..52c9bb1 100644 --- a/chrome/browser/ui/views/tab_contents/native_tab_contents_container_win.cc +++ b/chrome/browser/ui/views/tab_contents/native_tab_contents_container_win.cc @@ -13,6 +13,7 @@ #include "ui/views/focus/focus_manager.h" #include "ui/views/focus/widget_focus_manager.h" +using content::RenderViewHost; using content::WebContents; //////////////////////////////////////////////////////////////////////////////// diff --git a/chrome/browser/ui/views/tab_contents/native_tab_contents_container_win.h b/chrome/browser/ui/views/tab_contents/native_tab_contents_container_win.h index 7481c31..1ce7d6f 100644 --- a/chrome/browser/ui/views/tab_contents/native_tab_contents_container_win.h +++ b/chrome/browser/ui/views/tab_contents/native_tab_contents_container_win.h @@ -21,8 +21,9 @@ class NativeTabContentsContainerWin : public NativeTabContentsContainer, virtual void SetFastResize(bool fast_resize) OVERRIDE; virtual bool GetFastResize() const OVERRIDE; virtual bool FastResizeAtLastLayout() const OVERRIDE; - virtual void RenderViewHostChanged(RenderViewHost* old_host, - RenderViewHost* new_host) OVERRIDE; + virtual void RenderViewHostChanged( + content::RenderViewHost* old_host, + content::RenderViewHost* new_host) OVERRIDE; virtual void WebContentsFocused(content::WebContents* contents) OVERRIDE; virtual views::View* GetView() OVERRIDE; diff --git a/chrome/browser/ui/views/tab_contents/native_tab_contents_view.h b/chrome/browser/ui/views/tab_contents/native_tab_contents_view.h index 65e08a6..976cb8e 100644 --- a/chrome/browser/ui/views/tab_contents/native_tab_contents_view.h +++ b/chrome/browser/ui/views/tab_contents/native_tab_contents_view.h @@ -12,9 +12,9 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h" #include "ui/gfx/native_widget_types.h" -class RenderWidgetHost; struct WebDropData; namespace content { +class RenderWidgetHost; class RenderWidgetHostView; } namespace gfx { @@ -37,7 +37,7 @@ class NativeTabContentsView { virtual void InitNativeTabContentsView() = 0; virtual content::RenderWidgetHostView* CreateRenderWidgetHostView( - RenderWidgetHost* render_widget_host) = 0; + content::RenderWidgetHost* render_widget_host) = 0; virtual gfx::NativeWindow GetTopLevelNativeWindow() const = 0; diff --git a/chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc b/chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc index e79e316..9302846 100644 --- a/chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc +++ b/chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc @@ -30,6 +30,7 @@ #include "ash/wm/visibility_controller.h" #endif +using content::RenderViewHost; using content::RenderWidgetHostView; using content::WebContents; @@ -178,7 +179,7 @@ void NativeTabContentsViewAura::InitNativeTabContentsView() { } RenderWidgetHostView* NativeTabContentsViewAura::CreateRenderWidgetHostView( - RenderWidgetHost* render_widget_host) { + content::RenderWidgetHost* render_widget_host) { RenderWidgetHostView* view = RenderWidgetHostView::CreateViewForWidget(render_widget_host); diff --git a/chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.h b/chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.h index 437454b..8376b86 100644 --- a/chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.h +++ b/chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.h @@ -35,7 +35,7 @@ class NativeTabContentsViewAura : public views::NativeWidgetAura, // Overridden from NativeTabContentsView: virtual void InitNativeTabContentsView() OVERRIDE; virtual content::RenderWidgetHostView* CreateRenderWidgetHostView( - RenderWidgetHost* render_widget_host) OVERRIDE; + content::RenderWidgetHost* render_widget_host) OVERRIDE; virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE; virtual void SetPageTitle(const string16& title) OVERRIDE; virtual void StartDragging(const WebDropData& drop_data, diff --git a/chrome/browser/ui/views/tab_contents/native_tab_contents_view_gtk.cc b/chrome/browser/ui/views/tab_contents/native_tab_contents_view_gtk.cc index d9a1adf..fa0a530 100644 --- a/chrome/browser/ui/views/tab_contents/native_tab_contents_view_gtk.cc +++ b/chrome/browser/ui/views/tab_contents/native_tab_contents_view_gtk.cc @@ -137,7 +137,7 @@ void NativeTabContentsViewGtk::Unparent() { } RenderWidgetHostView* NativeTabContentsViewGtk::CreateRenderWidgetHostView( - RenderWidgetHost* render_widget_host) { + content::RenderWidgetHost* render_widget_host) { RenderWidgetHostView* view = RenderWidgetHostView::CreateViewForWidget(render_widget_host); view->InitAsChild(NULL); diff --git a/chrome/browser/ui/views/tab_contents/native_tab_contents_view_gtk.h b/chrome/browser/ui/views/tab_contents/native_tab_contents_view_gtk.h index d2c7f79..e802ec5 100644 --- a/chrome/browser/ui/views/tab_contents/native_tab_contents_view_gtk.h +++ b/chrome/browser/ui/views/tab_contents/native_tab_contents_view_gtk.h @@ -37,7 +37,7 @@ class NativeTabContentsViewGtk : public views::NativeWidgetGtk, virtual void InitNativeTabContentsView() OVERRIDE; virtual void Unparent() OVERRIDE; virtual content::RenderWidgetHostView* CreateRenderWidgetHostView( - RenderWidgetHost* render_widget_host) OVERRIDE; + content::RenderWidgetHost* render_widget_host) OVERRIDE; virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE; virtual void SetPageTitle(const string16& title) OVERRIDE; virtual void StartDragging(const WebDropData& drop_data, diff --git a/chrome/browser/ui/views/tab_contents/native_tab_contents_view_win.cc b/chrome/browser/ui/views/tab_contents/native_tab_contents_view_win.cc index 35137d4..0531f5a 100644 --- a/chrome/browser/ui/views/tab_contents/native_tab_contents_view_win.cc +++ b/chrome/browser/ui/views/tab_contents/native_tab_contents_view_win.cc @@ -108,7 +108,7 @@ void NativeTabContentsViewWin::InitNativeTabContentsView() { } RenderWidgetHostView* NativeTabContentsViewWin::CreateRenderWidgetHostView( - RenderWidgetHost* render_widget_host) { + content::RenderWidgetHost* render_widget_host) { RenderWidgetHostView* view = RenderWidgetHostView::CreateViewForWidget(render_widget_host); diff --git a/chrome/browser/ui/views/tab_contents/native_tab_contents_view_win.h b/chrome/browser/ui/views/tab_contents/native_tab_contents_view_win.h index 9356617..0578f9c 100644 --- a/chrome/browser/ui/views/tab_contents/native_tab_contents_view_win.h +++ b/chrome/browser/ui/views/tab_contents/native_tab_contents_view_win.h @@ -33,7 +33,7 @@ class NativeTabContentsViewWin : public views::NativeWidgetWin, // Overridden from NativeTabContentsView: virtual void InitNativeTabContentsView() OVERRIDE; virtual content::RenderWidgetHostView* CreateRenderWidgetHostView( - RenderWidgetHost* render_widget_host) OVERRIDE; + content::RenderWidgetHost* render_widget_host) OVERRIDE; virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE; virtual void SetPageTitle(const string16& title) OVERRIDE; virtual void StartDragging(const WebDropData& drop_data, diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_container.cc b/chrome/browser/ui/views/tab_contents/tab_contents_container.cc index c6212db..24aa868 100644 --- a/chrome/browser/ui/views/tab_contents/tab_contents_container.cc +++ b/chrome/browser/ui/views/tab_contents/tab_contents_container.cc @@ -17,6 +17,7 @@ #include "ui/base/accessibility/accessible_view_state.h" using content::NavigationController; +using content::RenderViewHost; using content::WebContents; //////////////////////////////////////////////////////////////////////////////// diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_container.h b/chrome/browser/ui/views/tab_contents/tab_contents_container.h index d88ec23..28729a3 100644 --- a/chrome/browser/ui/views/tab_contents/tab_contents_container.h +++ b/chrome/browser/ui/views/tab_contents/tab_contents_container.h @@ -12,9 +12,9 @@ #include "ui/views/view.h" class NativeTabContentsContainer; -class RenderViewHost; namespace content { +class RenderViewHost; class WebContents; } @@ -63,8 +63,8 @@ class TabContentsContainer : public views::View, // Called when the RenderViewHost of the hosted TabContents has changed, e.g. // to show an interstitial page. - void RenderViewHostChanged(RenderViewHost* old_host, - RenderViewHost* new_host); + void RenderViewHostChanged(content::RenderViewHost* old_host, + content::RenderViewHost* new_host); // Called when a WebContents is destroyed. This gives us a chance to clean // up our internal state if the TabContents is somehow destroyed before we diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc b/chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc index 078c2ed..853068e 100644 --- a/chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc +++ b/chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc @@ -34,6 +34,7 @@ using WebKit::WebDragOperation; using WebKit::WebDragOperationNone; using WebKit::WebDragOperationsMask; using WebKit::WebInputEvent; +using content::RenderViewHost; using content::RenderWidgetHostView; using content::WebContents; @@ -62,7 +63,7 @@ void TabContentsViewViews::CreateView(const gfx::Size& initial_size) { } RenderWidgetHostView* TabContentsViewViews::CreateViewForWidget( - RenderWidgetHost* render_widget_host) { + content::RenderWidgetHost* render_widget_host) { if (render_widget_host->GetView()) { // During testing, the view will already be set up in most cases to the // test view, so we don't want to clobber it with a real one. To verify that diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_view_views.h b/chrome/browser/ui/views/tab_contents/tab_contents_view_views.h index 5c7fc95..2e204c7 100644 --- a/chrome/browser/ui/views/tab_contents/tab_contents_view_views.h +++ b/chrome/browser/ui/views/tab_contents/tab_contents_view_views.h @@ -44,7 +44,7 @@ class TabContentsViewViews : public views::Widget, // Overridden from WebContentsView: virtual void CreateView(const gfx::Size& initial_size) OVERRIDE; virtual content::RenderWidgetHostView* CreateViewForWidget( - RenderWidgetHost* render_widget_host) OVERRIDE; + content::RenderWidgetHost* render_widget_host) OVERRIDE; virtual gfx::NativeView GetNativeView() const OVERRIDE; virtual gfx::NativeView GetContentNativeView() const OVERRIDE; virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE; @@ -53,7 +53,7 @@ class TabContentsViewViews : public views::Widget, virtual void OnTabCrashed(base::TerminationStatus status, int error_code) OVERRIDE; virtual void SizeContents(const gfx::Size& size) OVERRIDE; - virtual void RenderViewCreated(RenderViewHost* host) OVERRIDE; + virtual void RenderViewCreated(content::RenderViewHost* host) OVERRIDE; virtual void Focus() OVERRIDE; virtual void SetInitialFocus() OVERRIDE; virtual void StoreFocus() OVERRIDE; diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc index 537d219..2a2e25e 100644 --- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc @@ -44,6 +44,7 @@ #endif using content::BrowserThread; +using content::RenderViewHost; namespace { diff --git a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc index 2c24a99..32d9f81 100644 --- a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc +++ b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc @@ -46,6 +46,7 @@ #include "ui/base/resource/resource_bundle.h" using content::BrowserThread; +using content::RenderViewHost; using content::WebContents; using content::WebUIMessageHandler; diff --git a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.h b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.h index e55740f..1addcb8 100644 --- a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.h +++ b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.h @@ -18,7 +18,8 @@ class MobileSetupUI : public content::WebUIController, private: // WebUIController overrides. - virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; + virtual void RenderViewCreated( + content::RenderViewHost* render_view_host) OVERRIDE; DISALLOW_COPY_AND_ASSIGN(MobileSetupUI); }; diff --git a/chrome/browser/ui/webui/constrained_html_ui.cc b/chrome/browser/ui/webui/constrained_html_ui.cc index 1febb6e..c862123 100644 --- a/chrome/browser/ui/webui/constrained_html_ui.cc +++ b/chrome/browser/ui/webui/constrained_html_ui.cc @@ -19,6 +19,7 @@ #include "content/public/browser/web_contents.h" #include "content/public/browser/web_ui.h" +using content::RenderViewHost; using content::WebContents; using content::WebUIMessageHandler; diff --git a/chrome/browser/ui/webui/constrained_html_ui.h b/chrome/browser/ui/webui/constrained_html_ui.h index c696ed0..dc1efd2 100644 --- a/chrome/browser/ui/webui/constrained_html_ui.h +++ b/chrome/browser/ui/webui/constrained_html_ui.h @@ -13,13 +13,16 @@ class ConstrainedWindow; class HtmlDialogTabContentsDelegate; class HtmlDialogUIDelegate; class Profile; -class RenderViewHost; class TabContentsWrapper; namespace base { template<class T> class PropertyAccessor; } +namespace content { +class RenderViewHost; +} + class ConstrainedHtmlUIDelegate { public: virtual const HtmlDialogUIDelegate* GetHtmlDialogUIDelegate() const = 0; @@ -58,7 +61,8 @@ class ConstrainedHtmlUI : public content::WebUIController { virtual ~ConstrainedHtmlUI(); // WebUIController implementation: - virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; + virtual void RenderViewCreated( + content::RenderViewHost* render_view_host) OVERRIDE; // Create a constrained HTML dialog. The actual object that gets created // is a ConstrainedHtmlUIDelegate, which later triggers construction of a diff --git a/chrome/browser/ui/webui/devtools_ui.cc b/chrome/browser/ui/webui/devtools_ui.cc index c8ee2f0..63a37d1 100644 --- a/chrome/browser/ui/webui/devtools_ui.cc +++ b/chrome/browser/ui/webui/devtools_ui.cc @@ -103,6 +103,7 @@ DevToolsUI::DevToolsUI(content::WebUI* web_ui) : WebUIController(web_ui) { profile->GetChromeURLDataManager()->AddDataSource(data_source); } -void DevToolsUI::RenderViewCreated(RenderViewHost* render_view_host) { +void DevToolsUI::RenderViewCreated( + content::RenderViewHost* render_view_host) { content::DevToolsClientHost::SetupDevToolsFrontendClient(render_view_host); } diff --git a/chrome/browser/ui/webui/devtools_ui.h b/chrome/browser/ui/webui/devtools_ui.h index 71b211b..8e84761 100644 --- a/chrome/browser/ui/webui/devtools_ui.h +++ b/chrome/browser/ui/webui/devtools_ui.h @@ -18,7 +18,8 @@ class DevToolsUI : public content::WebUIController { explicit DevToolsUI(content::WebUI* web_ui); // WebUIController - virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; + virtual void RenderViewCreated( + content::RenderViewHost* render_view_host) OVERRIDE; private: DISALLOW_COPY_AND_ASSIGN(DevToolsUI); diff --git a/chrome/browser/ui/webui/html_dialog_ui.cc b/chrome/browser/ui/webui/html_dialog_ui.cc index eb81689..5f47087 100644 --- a/chrome/browser/ui/webui/html_dialog_ui.cc +++ b/chrome/browser/ui/webui/html_dialog_ui.cc @@ -17,6 +17,7 @@ #include "content/public/browser/web_ui_message_handler.h" #include "content/public/common/bindings_policy.h" +using content::RenderViewHost; using content::WebUIMessageHandler; static base::LazyInstance<base::PropertyAccessor<HtmlDialogUIDelegate*> > diff --git a/chrome/browser/ui/webui/html_dialog_ui.h b/chrome/browser/ui/webui/html_dialog_ui.h index 0987f57..5af2892 100644 --- a/chrome/browser/ui/webui/html_dialog_ui.h +++ b/chrome/browser/ui/webui/html_dialog_ui.h @@ -145,7 +145,8 @@ class HtmlDialogUI : public content::WebUIController { private: // WebUIController - virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; + virtual void RenderViewCreated( + content::RenderViewHost* render_view_host) OVERRIDE; // JS message handler. void OnDialogClosed(const base::ListValue* args); diff --git a/chrome/browser/ui/webui/media/media_internals_handler.cc b/chrome/browser/ui/webui/media/media_internals_handler.cc index fd32399..fe3968c 100644 --- a/chrome/browser/ui/webui/media/media_internals_handler.cc +++ b/chrome/browser/ui/webui/media/media_internals_handler.cc @@ -38,7 +38,8 @@ void MediaInternalsMessageHandler::OnGetEverything(const ListValue* list) { void MediaInternalsMessageHandler::OnUpdate(const string16& update) { // Don't try to execute JavaScript in a RenderView that no longer exists. - RenderViewHost* host = web_ui()->GetWebContents()->GetRenderViewHost(); + content::RenderViewHost* host = + web_ui()->GetWebContents()->GetRenderViewHost(); if (host) host->ExecuteJavascriptInWebFrame(string16(), update); } diff --git a/chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc b/chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc index 77e63a8..79d7a88 100644 --- a/chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc +++ b/chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc @@ -244,7 +244,8 @@ void NetInternalsTest::MessageHandler::PrerenderPage( void NetInternalsTest::MessageHandler::NavigateToPrerender( const ListValue* list_value) { - RenderViewHost* host = browser()->GetWebContentsAt(1)->GetRenderViewHost(); + content::RenderViewHost* host = + browser()->GetWebContentsAt(1)->GetRenderViewHost(); host->ExecuteJavascriptInWebFrame(string16(), ASCIIToUTF16("Click()")); } diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.cc b/chrome/browser/ui/webui/ntp/new_tab_ui.cc index 9fe4427..c86b6f2 100644 --- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc +++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc @@ -64,6 +64,7 @@ #endif using content::BrowserThread; +using content::RenderViewHost; using content::UserMetricsAction; using content::WebContents; using content::WebUIController; @@ -200,7 +201,7 @@ void NewTabUI::StartTimingPaint(RenderViewHost* render_view_host) { start_ = base::TimeTicks::Now(); last_paint_ = start_; registrar_.Add(this, content::NOTIFICATION_RENDER_WIDGET_HOST_DID_PAINT, - content::Source<RenderWidgetHost>(render_view_host)); + content::Source<content::RenderWidgetHost>(render_view_host)); timer_.Start(FROM_HERE, base::TimeDelta::FromMilliseconds(kTimeoutMs), this, &NewTabUI::PaintTimeout); diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.h b/chrome/browser/ui/webui/ntp/new_tab_ui.h index cb64ee4..33204fa 100644 --- a/chrome/browser/ui/webui/ntp/new_tab_ui.h +++ b/chrome/browser/ui/webui/ntp/new_tab_ui.h @@ -62,8 +62,10 @@ class NewTabUI : public content::WebUIController, static int current_pref_version() { return current_pref_version_; } // WebUIController implementation: - virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; - virtual void RenderViewReused(RenderViewHost* render_view_host) OVERRIDE; + virtual void RenderViewCreated( + content::RenderViewHost* render_view_host) OVERRIDE; + virtual void RenderViewReused( + content::RenderViewHost* render_view_host) OVERRIDE; // Returns true if the bookmark bar can be displayed over this webui, detached // from the location bar. @@ -115,7 +117,7 @@ class NewTabUI : public content::WebUIController, // Reset the CSS caches. void InitializeCSSCaches(); - void StartTimingPaint(RenderViewHost* render_view_host); + void StartTimingPaint(content::RenderViewHost* render_view_host); void PaintTimeout(); Profile* GetProfile() const; diff --git a/chrome/browser/ui/webui/options/extension_settings_handler.cc b/chrome/browser/ui/webui/options/extension_settings_handler.cc index ebd9d5a..f742689 100644 --- a/chrome/browser/ui/webui/options/extension_settings_handler.cc +++ b/chrome/browser/ui/webui/options/extension_settings_handler.cc @@ -46,6 +46,7 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" +using content::RenderViewHost; using content::WebContents; namespace { diff --git a/chrome/browser/ui/webui/options/extension_settings_handler.h b/chrome/browser/ui/webui/options/extension_settings_handler.h index a4c51b1..2fbf7c3 100644 --- a/chrome/browser/ui/webui/options/extension_settings_handler.h +++ b/chrome/browser/ui/webui/options/extension_settings_handler.h @@ -155,7 +155,7 @@ class ExtensionSettingsHandler : public OptionsPageUIHandler, std::vector<ExtensionPage> GetActivePagesForExtension( const Extension* extension); void GetActivePagesForExtensionProcess( - const std::set<RenderViewHost*>& views, + const std::set<content::RenderViewHost*>& views, std::vector<ExtensionPage> *result); // Returns the ExtensionUninstallDialog object for this class, creating it if @@ -184,7 +184,7 @@ class ExtensionSettingsHandler : public OptionsPageUIHandler, // notification is sent when it is in the process of being deleted (and before // it is removed from the process). Keep a pointer to it so we can exclude // it from the active views. - RenderViewHost* deleting_rvh_; + content::RenderViewHost* deleting_rvh_; // We want to register for notifications only after we've responded at least // once to the page, otherwise we'd be calling javacsript functions on objects diff --git a/chrome/browser/ui/webui/options/options_ui.cc b/chrome/browser/ui/webui/options/options_ui.cc index 07bf212..5f0dd46 100644 --- a/chrome/browser/ui/webui/options/options_ui.cc +++ b/chrome/browser/ui/webui/options/options_ui.cc @@ -83,6 +83,7 @@ #include "chrome/browser/ui/webui/options/certificate_manager_handler.h" #endif +using content::RenderViewHost; using content::UserMetricsAction; using content::WebContents; using content::WebUIMessageHandler; diff --git a/chrome/browser/ui/webui/options/options_ui.h b/chrome/browser/ui/webui/options/options_ui.h index f133056..3e6c10d 100644 --- a/chrome/browser/ui/webui/options/options_ui.h +++ b/chrome/browser/ui/webui/options/options_ui.h @@ -89,8 +89,10 @@ class OptionsUI : public content::WebUIController, static RefCountedMemory* GetFaviconResourceBytes(); // WebUIController implementation. - virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; - virtual void RenderViewReused(RenderViewHost* render_view_host) OVERRIDE; + virtual void RenderViewCreated( + content::RenderViewHost* render_view_host) OVERRIDE; + virtual void RenderViewReused( + content::RenderViewHost* render_view_host) OVERRIDE; virtual void DidBecomeActiveForReusedRenderView() OVERRIDE; // Overridden from OptionsPageUIHandlerHost: @@ -103,7 +105,7 @@ class OptionsUI : public content::WebUIController, // Sets the WebUI CommandLineString property with arguments passed while // launching chrome. - void SetCommandLineString(RenderViewHost* render_view_host); + void SetCommandLineString(content::RenderViewHost* render_view_host); bool initialized_handlers_; diff --git a/chrome/browser/ui/webui/options2/options_ui2.cc b/chrome/browser/ui/webui/options2/options_ui2.cc index bd7dc93..d355037 100644 --- a/chrome/browser/ui/webui/options2/options_ui2.cc +++ b/chrome/browser/ui/webui/options2/options_ui2.cc @@ -78,6 +78,7 @@ #include "chrome/browser/ui/webui/options2/certificate_manager_handler2.h" #endif +using content::RenderViewHost; using content::WebContents; using content::WebUIMessageHandler; diff --git a/chrome/browser/ui/webui/options2/options_ui2.h b/chrome/browser/ui/webui/options2/options_ui2.h index 18724ff..c715db1 100644 --- a/chrome/browser/ui/webui/options2/options_ui2.h +++ b/chrome/browser/ui/webui/options2/options_ui2.h @@ -30,8 +30,10 @@ class OptionsUI : public content::WebUIController, static RefCountedMemory* GetFaviconResourceBytes(); // WebUIController implementation. - virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; - virtual void RenderViewReused(RenderViewHost* render_view_host) OVERRIDE; + virtual void RenderViewCreated( + content::RenderViewHost* render_view_host) OVERRIDE; + virtual void RenderViewReused( + content::RenderViewHost* render_view_host) OVERRIDE; virtual void DidBecomeActiveForReusedRenderView() OVERRIDE; // Overridden from OptionsPageUIHandlerHost: @@ -44,7 +46,7 @@ class OptionsUI : public content::WebUIController, // Sets the WebUI CommandLineString property with arguments passed while // launching chrome. - void SetCommandLineString(RenderViewHost* render_view_host); + void SetCommandLineString(content::RenderViewHost* render_view_host); bool initialized_handlers_; diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc index 0bde627..3d8a541 100644 --- a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc +++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc @@ -64,6 +64,7 @@ using content::BrowserThread; using content::NavigationEntry; using content::OpenURLParams; +using content::RenderViewHost; using content::Referrer; using content::WebContents; using printing::Metafile; diff --git a/chrome/browser/ui/webui/task_manager/task_manager_handler.cc b/chrome/browser/ui/webui/task_manager/task_manager_handler.cc index 9c573c2..3345d2c 100644 --- a/chrome/browser/ui/webui/task_manager/task_manager_handler.cc +++ b/chrome/browser/ui/webui/task_manager/task_manager_handler.cc @@ -344,7 +344,8 @@ void TaskManagerHandler::EnableTaskManager(const ListValue* indexes) { } void TaskManagerHandler::OpenAboutMemory(const ListValue* indexes) { - RenderViewHost* rvh = web_ui()->GetWebContents()->GetRenderViewHost(); + content::RenderViewHost* rvh = + web_ui()->GetWebContents()->GetRenderViewHost(); if (rvh && rvh->GetDelegate()) { WebPreferences webkit_prefs = rvh->GetDelegate()->GetWebkitPrefs(); webkit_prefs.allow_scripts_to_close_windows = true; diff --git a/chrome/browser/ui/webui/uber/uber_ui.cc b/chrome/browser/ui/webui/uber/uber_ui.cc index 3e64426..6273992 100644 --- a/chrome/browser/ui/webui/uber/uber_ui.cc +++ b/chrome/browser/ui/webui/uber/uber_ui.cc @@ -19,6 +19,7 @@ #include "grit/chromium_strings.h" #include "grit/generated_resources.h" +using content::RenderViewHost; using content::WebContents; namespace { diff --git a/chrome/browser/ui/webui/uber/uber_ui.h b/chrome/browser/ui/webui/uber/uber_ui.h index b318259..c6e94a9 100644 --- a/chrome/browser/ui/webui/uber/uber_ui.h +++ b/chrome/browser/ui/webui/uber/uber_ui.h @@ -26,8 +26,10 @@ class UberUI : public content::WebUIController { const ListValue& args) OVERRIDE; // We forward these to |sub_uis_|. - virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; - virtual void RenderViewReused(RenderViewHost* render_view_host) OVERRIDE; + virtual void RenderViewCreated( + content::RenderViewHost* render_view_host) OVERRIDE; + virtual void RenderViewReused( + content::RenderViewHost* render_view_host) OVERRIDE; virtual void DidBecomeActiveForReusedRenderView() OVERRIDE; private: diff --git a/chrome/browser/ui/webui/web_ui_browsertest.cc b/chrome/browser/ui/webui/web_ui_browsertest.cc index 82c98e1..114ffd6 100644 --- a/chrome/browser/ui/webui/web_ui_browsertest.cc +++ b/chrome/browser/ui/webui/web_ui_browsertest.cc @@ -33,6 +33,7 @@ #include "ui/base/resource/resource_bundle.h" using content::NavigationController; +using content::RenderViewHost; using content::WebContents; using content::WebUIController; using content::WebUIMessageHandler; diff --git a/chrome/browser/ui/webui/web_ui_browsertest.h b/chrome/browser/ui/webui/web_ui_browsertest.h index aad452b..53b1331 100644 --- a/chrome/browser/ui/webui/web_ui_browsertest.h +++ b/chrome/browser/ui/webui/web_ui_browsertest.h @@ -15,13 +15,12 @@ #include "content/test/js_injection_ready_observer.h" #include "content/test/test_navigation_observer.h" -class RenderViewHost; - namespace base { class Value; } namespace content { +class RenderViewHost; class WebUI; class WebUIMessageHandler; } @@ -100,7 +99,7 @@ class WebUIBrowserTest // javascript invocation. void PreLoadJavascriptLibraries(const std::string& preload_test_fixture, const std::string& preload_test_name, - RenderViewHost* preload_host); + content::RenderViewHost* preload_host); // Called by javascript-generated test bodies to browse to a page and preload // the javascript for the given |preload_test_fixture| and @@ -146,7 +145,8 @@ class WebUIBrowserTest private: // JsInjectionReadyObserver implementation. - virtual void OnJsInjectionReady(RenderViewHost* render_view_host) OVERRIDE; + virtual void OnJsInjectionReady( + content::RenderViewHost* render_view_host) OVERRIDE; // Builds a string containing all added javascript libraries. void BuildJavascriptLibraries(string16* content); @@ -168,7 +168,7 @@ class WebUIBrowserTest const ConstValueVector& function_arguments, bool is_test, bool is_async, - RenderViewHost* preload_host); + content::RenderViewHost* preload_host); // Attaches mock and test handlers. void SetupHandlers(); diff --git a/chrome/browser/ui/webui/web_ui_test_handler.cc b/chrome/browser/ui/webui/web_ui_test_handler.cc index 1294e04..400ea4d 100644 --- a/chrome/browser/ui/webui/web_ui_test_handler.cc +++ b/chrome/browser/ui/webui/web_ui_test_handler.cc @@ -17,6 +17,8 @@ #include "content/public/browser/web_contents.h" #include "content/public/browser/web_ui.h" +using content::RenderViewHost; + WebUITestHandler::WebUITestHandler() : test_done_(false), test_succeeded_(false), diff --git a/chrome/browser/ui/webui/web_ui_test_handler.h b/chrome/browser/ui/webui/web_ui_test_handler.h index 9356c75..85e7040 100644 --- a/chrome/browser/ui/webui/web_ui_test_handler.h +++ b/chrome/browser/ui/webui/web_ui_test_handler.h @@ -11,11 +11,13 @@ #include "content/public/browser/notification_observer.h" #include "content/public/browser/web_ui_message_handler.h" -class RenderViewHost; - namespace base { class ListValue; -} // namespace base +} + +namespace content { +class RenderViewHost; +} // This class registers test framework specific handlers on WebUI objects. class WebUITestHandler : public content::WebUIMessageHandler, @@ -26,7 +28,7 @@ class WebUITestHandler : public content::WebUIMessageHandler, // Sends a message through |preload_host| with the |js_text| to preload at the // appropriate time before the onload call is made. void PreloadJavaScript(const string16& js_text, - RenderViewHost* preload_host); + content::RenderViewHost* preload_host); // Runs |js_text| in this object's WebUI frame. Does not wait for any result. void RunJavaScript(const string16& js_text); diff --git a/chrome/browser/ui/webui/web_ui_unittest.cc b/chrome/browser/ui/webui/web_ui_unittest.cc index 2d80485..93955d7 100644 --- a/chrome/browser/ui/webui/web_ui_unittest.cc +++ b/chrome/browser/ui/webui/web_ui_unittest.cc @@ -17,6 +17,7 @@ using content::BrowserThread; using content::NavigationController; using content::SiteInstance; +using content::TestRenderViewHost; using content::WebContents; class WebUITest : public TabContentsWrapperTestHarness { diff --git a/chrome/browser/visitedlink/visitedlink_event_listener.cc b/chrome/browser/visitedlink/visitedlink_event_listener.cc index 7f50e86..01617c0 100644 --- a/chrome/browser/visitedlink/visitedlink_event_listener.cc +++ b/chrome/browser/visitedlink/visitedlink_event_listener.cc @@ -14,6 +14,7 @@ using base::Time; using base::TimeDelta; +using content::RenderWidgetHost; namespace { diff --git a/chrome/test/base/browser_with_test_window_test.cc b/chrome/test/base/browser_with_test_window_test.cc index 29e0582..1595939 100644 --- a/chrome/test/base/browser_with_test_window_test.cc +++ b/chrome/test/base/browser_with_test_window_test.cc @@ -26,6 +26,7 @@ using content::BrowserThread; using content::NavigationController; +using content::TestRenderViewHost; using content::WebContents; BrowserWithTestWindowTest::BrowserWithTestWindowTest() diff --git a/chrome/test/base/browser_with_test_window_test.h b/chrome/test/base/browser_with_test_window_test.h index 294f72f..b5ae0b0 100644 --- a/chrome/test/base/browser_with_test_window_test.h +++ b/chrome/test/base/browser_with_test_window_test.h @@ -63,7 +63,7 @@ class BrowserWithTestWindowTest : public testing::Test { // Returns the current RenderViewHost for the current tab as a // TestRenderViewHost. - TestRenderViewHost* TestRenderViewHostForTab( + content::TestRenderViewHost* TestRenderViewHostForTab( content::WebContents* web_contents); protected: diff --git a/chrome/test/base/test_html_dialog_observer.cc b/chrome/test/base/test_html_dialog_observer.cc index 97a082d..f6c69be 100644 --- a/chrome/test/base/test_html_dialog_observer.cc +++ b/chrome/test/base/test_html_dialog_observer.cc @@ -36,7 +36,7 @@ void TestHtmlDialogObserver::Observe( case chrome::NOTIFICATION_HTML_DIALOG_SHOWN: if (js_injection_ready_observer_) { js_injection_ready_observer_->OnJsInjectionReady( - content::Details<RenderViewHost>(details).ptr()); + content::Details<content::RenderViewHost>(details).ptr()); } web_ui_ = content::Source<content::WebUI>(source).ptr(); registrar_.Remove(this, chrome::NOTIFICATION_HTML_DIALOG_SHOWN, diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc index fc57c4d..1df3adb 100644 --- a/chrome/test/base/ui_test_utils.cc +++ b/chrome/test/base/ui_test_utils.cc @@ -75,6 +75,8 @@ using content::DomOperationNotificationDetails; using content::NavigationController; using content::NavigationEntry; using content::OpenURLParams; +using content::RenderViewHost; +using content::RenderWidgetHost; using content::Referrer; using content::WebContents; diff --git a/chrome/test/base/ui_test_utils.h b/chrome/test/base/ui_test_utils.h index aa96620..d407f08 100644 --- a/chrome/test/base/ui_test_utils.h +++ b/chrome/test/base/ui_test_utils.h @@ -43,8 +43,6 @@ class FilePath; class GURL; class MessageLoop; class Profile; -class RenderViewHost; -class RenderWidgetHost; class ScopedTempDir; class SkBitmap; class TabContents; @@ -56,6 +54,8 @@ struct NavigateParams; } namespace content { +class RenderViewHost; +class RenderWidgetHost; class WebContents; } @@ -155,7 +155,7 @@ DOMElementProxyRef GetActiveDOMDocument(Browser* browser); // domAutomationController.send(); otherwise, your test will hang or be flaky. // If you want to extract a result, use one of the below functions. // Returns true on success. -bool ExecuteJavaScript(RenderViewHost* render_view_host, +bool ExecuteJavaScript(content::RenderViewHost* render_view_host, const std::wstring& frame_xpath, const std::wstring& script) WARN_UNUSED_RESULT; @@ -166,18 +166,19 @@ bool ExecuteJavaScript(RenderViewHost* render_view_host, // evaluate to the expected type. // Note: In order for the domAutomationController to work, you must call // EnableDOMAutomation() in your test first. -bool ExecuteJavaScriptAndExtractInt(RenderViewHost* render_view_host, +bool ExecuteJavaScriptAndExtractInt(content::RenderViewHost* render_view_host, const std::wstring& frame_xpath, const std::wstring& script, int* result) WARN_UNUSED_RESULT; -bool ExecuteJavaScriptAndExtractBool(RenderViewHost* render_view_host, +bool ExecuteJavaScriptAndExtractBool(content::RenderViewHost* render_view_host, const std::wstring& frame_xpath, const std::wstring& script, bool* result) WARN_UNUSED_RESULT; -bool ExecuteJavaScriptAndExtractString(RenderViewHost* render_view_host, - const std::wstring& frame_xpath, - const std::wstring& script, - std::string* result) WARN_UNUSED_RESULT; +bool ExecuteJavaScriptAndExtractString( + content::RenderViewHost* render_view_host, + const std::wstring& frame_xpath, + const std::wstring& script, + std::string* result) WARN_UNUSED_RESULT; // Generate the file path for testing a particular test. // The file for the tests is all located in @@ -576,14 +577,14 @@ class DOMMessageQueue : public content::NotificationObserver { // Takes a snapshot of the given render widget, rendered at |page_size|. The // snapshot is set to |bitmap|. Returns true on success. -bool TakeRenderWidgetSnapshot(RenderWidgetHost* rwh, +bool TakeRenderWidgetSnapshot(content::RenderWidgetHost* rwh, const gfx::Size& page_size, SkBitmap* bitmap) WARN_UNUSED_RESULT; // Takes a snapshot of the entire page, according to the width and height // properties of the DOM's document. Returns true on success. DOMAutomation // must be enabled. -bool TakeEntirePageSnapshot(RenderViewHost* rvh, +bool TakeEntirePageSnapshot(content::RenderViewHost* rvh, SkBitmap* bitmap) WARN_UNUSED_RESULT; } // namespace ui_test_utils diff --git a/chrome/test/perf/rendering/latency_tests.cc b/chrome/test/perf/rendering/latency_tests.cc index f7fc99c..aded8c6 100644 --- a/chrome/test/perf/rendering/latency_tests.cc +++ b/chrome/test/perf/rendering/latency_tests.cc @@ -546,7 +546,7 @@ void LatencyTest::GetMeanFrameTimeMicros(int* frame_time) const { } void LatencyTest::SendInput() { - RenderViewHost* rvh = browser()->GetSelectedTabContentsWrapper()-> + content::RenderViewHost* rvh = browser()->GetSelectedTabContentsWrapper()-> web_contents()->GetRenderViewHost(); WebKit::WebMouseEvent mouse_event; mouse_event.movementX = 1; diff --git a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc index f773a66..b915669 100644 --- a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc +++ b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc @@ -24,6 +24,9 @@ #include "testing/gtest/include/gtest/gtest.h" using content::OpenURLParams; +using content::RenderViewHostImpl; +using content::RenderWidgetHostImpl; +using content::RenderWidgetHost; using content::Referrer; namespace { diff --git a/content/browser/accessibility/renderer_accessibility_browsertest.cc b/content/browser/accessibility/renderer_accessibility_browsertest.cc index 3e79d42..76d77fd 100644 --- a/content/browser/accessibility/renderer_accessibility_browsertest.cc +++ b/content/browser/accessibility/renderer_accessibility_browsertest.cc @@ -22,6 +22,8 @@ #endif using content::OpenURLParams; +using content::RenderViewHostImpl; +using content::RenderWidgetHostImpl; using content::Referrer; using webkit_glue::WebAccessibility; diff --git a/content/browser/debugger/devtools_manager_impl.h b/content/browser/debugger/devtools_manager_impl.h index 388f8e4..bfcff16 100644 --- a/content/browser/debugger/devtools_manager_impl.h +++ b/content/browser/debugger/devtools_manager_impl.h @@ -17,7 +17,6 @@ #include "content/public/browser/devtools_manager.h" class GURL; -class RenderViewHost; class TabContents; namespace IPC { @@ -27,6 +26,7 @@ class Message; namespace content { class DevToolsAgentHost; +class RenderViewHost; // This class is a singleton that manages DevToolsClientHost instances and // routes messages between developer tools clients and agents. diff --git a/content/browser/debugger/devtools_manager_unittest.cc b/content/browser/debugger/devtools_manager_unittest.cc index 3bfc745..8adabd6 100644 --- a/content/browser/debugger/devtools_manager_unittest.cc +++ b/content/browser/debugger/devtools_manager_unittest.cc @@ -180,7 +180,7 @@ TEST_F(DevToolsManagerTest, ForwardMessageToClient) { } TEST_F(DevToolsManagerTest, NoUnresponsiveDialogInInspectedTab) { - TestRenderViewHost* inspected_rvh = rvh(); + content::TestRenderViewHost* inspected_rvh = rvh(); inspected_rvh->set_render_view_created(true); EXPECT_FALSE(contents()->GetDelegate()); TestWebContentsDelegate delegate; diff --git a/content/browser/debugger/render_view_devtools_agent_host.h b/content/browser/debugger/render_view_devtools_agent_host.h index e0cab1f..b05e7df 100644 --- a/content/browser/debugger/render_view_devtools_agent_host.h +++ b/content/browser/debugger/render_view_devtools_agent_host.h @@ -13,11 +13,12 @@ #include "content/common/content_export.h" #include "content/public/browser/render_view_host_observer.h" -class RenderViewHost; class TabContents; namespace content { +class RenderViewHost; + class CONTENT_EXPORT RenderViewDevToolsAgentHost : public DevToolsAgentHost, private content::RenderViewHostObserver { diff --git a/content/browser/download/download_request_handle.cc b/content/browser/download/download_request_handle.cc index c006e19..6d2292e 100644 --- a/content/browser/download/download_request_handle.cc +++ b/content/browser/download/download_request_handle.cc @@ -14,6 +14,7 @@ using content::BrowserThread; using content::DownloadManager; +using content::RenderViewHostImpl; // IO Thread indirections to resource dispatcher host. // Provided as targets for PostTask from within this object diff --git a/content/browser/download/mhtml_generation_manager.cc b/content/browser/download/mhtml_generation_manager.cc index c06fe12..1367484 100644 --- a/content/browser/download/mhtml_generation_manager.cc +++ b/content/browser/download/mhtml_generation_manager.cc @@ -15,6 +15,7 @@ #include "content/public/browser/notification_types.h" using content::BrowserThread; +using content::RenderViewHostImpl; using content::WebContents; MHTMLGenerationManager::Job::Job() diff --git a/content/browser/download/save_file_manager.cc b/content/browser/download/save_file_manager.cc index 6599ad7..03e2e51 100644 --- a/content/browser/download/save_file_manager.cc +++ b/content/browser/download/save_file_manager.cc @@ -23,6 +23,7 @@ #include "net/base/net_util.h" using content::BrowserThread; +using content::RenderViewHostImpl; SaveFileManager::SaveFileManager(ResourceDispatcherHost* rdh) : next_id_(0), diff --git a/content/browser/geolocation/geolocation_dispatcher_host.cc b/content/browser/geolocation/geolocation_dispatcher_host.cc index 619b3b1..63d8099 100644 --- a/content/browser/geolocation/geolocation_dispatcher_host.cc +++ b/content/browser/geolocation/geolocation_dispatcher_host.cc @@ -19,6 +19,7 @@ using content::BrowserThread; using content::GeolocationPermissionContext; +using content::RenderViewHostImpl; namespace { diff --git a/content/browser/gpu/gpu_process_host_ui_shim.cc b/content/browser/gpu/gpu_process_host_ui_shim.cc index c8f0d87..0917f49 100644 --- a/content/browser/gpu/gpu_process_host_ui_shim.cc +++ b/content/browser/gpu/gpu_process_host_ui_shim.cc @@ -29,6 +29,7 @@ #endif using content::BrowserThread; +using content::RenderWidgetHostImpl; using content::RenderWidgetHostViewPort; namespace { diff --git a/content/browser/host_zoom_map_impl.cc b/content/browser/host_zoom_map_impl.cc index 09d3887..1b6e990 100644 --- a/content/browser/host_zoom_map_impl.cc +++ b/content/browser/host_zoom_map_impl.cc @@ -25,6 +25,7 @@ using WebKit::WebView; using content::BrowserThread; using content::RenderProcessHost; +using content::RenderViewHost; static const char* kHostZoomMapKeyName = "content_host_zoom_map"; diff --git a/content/browser/intents/intent_injector.cc b/content/browser/intents/intent_injector.cc index 0beee38..0319889 100644 --- a/content/browser/intents/intent_injector.cc +++ b/content/browser/intents/intent_injector.cc @@ -16,6 +16,7 @@ #include "webkit/glue/web_intent_data.h" #include "webkit/glue/web_intent_reply_data.h" +using content::RenderViewHost; using content::WebContents; IntentInjector::IntentInjector(WebContents* web_contents) @@ -62,9 +63,8 @@ void IntentInjector::RenderViewCreated(RenderViewHost* render_view_host) { return; } - static_cast<RenderViewHostImpl*>(render_view_host)->Send( - new IntentsMsg_SetWebIntentData( - render_view_host->GetRoutingID(), *(source_intent_.get()))); + render_view_host->Send(new IntentsMsg_SetWebIntentData( + render_view_host->GetRoutingID(), *(source_intent_.get()))); } bool IntentInjector::OnMessageReceived(const IPC::Message& message) { diff --git a/content/browser/intents/intent_injector.h b/content/browser/intents/intent_injector.h index 6a1d98f..c2eb073 100644 --- a/content/browser/intents/intent_injector.h +++ b/content/browser/intents/intent_injector.h @@ -38,7 +38,8 @@ class CONTENT_EXPORT IntentInjector : public content::WebContentsObserver { virtual ~IntentInjector(); // content::WebContentsObserver implementation. - virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; + virtual void RenderViewCreated( + content::RenderViewHost* render_view_host) OVERRIDE; virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; virtual void WebContentsDestroyed(content::WebContents* tab) OVERRIDE; diff --git a/content/browser/renderer_host/backing_store.cc b/content/browser/renderer_host/backing_store.cc index 2c6edfc..63bd1a3 100644 --- a/content/browser/renderer_host/backing_store.cc +++ b/content/browser/renderer_host/backing_store.cc @@ -4,7 +4,8 @@ #include "content/browser/renderer_host/backing_store.h" -BackingStore::BackingStore(RenderWidgetHost* widget, const gfx::Size& size) +BackingStore::BackingStore(content::RenderWidgetHost* widget, + const gfx::Size& size) : render_widget_host_(widget), size_(size) { } diff --git a/content/browser/renderer_host/backing_store.h b/content/browser/renderer_host/backing_store.h index ddb7369e..203f8de 100644 --- a/content/browser/renderer_host/backing_store.h +++ b/content/browser/renderer_host/backing_store.h @@ -15,7 +15,6 @@ #include "ui/gfx/surface/transport_dib.h" class RenderProcessHost; -class RenderWidgetHost; namespace gfx { class Rect; @@ -23,6 +22,7 @@ class Rect; namespace content { class RenderProcessHost; +class RenderWidgetHost; } namespace skia { @@ -34,7 +34,9 @@ class CONTENT_EXPORT BackingStore { public: virtual ~BackingStore(); - RenderWidgetHost* render_widget_host() const { return render_widget_host_; } + content::RenderWidgetHost* render_widget_host() const { + return render_widget_host_; + } const gfx::Size& size() { return size_; } // The number of bytes that this backing store consumes. The default @@ -72,11 +74,11 @@ class CONTENT_EXPORT BackingStore { const gfx::Size& view_size) = 0; protected: // Can only be constructed via subclasses. - BackingStore(RenderWidgetHost* widget, const gfx::Size& size); + BackingStore(content::RenderWidgetHost* widget, const gfx::Size& size); private: // The owner of this backing store. - RenderWidgetHost* render_widget_host_; + content::RenderWidgetHost* render_widget_host_; // The size of the backing store. gfx::Size size_; diff --git a/content/browser/renderer_host/backing_store_gtk.cc b/content/browser/renderer_host/backing_store_gtk.cc index 06d2e66..d357968 100644 --- a/content/browser/renderer_host/backing_store_gtk.cc +++ b/content/browser/renderer_host/backing_store_gtk.cc @@ -34,6 +34,8 @@ #include "ui/gfx/rect.h" #include "ui/gfx/surface/transport_dib.h" +using content::RenderWidgetHost; + namespace { // Assume that somewhere along the line, someone will do width * height * 4 diff --git a/content/browser/renderer_host/backing_store_gtk.h b/content/browser/renderer_host/backing_store_gtk.h index 5956188..281f8cf 100644 --- a/content/browser/renderer_host/backing_store_gtk.h +++ b/content/browser/renderer_host/backing_store_gtk.h @@ -28,14 +28,14 @@ class CONTENT_EXPORT BackingStoreGtk : public BackingStore { // Create a backing store on the X server. The visual is an Xlib Visual // describing the format of the target window and the depth is the color // depth of the X window which will be drawn into. - BackingStoreGtk(RenderWidgetHost* widget, + BackingStoreGtk(content::RenderWidgetHost* widget, const gfx::Size& size, void* visual, int depth); // This is for unittesting only. An object constructed using this constructor // will silently ignore all paints - BackingStoreGtk(RenderWidgetHost* widget, const gfx::Size& size); + BackingStoreGtk(content::RenderWidgetHost* widget, const gfx::Size& size); virtual ~BackingStoreGtk(); diff --git a/content/browser/renderer_host/backing_store_mac.h b/content/browser/renderer_host/backing_store_mac.h index 4934444..90475d9 100644 --- a/content/browser/renderer_host/backing_store_mac.h +++ b/content/browser/renderer_host/backing_store_mac.h @@ -12,7 +12,7 @@ class BackingStoreMac : public BackingStore { public: - BackingStoreMac(RenderWidgetHost* widget, const gfx::Size& size); + BackingStoreMac(content::RenderWidgetHost* widget, const gfx::Size& size); virtual ~BackingStoreMac(); // A CGLayer that stores the contents of the backing store, cached in GPU diff --git a/content/browser/renderer_host/backing_store_mac.mm b/content/browser/renderer_host/backing_store_mac.mm index fa0b6f2..a7f46cf 100644 --- a/content/browser/renderer_host/backing_store_mac.mm +++ b/content/browser/renderer_host/backing_store_mac.mm @@ -26,7 +26,7 @@ // allows acclerated drawing into the layer and lets scrolling and such happen // all or mostly on the GPU, which is good for performance. -BackingStoreMac::BackingStoreMac(RenderWidgetHost* widget, +BackingStoreMac::BackingStoreMac(content::RenderWidgetHost* widget, const gfx::Size& size) : BackingStore(widget, size) { cg_layer_.reset(CreateCGLayer()); diff --git a/content/browser/renderer_host/backing_store_manager.cc b/content/browser/renderer_host/backing_store_manager.cc index 59cf785..62832e8 100644 --- a/content/browser/renderer_host/backing_store_manager.cc +++ b/content/browser/renderer_host/backing_store_manager.cc @@ -12,6 +12,8 @@ #include "content/browser/renderer_host/render_widget_host_impl.h" #include "content/public/common/content_switches.h" +using content::RenderWidgetHost; + namespace { // There are two separate caches, |large_cache| and |small_cache|. large_cache @@ -145,8 +147,8 @@ BackingStore* CreateBackingStore(RenderWidgetHost* host, } else { cache = small_cache; } - BackingStore* backing_store = - RenderWidgetHostImpl::From(host)->AllocBackingStore(backing_store_size); + BackingStore* backing_store = content::RenderWidgetHostImpl::From( + host)->AllocBackingStore(backing_store_size); if (backing_store) cache->Put(host, backing_store); return backing_store; diff --git a/content/browser/renderer_host/backing_store_manager.h b/content/browser/renderer_host/backing_store_manager.h index ba9e5b7..00f11e1 100644 --- a/content/browser/renderer_host/backing_store_manager.h +++ b/content/browser/renderer_host/backing_store_manager.h @@ -16,7 +16,10 @@ #include "ui/gfx/surface/transport_dib.h" class BackingStore; + +namespace content { class RenderWidgetHost; +} // This class manages backing stores in the browsr. Every RenderWidgetHost is // associated with a backing store which it requests from this class. The @@ -29,7 +32,7 @@ class BackingStoreManager { // backing_store_rect // The desired backing store dimensions. // Returns a pointer to the backing store on success, NULL on failure. - static BackingStore* GetBackingStore(RenderWidgetHost* host, + static BackingStore* GetBackingStore(content::RenderWidgetHost* host, const gfx::Size& desired_size); // Makes a backing store which is fully ready for consumption, i.e. the @@ -45,7 +48,7 @@ class BackingStoreManager { // Set if we need to send out a request to paint the view // to the renderer. static void PrepareBackingStore( - RenderWidgetHost* host, + content::RenderWidgetHost* host, const gfx::Size& backing_store_size, TransportDIB::Id bitmap, const gfx::Rect& bitmap_rect, @@ -56,10 +59,10 @@ class BackingStoreManager { // Returns a matching backing store for the host. // Returns NULL if we fail to find one. - static BackingStore* Lookup(RenderWidgetHost* host); + static BackingStore* Lookup(content::RenderWidgetHost* host); // Removes the backing store for the host. - static void RemoveBackingStore(RenderWidgetHost* host); + static void RemoveBackingStore(content::RenderWidgetHost* host); // Removes all backing stores. static void RemoveAllBackingStores(); diff --git a/content/browser/renderer_host/backing_store_skia.cc b/content/browser/renderer_host/backing_store_skia.cc index 300e4fe..cb76b7b 100644 --- a/content/browser/renderer_host/backing_store_skia.cc +++ b/content/browser/renderer_host/backing_store_skia.cc @@ -18,7 +18,7 @@ // Max height and width for layers static const int kMaxVideoLayerSize = 23170; -BackingStoreSkia::BackingStoreSkia(RenderWidgetHost* widget, +BackingStoreSkia::BackingStoreSkia(content::RenderWidgetHost* widget, const gfx::Size& size) : BackingStore(widget, size) { bitmap_.setConfig(SkBitmap::kARGB_8888_Config, size.width(), size.height()); diff --git a/content/browser/renderer_host/backing_store_skia.h b/content/browser/renderer_host/backing_store_skia.h index b713a84..beb110d 100644 --- a/content/browser/renderer_host/backing_store_skia.h +++ b/content/browser/renderer_host/backing_store_skia.h @@ -28,7 +28,7 @@ class RenderProcessHost; class BackingStoreSkia : public BackingStore { public: CONTENT_EXPORT BackingStoreSkia( - RenderWidgetHost* widget, + content::RenderWidgetHost* widget, const gfx::Size& size); virtual ~BackingStoreSkia(); diff --git a/content/browser/renderer_host/backing_store_win.cc b/content/browser/renderer_host/backing_store_win.cc index 0f1409a..45e402e 100644 --- a/content/browser/renderer_host/backing_store_win.cc +++ b/content/browser/renderer_host/backing_store_win.cc @@ -69,7 +69,7 @@ void CallStretchDIBits(HDC hdc, int dest_x, int dest_y, int dest_w, int dest_h, } // namespace -BackingStoreWin::BackingStoreWin(RenderWidgetHost* widget, +BackingStoreWin::BackingStoreWin(content::RenderWidgetHost* widget, const gfx::Size& size) : BackingStore(widget, size), backing_store_dib_(NULL), diff --git a/content/browser/renderer_host/backing_store_win.h b/content/browser/renderer_host/backing_store_win.h index 89c9cea..462740b 100644 --- a/content/browser/renderer_host/backing_store_win.h +++ b/content/browser/renderer_host/backing_store_win.h @@ -14,7 +14,7 @@ class BackingStoreWin : public BackingStore { public: - BackingStoreWin(RenderWidgetHost* widget, const gfx::Size& size); + BackingStoreWin(content::RenderWidgetHost* widget, const gfx::Size& size); virtual ~BackingStoreWin(); HDC hdc() { return hdc_; } diff --git a/content/browser/renderer_host/gtk_im_context_wrapper.cc b/content/browser/renderer_host/gtk_im_context_wrapper.cc index 63b89a6..e5a54c6 100644 --- a/content/browser/renderer_host/gtk_im_context_wrapper.cc +++ b/content/browser/renderer_host/gtk_im_context_wrapper.cc @@ -21,6 +21,8 @@ #include "ui/gfx/gtk_util.h" #include "ui/gfx/rect.h" +using content::RenderWidgetHostImpl; + namespace { // Copied from third_party/WebKit/Source/WebCore/page/EventHandler.cpp // diff --git a/content/browser/renderer_host/java/java_bridge_dispatcher_host.cc b/content/browser/renderer_host/java/java_bridge_dispatcher_host.cc index 02484f6..65cd52e 100644 --- a/content/browser/renderer_host/java/java_bridge_dispatcher_host.cc +++ b/content/browser/renderer_host/java/java_bridge_dispatcher_host.cc @@ -18,6 +18,7 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" using content::BrowserThread; +using content::RenderViewHost; namespace { class JavaBridgeThread : public base::Thread { diff --git a/content/browser/renderer_host/java/java_bridge_dispatcher_host.h b/content/browser/renderer_host/java/java_bridge_dispatcher_host.h index 1a34a0b..0757ceb 100644 --- a/content/browser/renderer_host/java/java_bridge_dispatcher_host.h +++ b/content/browser/renderer_host/java/java_bridge_dispatcher_host.h @@ -11,11 +11,14 @@ #include "content/public/browser/render_view_host_observer.h" class NPChannelBase; -class RenderViewHost; class RouteIDGenerator; struct NPObject; struct NPVariant_Param; +namespace content { +class RenderViewHost; +} + // This class handles injecting Java objects into a single RenderView. The Java // object itself lives in the browser process on a background thread, while a // proxy object is created in the renderer. An instance of this class exists @@ -25,7 +28,7 @@ class JavaBridgeDispatcherHost public content::RenderViewHostObserver { public: // We hold a weak pointer to the RenderViewhost. It must outlive this object. - JavaBridgeDispatcherHost(RenderViewHost* render_view_host); + JavaBridgeDispatcherHost(content::RenderViewHost* render_view_host); // Injects |object| into the main frame of the corresponding RenderView. A // proxy object is created in the renderer and when the main frame's window @@ -43,7 +46,7 @@ class JavaBridgeDispatcherHost // The IPC macros require this to be public. virtual bool Send(IPC::Message* msg) OVERRIDE; virtual void RenderViewHostDestroyed( - RenderViewHost* render_view_host) OVERRIDE; + content::RenderViewHost* render_view_host) OVERRIDE; private: friend class base::RefCountedThreadSafe<JavaBridgeDispatcherHost>; diff --git a/content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc b/content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc index 45bef2e..551d1c7 100644 --- a/content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc +++ b/content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc @@ -8,6 +8,8 @@ #include "content/browser/renderer_host/java/java_bridge_dispatcher_host.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" +using content::RenderViewHost; + JavaBridgeDispatcherHostManager::JavaBridgeDispatcherHostManager( content::WebContents* web_contents) : content::WebContentsObserver(web_contents) { diff --git a/content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.h b/content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.h index bc5139b..2dd2b6c 100644 --- a/content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.h +++ b/content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.h @@ -14,9 +14,12 @@ #include "content/public/browser/web_contents_observer.h" class JavaBridgeDispatcherHost; -class RenderViewHost; struct NPObject; +namespace content { +class RenderViewHost; +} + // This class handles injecting Java objects into all of the RenderViews // associated with a WebContents. It manages a set of JavaBridgeDispatcherHost // objects, one per RenderViewHost. @@ -32,13 +35,16 @@ class JavaBridgeDispatcherHostManager : public content::WebContentsObserver { void RemoveNamedObject(const string16& name); // content::WebContentsObserver overrides - virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; - virtual void RenderViewDeleted(RenderViewHost* render_view_host) OVERRIDE; + virtual void RenderViewCreated( + content::RenderViewHost* render_view_host) OVERRIDE; + virtual void RenderViewDeleted( + content::RenderViewHost* render_view_host) OVERRIDE; virtual void WebContentsDestroyed( content::WebContents* web_contents) OVERRIDE; private: - typedef std::map<RenderViewHost*, scoped_refptr<JavaBridgeDispatcherHost> > + typedef std::map<content::RenderViewHost*, + scoped_refptr<JavaBridgeDispatcherHost> > InstanceMap; InstanceMap instances_; typedef std::map<string16, NPObject*> ObjectMap; diff --git a/content/browser/renderer_host/pepper_message_filter.cc b/content/browser/renderer_host/pepper_message_filter.cc index e5b39f2..f17f73c 100644 --- a/content/browser/renderer_host/pepper_message_filter.cc +++ b/content/browser/renderer_host/pepper_message_filter.cc @@ -46,6 +46,7 @@ #endif // ENABLE_FLAPPER_HACKS using content::BrowserThread; +using content::RenderViewHostImpl; using ppapi::NetAddressPrivateImpl; namespace { diff --git a/content/browser/renderer_host/render_view_host_browsertest.cc b/content/browser/renderer_host/render_view_host_browsertest.cc index 02bea28..32199d1 100644 --- a/content/browser/renderer_host/render_view_host_browsertest.cc +++ b/content/browser/renderer_host/render_view_host_browsertest.cc @@ -17,6 +17,7 @@ #include "net/base/net_util.h" #include "net/test/test_server.h" +using content::RenderViewHostImpl; using content::WebContents; class RenderViewHostTest : public InProcessBrowserTest { diff --git a/content/browser/renderer_host/render_view_host_factory.cc b/content/browser/renderer_host/render_view_host_factory.cc index aa17de1..c9f307a 100644 --- a/content/browser/renderer_host/render_view_host_factory.cc +++ b/content/browser/renderer_host/render_view_host_factory.cc @@ -7,6 +7,8 @@ #include "base/logging.h" #include "content/browser/renderer_host/render_view_host_impl.h" +using content::RenderViewHost; +using content::RenderViewHostImpl; using content::SessionStorageNamespace; using content::SiteInstance; diff --git a/content/browser/renderer_host/render_view_host_factory.h b/content/browser/renderer_host/render_view_host_factory.h index ecd151e..fa33f07 100644 --- a/content/browser/renderer_host/render_view_host_factory.h +++ b/content/browser/renderer_host/render_view_host_factory.h @@ -9,9 +9,8 @@ #include "base/basictypes.h" #include "content/common/content_export.h" -class RenderViewHost; - namespace content { +class RenderViewHost; class RenderViewHostDelegate; class SessionStorageNamespace; class SiteInstance; @@ -25,7 +24,7 @@ class RenderViewHostFactory { // Creates a RenderViewHost using the currently registered factory, or the // default one if no factory is registered. Ownership of the returned // pointer will be passed to the caller. - static RenderViewHost* Create( + static content::RenderViewHost* Create( content::SiteInstance* instance, content::RenderViewHostDelegate* delegate, int routing_id, @@ -42,7 +41,7 @@ class RenderViewHostFactory { // You can derive from this class and specify an implementation for this // function to create a different kind of RenderViewHost for testing. - virtual RenderViewHost* CreateRenderViewHost( + virtual content::RenderViewHost* CreateRenderViewHost( content::SiteInstance* instance, content::RenderViewHostDelegate* delegate, int routing_id, diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc index faf2a96..5f88047 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc @@ -61,16 +61,6 @@ #include "webkit/glue/webdropdata.h" using base::TimeDelta; -using content::BrowserContext; -using content::BrowserMessageFilter; -using content::BrowserThread; -using content::DomOperationNotificationDetails; -using content::DOMStorageContext; -using content::HostZoomMap; -using content::RenderViewHostDelegate; -using content::SessionStorageNamespace; -using content::SiteInstance; -using content::UserMetricsAction; using WebKit::WebConsoleMessage; using WebKit::WebDragOperation; using WebKit::WebDragOperationNone; @@ -100,14 +90,15 @@ base::i18n::TextDirection WebTextDirectionToChromeTextDirection( } // namespace +namespace content { + /////////////////////////////////////////////////////////////////////////////// // RenderViewHost, public: // static RenderViewHost* RenderViewHost::FromID(int render_process_id, int render_view_id) { - content::RenderProcessHost* process = - content::RenderProcessHost::FromID(render_process_id); + RenderProcessHost* process = RenderProcessHost::FromID(render_process_id); if (!process) return NULL; RenderWidgetHost* widget = RenderWidgetHost::FromIPCChannelListener( @@ -1685,3 +1676,5 @@ void RenderViewHostImpl::SetSwappedOut(bool is_swapped_out) { void RenderViewHostImpl::ClearPowerSaveBlockers() { STLDeleteValues(&power_save_blockers_); } + +} // namespace content diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h index 256919b..75ea00a 100644 --- a/content/browser/renderer_host/render_view_host_impl.h +++ b/content/browser/renderer_host/render_view_host_impl.h @@ -45,11 +45,7 @@ class ListValue; } namespace content { -class RenderViewHostObserver; -struct FileChooserParams; -struct ContextMenuParams; -struct Referrer; -struct ShowDesktopNotificationHostMsgParams; +class TestRenderViewHost; } namespace ui { @@ -60,15 +56,23 @@ namespace webkit_glue { struct WebAccessibility; } +namespace content { + +class RenderViewHostObserver; +struct FileChooserParams; +struct ContextMenuParams; +struct Referrer; +struct ShowDesktopNotificationHostMsgParams; + // NotificationObserver used to listen for EXECUTE_JAVASCRIPT_RESULT // notifications. -class ExecuteNotificationObserver : public content::NotificationObserver { +class ExecuteNotificationObserver : public NotificationObserver { public: explicit ExecuteNotificationObserver(int id); virtual ~ExecuteNotificationObserver(); virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) OVERRIDE; + const NotificationSource& source, + const NotificationDetails& details) OVERRIDE; int id() const { return id_; } @@ -124,10 +128,10 @@ class CONTENT_EXPORT RenderViewHostImpl // spec) space. This is useful when restoring tabs, but most callers should // pass in NULL which will cause a new SessionStorageNamespace to be created. RenderViewHostImpl( - content::SiteInstance* instance, - content::RenderViewHostDelegate* delegate, + SiteInstance* instance, + RenderViewHostDelegate* delegate, int routing_id, - content::SessionStorageNamespace* session_storage_namespace); + SessionStorageNamespace* session_storage_namespace); virtual ~RenderViewHostImpl(); // RenderViewHost implementation. @@ -171,7 +175,7 @@ class CONTENT_EXPORT RenderViewHostImpl virtual void DisableAutoResize(const gfx::Size& new_size) OVERRIDE; virtual void EnablePreferredSizeMode() OVERRIDE; virtual void ExecuteCustomContextMenuCommand( - int action, const content::CustomContextMenuContext& context) OVERRIDE; + int action, const CustomContextMenuContext& context) OVERRIDE; virtual void ExecuteMediaPlayerActionAtLocation( const gfx::Point& location, const WebKit::WebMediaPlayerAction& action) OVERRIDE; @@ -188,32 +192,32 @@ class CONTENT_EXPORT RenderViewHostImpl virtual void ExitFullscreen() OVERRIDE; virtual void Find(int request_id, const string16& search_text, const WebKit::WebFindOptions& options) OVERRIDE; - virtual void StopFinding(content::StopFindAction action) OVERRIDE; + virtual void StopFinding(StopFindAction action) OVERRIDE; virtual void FirePageBeforeUnload(bool for_cross_site_transition) OVERRIDE; virtual void FilesSelectedInChooser(const std::vector<FilePath>& files, int permissions) OVERRIDE; - virtual content::RenderViewHostDelegate* GetDelegate() const OVERRIDE; + virtual RenderViewHostDelegate* GetDelegate() const OVERRIDE; virtual int GetEnabledBindings() const OVERRIDE; - virtual content::SessionStorageNamespace* + virtual SessionStorageNamespace* GetSessionStorageNamespace() OVERRIDE; - virtual content::SiteInstance* GetSiteInstance() const OVERRIDE; + virtual SiteInstance* GetSiteInstance() const OVERRIDE; virtual void InsertCSS(const string16& frame_xpath, const std::string& css) OVERRIDE; virtual bool IsRenderViewLive() const OVERRIDE; virtual void NotifyContextMenuClosed( - const content::CustomContextMenuContext& context) OVERRIDE; + const CustomContextMenuContext& context) OVERRIDE; virtual void NotifyMoveOrResizeStarted() OVERRIDE; virtual void ReloadFrame() OVERRIDE; virtual void SetAltErrorPageURL(const GURL& url) OVERRIDE; virtual void SetWebUIProperty(const std::string& name, const std::string& value) OVERRIDE; virtual void SetZoomLevel(double level) OVERRIDE; - virtual void Zoom(content::PageZoom zoom) OVERRIDE; + virtual void Zoom(PageZoom zoom) OVERRIDE; virtual void SyncRendererPrefs() OVERRIDE; virtual void ToggleSpeechInput() OVERRIDE; virtual void UpdateWebkitPreferences(const WebPreferences& prefs) OVERRIDE; - void set_delegate(content::RenderViewHostDelegate* d) { + void set_delegate(RenderViewHostDelegate* d) { CHECK(d); // http://crbug.com/82827 delegate_ = d; } @@ -390,12 +394,12 @@ class CONTENT_EXPORT RenderViewHostImpl // one or two places. Have the caller send the IPC message directly. protected: - friend class content::RenderViewHostObserver; + friend class RenderViewHostObserver; // Add and remove observers for filtering IPC messages. Clients must be sure // to remove the observer before they go away. - void AddObserver(content::RenderViewHostObserver* observer); - void RemoveObserver(content::RenderViewHostObserver* observer); + void AddObserver(RenderViewHostObserver* observer); + void RemoveObserver(RenderViewHostObserver* observer); // RenderWidgetHost protected overrides. virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, @@ -436,10 +440,10 @@ class CONTENT_EXPORT RenderViewHostImpl void OnMsgDidChangeLoadProgress(double load_progress); void OnMsgDocumentAvailableInMainFrame(); void OnMsgDocumentOnLoadCompletedInMainFrame(int32 page_id); - void OnMsgContextMenu(const content::ContextMenuParams& params); + void OnMsgContextMenu(const ContextMenuParams& params); void OnMsgToggleFullscreen(bool enter_fullscreen); void OnMsgOpenURL(const GURL& url, - const content::Referrer& referrer, + const Referrer& referrer, WindowOpenDisposition disposition, int64 source_frame_id); void OnMsgDidContentsPreferredSizeChange(const gfx::Size& new_size); @@ -490,9 +494,9 @@ class CONTENT_EXPORT RenderViewHostImpl void OnRequestDesktopNotificationPermission(const GURL& origin, int callback_id); void OnShowDesktopNotification( - const content::ShowDesktopNotificationHostMsgParams& params); + const ShowDesktopNotificationHostMsgParams& params); void OnCancelDesktopNotification(int notification_id); - void OnRunFileChooser(const content::FileChooserParams& params); + void OnRunFileChooser(const FileChooserParams& params); void OnWebUISend(const GURL& source_url, const std::string& name, const base::ListValue& args); void OnDomOperationResponse(const std::string& json_string, @@ -512,7 +516,7 @@ class CONTENT_EXPORT RenderViewHostImpl void ClearPowerSaveBlockers(); // Our delegate, which wants to know about changes in the RenderView. - content::RenderViewHostDelegate* delegate_; + RenderViewHostDelegate* delegate_; // The SiteInstance associated with this RenderViewHost. All pages drawn // in this RenderViewHost are part of this SiteInstance. Should not change @@ -598,7 +602,7 @@ class CONTENT_EXPORT RenderViewHostImpl PowerSaveBlockerMap power_save_blockers_; // A list of observers that filter messages. Weak references. - ObserverList<content::RenderViewHostObserver> observers_; + ObserverList<RenderViewHostObserver> observers_; DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); }; @@ -607,4 +611,6 @@ class CONTENT_EXPORT RenderViewHostImpl #pragma warning(pop) #endif +} // namespace content + #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ diff --git a/content/browser/renderer_host/render_view_host_manager_browsertest.cc b/content/browser/renderer_host/render_view_host_manager_browsertest.cc index ebe8aed..940f09b 100644 --- a/content/browser/renderer_host/render_view_host_manager_browsertest.cc +++ b/content/browser/renderer_host/render_view_host_manager_browsertest.cc @@ -21,6 +21,7 @@ #include "net/base/net_util.h" #include "net/test/test_server.h" +using content::RenderViewHost; using content::SiteInstance; class RenderViewHostManagerTest : public InProcessBrowserTest { diff --git a/content/browser/renderer_host/render_widget_helper.cc b/content/browser/renderer_host/render_widget_helper.cc index f230b9c..8ad0289 100644 --- a/content/browser/renderer_host/render_widget_helper.cc +++ b/content/browser/renderer_host/render_widget_helper.cc @@ -16,6 +16,7 @@ #include "content/public/browser/browser_thread.h" using content::BrowserThread; +using content::RenderViewHostImpl; // A helper used with DidReceiveUpdateMsg that we hold a pointer to in // pending_paints_. diff --git a/content/browser/renderer_host/render_widget_host_gtk.cc b/content/browser/renderer_host/render_widget_host_gtk.cc index b98eaa1..d7e6e73 100644 --- a/content/browser/renderer_host/render_widget_host_gtk.cc +++ b/content/browser/renderer_host/render_widget_host_gtk.cc @@ -6,6 +6,8 @@ #include "content/port/browser/render_widget_host_view_port.h" +using content::RenderWidgetHostImpl; + void RenderWidgetHostImpl::OnMsgCreatePluginContainer( gfx::PluginWindowHandle id) { // TODO(piman): view_ can only be NULL with delayed view creation in diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc index 27c6b18..492b23f 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -47,8 +47,6 @@ using base::Time; using base::TimeDelta; using base::TimeTicks; -using content::RenderWidgetHostViewPort; -using content::UserMetricsAction; using WebKit::WebGestureEvent; using WebKit::WebInputEvent; using WebKit::WebKeyboardEvent; @@ -56,6 +54,8 @@ using WebKit::WebMouseEvent; using WebKit::WebMouseWheelEvent; using WebKit::WebTextDirection; +namespace { + // How long to (synchronously) wait for the renderer to respond with a // PaintRect message, when our backing-store is invalid, before giving up and // returning a null or incorrectly sized backing-store from GetBackingStore. @@ -65,8 +65,6 @@ static const int kPaintMsgTimeoutMS = 40; // How long to wait before we consider a renderer hung. static const int kHungRendererDelayMs = 20000; -namespace { - // Returns |true| if the two wheel events should be coalesced. bool ShouldCoalesceMouseWheelEvents(const WebMouseWheelEvent& last_event, const WebMouseWheelEvent& new_event) { @@ -80,6 +78,8 @@ bool ShouldCoalesceMouseWheelEvents(const WebMouseWheelEvent& last_event, } // namespace +namespace content { + // static RenderWidgetHost* RenderWidgetHost::FromIPCChannelListener( IPC::Channel::Listener* listener) { @@ -107,7 +107,7 @@ size_t RenderWidgetHost::BackingStoreMemorySize() { /////////////////////////////////////////////////////////////////////////////// // RenderWidgetHostImpl -RenderWidgetHostImpl::RenderWidgetHostImpl(content::RenderProcessHost* process, +RenderWidgetHostImpl::RenderWidgetHostImpl(RenderProcessHost* process, int routing_id) : view_(NULL), renderer_initialized_(false), @@ -189,7 +189,7 @@ RenderWidgetHostImpl* RenderWidgetHostImpl::From(RenderWidgetHost* rwh) { return rwh->AsRenderWidgetHostImpl(); } -void RenderWidgetHostImpl::SetView(content::RenderWidgetHostView* view) { +void RenderWidgetHostImpl::SetView(RenderWidgetHostView* view) { view_ = RenderWidgetHostViewPort::FromRWHV(view); if (!view_) { @@ -198,7 +198,7 @@ void RenderWidgetHostImpl::SetView(content::RenderWidgetHostView* view) { } } -content::RenderProcessHost* RenderWidgetHostImpl::GetProcess() const { +RenderProcessHost* RenderWidgetHostImpl::GetProcess() const { return process_; } @@ -206,7 +206,7 @@ int RenderWidgetHostImpl::GetRoutingID() const { return routing_id_; } -content::RenderWidgetHostView* RenderWidgetHostImpl::GetView() const { +RenderWidgetHostView* RenderWidgetHostImpl::GetView() const { return view_; } @@ -323,7 +323,7 @@ bool RenderWidgetHostImpl::OnMessageReceived(const IPC::Message &msg) { if (!msg_is_ok) { // The message de-serialization failed. Kill the renderer process. - content::RecordAction(UserMetricsAction("BadMessageTerminate_RWH")); + RecordAction(UserMetricsAction("BadMessageTerminate_RWH")); GetProcess()->ReceivedBadMessage(); } return handled; @@ -347,10 +347,10 @@ void RenderWidgetHostImpl::WasHidden() { process_->WidgetHidden(); bool is_visible = false; - content::NotificationService::current()->Notify( - content::NOTIFICATION_RENDER_WIDGET_VISIBILITY_CHANGED, - content::Source<RenderWidgetHost>(this), - content::Details<bool>(&is_visible)); + NotificationService::current()->Notify( + NOTIFICATION_RENDER_WIDGET_VISIBILITY_CHANGED, + Source<RenderWidgetHost>(this), + Details<bool>(&is_visible)); } void RenderWidgetHostImpl::WasRestored() { @@ -377,10 +377,10 @@ void RenderWidgetHostImpl::WasRestored() { process_->WidgetRestored(); bool is_visible = true; - content::NotificationService::current()->Notify( - content::NOTIFICATION_RENDER_WIDGET_VISIBILITY_CHANGED, - content::Source<RenderWidgetHost>(this), - content::Details<bool>(&is_visible)); + NotificationService::current()->Notify( + NOTIFICATION_RENDER_WIDGET_VISIBILITY_CHANGED, + Source<RenderWidgetHost>(this), + Details<bool>(&is_visible)); // It's possible for our size to be out of sync with the renderer. The // following is one case that leads to this: @@ -981,10 +981,10 @@ void RenderWidgetHostImpl::SetShouldAutoResize(bool enable) { } void RenderWidgetHostImpl::Destroy() { - content::NotificationService::current()->Notify( - content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, - content::Source<RenderWidgetHost>(this), - content::NotificationService::NoDetails()); + NotificationService::current()->Notify( + NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, + Source<RenderWidgetHost>(this), + NotificationService::NoDetails()); // Tell the view to die. // Note that in the process of the view shutting down, it can call a ton @@ -1009,10 +1009,10 @@ void RenderWidgetHostImpl::CheckRendererIsUnresponsive() { } // OK, looks like we have a hung renderer! - content::NotificationService::current()->Notify( - content::NOTIFICATION_RENDERER_PROCESS_HANG, - content::Source<RenderWidgetHost>(this), - content::NotificationService::NoDetails()); + NotificationService::current()->Notify( + NOTIFICATION_RENDERER_PROCESS_HANG, + Source<RenderWidgetHost>(this), + NotificationService::NoDetails()); is_unresponsive_ = true; NotifyRendererUnresponsive(); } @@ -1082,10 +1082,10 @@ void RenderWidgetHostImpl::OnMsgRequestMove(const gfx::Rect& pos) { void RenderWidgetHostImpl::OnMsgPaintAtSizeAck(int tag, const gfx::Size& size) { PaintAtSizeAckDetails details = {tag, size}; gfx::Size size_details = size; - content::NotificationService::current()->Notify( - content::NOTIFICATION_RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK, - content::Source<RenderWidgetHost>(this), - content::Details<PaintAtSizeAckDetails>(&details)); + NotificationService::current()->Notify( + NOTIFICATION_RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK, + Source<RenderWidgetHost>(this), + Details<PaintAtSizeAckDetails>(&details)); } void RenderWidgetHostImpl::OnMsgUpdateRect( @@ -1131,8 +1131,7 @@ void RenderWidgetHostImpl::OnMsgUpdateRect( if (dib) { if (dib->size() < size) { DLOG(WARNING) << "Transport DIB too small for given rectangle"; - content::RecordAction( - UserMetricsAction("BadMessageTerminate_RWH1")); + RecordAction(UserMetricsAction("BadMessageTerminate_RWH1")); GetProcess()->ReceivedBadMessage(); } else { UNSHIPPED_TRACE_EVENT_INSTANT2("test_latency", "UpdateRect", @@ -1217,10 +1216,10 @@ void RenderWidgetHostImpl::DidUpdateBackingStore( view_being_painted_ = false; } - content::NotificationService::current()->Notify( - content::NOTIFICATION_RENDER_WIDGET_HOST_DID_PAINT, - content::Source<RenderWidgetHost>(this), - content::NotificationService::NoDetails()); + NotificationService::current()->Notify( + NOTIFICATION_RENDER_WIDGET_HOST_DID_PAINT, + Source<RenderWidgetHost>(this), + NotificationService::NoDetails()); // If we got a resize ack, then perhaps we have another resize to send? bool is_resize_ack = @@ -1261,7 +1260,7 @@ void RenderWidgetHostImpl::OnMsgInputEventAck(WebInputEvent::Type event_type, int type = static_cast<int>(event_type); if (type < WebInputEvent::Undefined) { - content::RecordAction(UserMetricsAction("BadMessageTerminate_RWH2")); + RecordAction(UserMetricsAction("BadMessageTerminate_RWH2")); process_->ReceivedBadMessage(); } else if (type == WebInputEvent::MouseMove) { mouse_move_pending_ = false; @@ -1281,15 +1280,15 @@ void RenderWidgetHostImpl::OnMsgInputEventAck(WebInputEvent::Type event_type, // This is used only for testing, and the other end does not use the // source object. On linux, specifying - // content::Source<RenderWidgetHost> results in a very strange + // Source<RenderWidgetHost> results in a very strange // runtime error in the epilogue of the enclosing // (OnMsgInputEventAck) method, but not on other platforms; using - // 'void' instead is just as safe (since content::NotificationSource + // 'void' instead is just as safe (since NotificationSource // is not actually typesafe) and avoids this error. - content::NotificationService::current()->Notify( - content::NOTIFICATION_RENDER_WIDGET_HOST_DID_RECEIVE_INPUT_EVENT_ACK, - content::Source<void>(this), - content::Details<int>(&type)); + NotificationService::current()->Notify( + NOTIFICATION_RENDER_WIDGET_HOST_DID_RECEIVE_INPUT_EVENT_ACK, + Source<void>(this), + Details<int>(&type)); } void RenderWidgetHostImpl::ProcessWheelAck(bool processed) { @@ -1315,13 +1314,13 @@ void RenderWidgetHostImpl::ProcessTouchAck( void RenderWidgetHostImpl::OnMsgFocus() { // Only RenderViewHost can deal with that message. - content::RecordAction(UserMetricsAction("BadMessageTerminate_RWH4")); + RecordAction(UserMetricsAction("BadMessageTerminate_RWH4")); GetProcess()->ReceivedBadMessage(); } void RenderWidgetHostImpl::OnMsgBlur() { // Only RenderViewHost can deal with that message. - content::RecordAction(UserMetricsAction("BadMessageTerminate_RWH5")); + RecordAction(UserMetricsAction("BadMessageTerminate_RWH5")); GetProcess()->ReceivedBadMessage(); } @@ -1587,50 +1586,50 @@ void RenderWidgetHostImpl::SelectRange(const gfx::Point& start, void RenderWidgetHostImpl::Undo() { Send(new ViewMsg_Undo(GetRoutingID())); - content::RecordAction(UserMetricsAction("Undo")); + RecordAction(UserMetricsAction("Undo")); } void RenderWidgetHostImpl::Redo() { Send(new ViewMsg_Redo(GetRoutingID())); - content::RecordAction(UserMetricsAction("Redo")); + RecordAction(UserMetricsAction("Redo")); } void RenderWidgetHostImpl::Cut() { Send(new ViewMsg_Cut(GetRoutingID())); - content::RecordAction(UserMetricsAction("Cut")); + RecordAction(UserMetricsAction("Cut")); } void RenderWidgetHostImpl::Copy() { Send(new ViewMsg_Copy(GetRoutingID())); - content::RecordAction(UserMetricsAction("Copy")); + RecordAction(UserMetricsAction("Copy")); } void RenderWidgetHostImpl::CopyToFindPboard() { #if defined(OS_MACOSX) // Windows/Linux don't have the concept of a find pasteboard. Send(new ViewMsg_CopyToFindPboard(GetRoutingID())); - content::RecordAction(UserMetricsAction("CopyToFindPboard")); + RecordAction(UserMetricsAction("CopyToFindPboard")); #endif } void RenderWidgetHostImpl::Paste() { Send(new ViewMsg_Paste(GetRoutingID())); - content::RecordAction(UserMetricsAction("Paste")); + RecordAction(UserMetricsAction("Paste")); } void RenderWidgetHostImpl::PasteAndMatchStyle() { Send(new ViewMsg_PasteAndMatchStyle(GetRoutingID())); - content::RecordAction(UserMetricsAction("PasteAndMatchStyle")); + RecordAction(UserMetricsAction("PasteAndMatchStyle")); } void RenderWidgetHostImpl::Delete() { Send(new ViewMsg_Delete(GetRoutingID())); - content::RecordAction(UserMetricsAction("DeleteSelection")); + RecordAction(UserMetricsAction("DeleteSelection")); } void RenderWidgetHostImpl::SelectAll() { Send(new ViewMsg_SelectAll(GetRoutingID())); - content::RecordAction(UserMetricsAction("SelectAll")); + RecordAction(UserMetricsAction("SelectAll")); } bool RenderWidgetHostImpl::GotResponseToLockMouseRequest(bool allowed) { if (!allowed) { @@ -1669,3 +1668,5 @@ void RenderWidgetHostImpl::AcknowledgePostSubBuffer(int32 route_id, if (ui_shim) ui_shim->Send(new AcceleratedSurfaceMsg_PostSubBufferACK(route_id)); } + +} // namespace content diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h index b8543e3..cf7e415 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h @@ -25,18 +25,15 @@ #include "ui/gfx/native_widget_types.h" class BackingStore; +class MockRenderWidgetHost; +class WebCursor; struct EditCommand; struct ViewHostMsg_UpdateRect_Params; -class WebCursor; namespace base { class TimeTicks; } -namespace content { -class RenderWidgetHostViewPort; -} - namespace ui { class Range; } @@ -48,16 +45,18 @@ struct WebCompositionUnderline; struct WebScreenInfo; } +namespace content { + +class RenderWidgetHostViewPort; + // This implements the RenderWidgetHost interface that is exposed to // embedders of content, and adds things only visible to content. -// -// TODO(joi): Move to content namespace. class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, public IPC::Channel::Listener { public: // routing_id can be MSG_ROUTING_NONE, in which case the next available // routing id is taken from the RenderProcessHost. - RenderWidgetHostImpl(content::RenderProcessHost* process, int routing_id); + RenderWidgetHostImpl(RenderProcessHost* process, int routing_id); virtual ~RenderWidgetHostImpl(); // Use RenderWidgetHostImpl::From(rwh) to downcast a @@ -95,9 +94,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, virtual void ForwardKeyboardEvent( const NativeWebKeyboardEvent& key_event) OVERRIDE; virtual const gfx::Point& GetLastScrollOffset() const OVERRIDE; - virtual content::RenderProcessHost* GetProcess() const OVERRIDE; + virtual RenderProcessHost* GetProcess() const OVERRIDE; virtual int GetRoutingID() const OVERRIDE; - virtual content::RenderWidgetHostView* GetView() const OVERRIDE; + virtual RenderWidgetHostView* GetView() const OVERRIDE; virtual bool IsRenderView() const OVERRIDE; virtual void PaintAtSize(TransportDIB::Handle dib_handle, int tag, @@ -114,7 +113,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, virtual void RemoveKeyboardListener(KeyboardListener* listener) OVERRIDE; // Sets the View of this RenderWidgetHost. - void SetView(content::RenderWidgetHostView* view); + void SetView(RenderWidgetHostView* view); int surface_id() const { return surface_id_; } bool renderer_accessible() { return renderer_accessible_; } @@ -414,7 +413,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, // crashes, its View is destroyed and this pointer becomes NULL, even though // render_view_host_ lives on to load another URL (creating a new View while // doing so). - content::RenderWidgetHostViewPort* view_; + RenderWidgetHostViewPort* view_; // true if a renderer has once been valid. We use this flag to display a sad // tab only when we lose our renderer and not if a paint occurs during @@ -425,10 +424,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, int hung_renderer_delay_ms_; private: - FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostTest, Resize); - FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostTest, ResizeThenCrash); - FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostTest, HiddenPaint); - FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostTest, PaintAtSize); + friend class ::MockRenderWidgetHost; // Tell this object to destroy itself. void Destroy(); @@ -534,7 +530,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, // Created during construction but initialized during Init*(). Therefore, it // is guaranteed never to be NULL, but its channel may be NULL if the // renderer crashed, so you must always check that. - content::RenderProcessHost* process_; + RenderProcessHost* process_; // The ID of the corresponding object in the Renderer Instance. int routing_id_; @@ -690,4 +686,6 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); }; +} // namespace content + #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ diff --git a/content/browser/renderer_host/render_widget_host_mac.cc b/content/browser/renderer_host/render_widget_host_mac.cc index 47768af..7ecbb93 100644 --- a/content/browser/renderer_host/render_widget_host_mac.cc +++ b/content/browser/renderer_host/render_widget_host_mac.cc @@ -6,6 +6,8 @@ #include "content/common/gpu/gpu_messages.h" #include "content/port/browser/render_widget_host_view_port.h" +using content::RenderWidgetHostImpl; + void RenderWidgetHostImpl::OnMsgPluginFocusChanged(bool focused, int plugin_id) { if (view_) diff --git a/content/browser/renderer_host/render_widget_host_unittest.cc b/content/browser/renderer_host/render_widget_host_unittest.cc index b8665e4d..04b97ac 100644 --- a/content/browser/renderer_host/render_widget_host_unittest.cc +++ b/content/browser/renderer_host/render_widget_host_unittest.cc @@ -27,9 +27,9 @@ using base::TimeDelta; using content::BrowserThread; - using content::BrowserThreadImpl; - +using content::RenderWidgetHost; +using content::RenderWidgetHostImpl; using WebKit::WebInputEvent; using WebKit::WebMouseWheelEvent; @@ -158,6 +158,14 @@ class MockRenderWidgetHost : public RenderWidgetHostImpl { unresponsive_timer_fired_(false) { } + // Allow poking at a few private members. + using RenderWidgetHostImpl::OnMsgPaintAtSizeAck; + using RenderWidgetHostImpl::OnMsgUpdateRect; + using RenderWidgetHostImpl::RendererExited; + using RenderWidgetHostImpl::in_flight_size_; + using RenderWidgetHostImpl::is_hidden_; + using RenderWidgetHostImpl::resize_ack_pending_; + // Tests that make sure we ignore keyboard event acknowledgments to events we // didn't send work by making sure we didn't call UnhandledKeyboardEvent(). bool unhandled_keyboard_event_called() const { diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc index 8a0e104..e1443cd 100644 --- a/content/browser/renderer_host/render_widget_host_view_android.cc +++ b/content/browser/renderer_host/render_widget_host_view_android.cc @@ -19,7 +19,7 @@ void content::RenderWidgetHostViewPort::GetDefaultScreenInfo( // static content::RenderWidgetHostView* content::RenderWidgetHostView::CreateViewForWidget( - RenderWidgetHost* widget) { + content::RenderWidgetHost* widget) { NOTIMPLEMENTED(); return NULL; } diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc index 16c537b..e046ae0 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -34,6 +34,8 @@ #include "ui/gfx/screen.h" #include "ui/gfx/skia_util.h" +using content::RenderWidgetHost; +using content::RenderWidgetHostImpl; using content::RenderWidgetHostView; using WebKit::WebTouchEvent; diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h index f6b878c..6b248c4 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.h +++ b/content/browser/renderer_host/render_widget_host_view_aura.h @@ -20,6 +20,7 @@ #include "webkit/glue/webcursor.h" namespace content { +class RenderWidgetHostImpl; class RenderWidgetHostView; } @@ -35,7 +36,6 @@ namespace WebKit { class WebTouchEvent; } -class RenderWidgetHostImpl; class ImageTransportClient; class RenderWidgetHostViewAura @@ -49,7 +49,7 @@ class RenderWidgetHostViewAura // RenderWidgetHostView implementation. virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE; - virtual RenderWidgetHost* GetRenderWidgetHost() const OVERRIDE; + virtual content::RenderWidgetHost* GetRenderWidgetHost() const OVERRIDE; virtual void SetSize(const gfx::Size& size) OVERRIDE; virtual void SetBounds(const gfx::Rect& rect) OVERRIDE; virtual gfx::NativeView GetNativeView() const OVERRIDE; @@ -166,7 +166,7 @@ class RenderWidgetHostViewAura friend class content::RenderWidgetHostView; // Should construct only via RenderWidgetHostView::CreateViewForWidget. - explicit RenderWidgetHostViewAura(RenderWidgetHost* host); + explicit RenderWidgetHostViewAura(content::RenderWidgetHost* host); private: class WindowObserver; @@ -201,7 +201,7 @@ class RenderWidgetHostViewAura ui::Compositor* GetCompositor(); // The model object. - RenderWidgetHostImpl* host_; + content::RenderWidgetHostImpl* host_; aura::Window* window_; diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc index c68f513..0de5cea 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.cc +++ b/content/browser/renderer_host/render_widget_host_view_base.cc @@ -26,7 +26,7 @@ RenderWidgetHostViewPort* RenderWidgetHostViewPort::FromRWHV( // static RenderWidgetHostViewPort* RenderWidgetHostViewPort::CreateViewForWidget( - RenderWidgetHost* widget) { + content::RenderWidgetHost* widget) { return FromRWHV(RenderWidgetHostView::CreateViewForWidget(widget)); } diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h index 4038787..31aa2229 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.h +++ b/content/browser/renderer_host/render_widget_host_view_base.h @@ -23,10 +23,10 @@ #include "content/port/browser/render_widget_host_view_port.h" #include "ui/base/range/range.h" -class RenderWidgetHostImpl; - namespace content { +class RenderWidgetHostImpl; + // Basic implementation shared by concrete RenderWidgetHostView // subclasses. // diff --git a/content/browser/renderer_host/render_widget_host_view_gtk.cc b/content/browser/renderer_host/render_widget_host_view_gtk.cc index 84efe9a..a2cf64e 100644 --- a/content/browser/renderer_host/render_widget_host_view_gtk.cc +++ b/content/browser/renderer_host/render_widget_host_view_gtk.cc @@ -103,6 +103,7 @@ bool MovedToCenter(const WebKit::WebMouseEvent& mouse_event, } // namespace +using content::RenderWidgetHostImpl; using content::RenderWidgetHostView; using content::RenderWidgetHostViewPort; using WebKit::WebInputEventFactory; @@ -574,7 +575,8 @@ class RenderWidgetHostViewGtkWidget { DISALLOW_IMPLICIT_CONSTRUCTORS(RenderWidgetHostViewGtkWidget); }; -RenderWidgetHostViewGtk::RenderWidgetHostViewGtk(RenderWidgetHost* widget_host) +RenderWidgetHostViewGtk::RenderWidgetHostViewGtk( + content::RenderWidgetHost* widget_host) : host_(RenderWidgetHostImpl::From(widget_host)), about_to_validate_and_paint_(false), is_hidden_(false), @@ -674,7 +676,8 @@ void RenderWidgetHostViewGtk::InitAsFullscreen( DoPopupOrFullscreenInit(window, bounds); } -RenderWidgetHost* RenderWidgetHostViewGtk::GetRenderWidgetHost() const { +content::RenderWidgetHost* +RenderWidgetHostViewGtk::GetRenderWidgetHost() const { return host_; } @@ -1419,7 +1422,7 @@ void RenderWidgetHostViewGtk::ModifyEventMovementAndCoords( // static RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget( - RenderWidgetHost* widget) { + content::RenderWidgetHost* widget) { return new RenderWidgetHostViewGtk(widget); } diff --git a/content/browser/renderer_host/render_widget_host_view_gtk.h b/content/browser/renderer_host/render_widget_host_view_gtk.h index 34fce7c..5b60ec3 100644 --- a/content/browser/renderer_host/render_widget_host_view_gtk.h +++ b/content/browser/renderer_host/render_widget_host_view_gtk.h @@ -26,11 +26,14 @@ #include "webkit/glue/webcursor.h" #include "webkit/plugins/npapi/gtk_plugin_container_manager.h" -class RenderWidgetHost; -class RenderWidgetHostImpl; class GtkIMContextWrapper; struct NativeWebKeyboardEvent; +namespace content { +class RenderWidgetHost; +class RenderWidgetHostImpl; +} + #if defined(OS_CHROMEOS) namespace ui { class TooltipWindowGtk; @@ -51,7 +54,7 @@ class RenderWidgetHostViewGtk : public content::RenderWidgetHostViewBase { // RenderWidgetHostView implementation. virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE; - virtual RenderWidgetHost* GetRenderWidgetHost() const OVERRIDE; + virtual content::RenderWidgetHost* GetRenderWidgetHost() const OVERRIDE; virtual void SetSize(const gfx::Size& size) OVERRIDE; virtual void SetBounds(const gfx::Rect& rect) OVERRIDE; virtual gfx::NativeView GetNativeView() const OVERRIDE; @@ -92,7 +95,7 @@ class RenderWidgetHostViewGtk : public content::RenderWidgetHostViewBase { virtual void RenderViewGone(base::TerminationStatus status, int error_code) OVERRIDE; virtual void Destroy() OVERRIDE; - virtual void WillDestroyRenderWidget(RenderWidgetHost* rwh) {} + virtual void WillDestroyRenderWidget(content::RenderWidgetHost* rwh) {} virtual void SetTooltipText(const string16& tooltip_text) OVERRIDE; virtual void SelectionChanged(const string16& text, size_t offset, @@ -149,7 +152,7 @@ class RenderWidgetHostViewGtk : public content::RenderWidgetHostViewBase { friend class content::RenderWidgetHostView; // Should construct only via RenderWidgetHostView::CreateViewForWidget. - explicit RenderWidgetHostViewGtk(RenderWidgetHost* widget); + explicit RenderWidgetHostViewGtk(content::RenderWidgetHost* widget); private: friend class RenderWidgetHostViewGtkWidget; @@ -186,7 +189,7 @@ class RenderWidgetHostViewGtk : public content::RenderWidgetHostViewBase { gfx::Point GetWidgetCenter(); // The model object. - RenderWidgetHostImpl* host_; + content::RenderWidgetHostImpl* host_; // The native UI widget. ui::OwnedWidgetGtk view_; diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h index 8878ade..c273ce7 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.h +++ b/content/browser/renderer_host/render_widget_host_view_mac.h @@ -21,12 +21,15 @@ #include "webkit/glue/webcursor.h" @class AcceleratedPluginView; -class RenderWidgetHostImpl; class RenderWidgetHostViewMac; @protocol RenderWidgetHostViewMacDelegate; class RenderWidgetHostViewMacEditCommandHelper; @class ToolTip; +namespace content { +class RenderWidgetHostImpl; +} + @protocol RenderWidgetHostViewMacOwner - (RenderWidgetHostViewMac*)renderWidgetHostViewMac; @end @@ -169,7 +172,7 @@ class RenderWidgetHostViewMac : public content::RenderWidgetHostViewBase { // RenderWidgetHostView implementation. virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE; - virtual RenderWidgetHost* GetRenderWidgetHost() const OVERRIDE; + virtual content::RenderWidgetHost* GetRenderWidgetHost() const OVERRIDE; virtual void SetSize(const gfx::Size& size) OVERRIDE; virtual void SetBounds(const gfx::Rect& rect) OVERRIDE; virtual gfx::NativeView GetNativeView() const OVERRIDE; @@ -310,7 +313,7 @@ class RenderWidgetHostViewMac : public content::RenderWidgetHostViewBase { // The associated Model. Can be NULL if Destroy() is called when // someone (other than superview) has retained |cocoa_view_|. - RenderWidgetHostImpl* render_widget_host_; + content::RenderWidgetHostImpl* render_widget_host_; // This is true when we are currently painting and thus should handle extra // paint requests by expanding the invalid rect rather than actually painting. @@ -354,7 +357,7 @@ class RenderWidgetHostViewMac : public content::RenderWidgetHostViewBase { // The view will associate itself with the given widget. The native view must // be hooked up immediately to the view hierarchy, or else when it is // deleted it will delete this out from under the caller. - explicit RenderWidgetHostViewMac(RenderWidgetHost* widget); + explicit RenderWidgetHostViewMac(content::RenderWidgetHost* widget); // If the window is at the root of the plugin container hierachy, // we need to update the geometry manually. diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm index e7bc839..2f1e2da 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -50,6 +50,9 @@ #include "webkit/plugins/npapi/webplugin.h" using content::BrowserThread; +using content::RenderViewHostImpl; +using content::RenderWidgetHost; +using content::RenderWidgetHostImpl; using content::RenderWidgetHostView; using WebKit::WebInputEvent; using WebKit::WebInputEventFactory; diff --git a/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper.mm b/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper.mm index 5c501aa..950810f 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper.mm @@ -9,6 +9,8 @@ #include "content/browser/renderer_host/render_widget_host_impl.h" #import "content/browser/renderer_host/render_widget_host_view_mac.h" +using content::RenderWidgetHostImpl; + namespace { // The names of all the objc selectors w/o ':'s added to an object by // AddEditingSelectorsToClass(). diff --git a/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm b/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm index caa00d8..39b5c47 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm @@ -15,6 +15,8 @@ #include "testing/gtest/include/gtest/gtest.h" #include "testing/platform_test.h" +using content::RenderWidgetHostImpl; + class RenderWidgetHostViewMacEditCommandHelperTest : public PlatformTest { }; diff --git a/content/browser/renderer_host/render_widget_host_view_win.cc b/content/browser/renderer_host/render_widget_host_view_win.cc index a02de08..9f598b7 100644 --- a/content/browser/renderer_host/render_widget_host_view_win.cc +++ b/content/browser/renderer_host/render_widget_host_view_win.cc @@ -66,6 +66,8 @@ using base::TimeDelta; using base::TimeTicks; using content::BrowserThread; +using content::RenderWidgetHost; +using content::RenderWidgetHostImpl; using content::RenderWidgetHostView; using ui::ViewProp; using WebKit::WebInputEvent; diff --git a/content/browser/renderer_host/render_widget_host_view_win.h b/content/browser/renderer_host/render_widget_host_view_win.h index da7f611..670c9f4d 100644 --- a/content/browser/renderer_host/render_widget_host_view_win.h +++ b/content/browser/renderer_host/render_widget_host_view_win.h @@ -31,9 +31,12 @@ #include "webkit/glue/webcursor.h" class BackingStore; -class RenderWidgetHost; class SkRegion; +namespace content { +class RenderWidgetHost; +} + namespace gfx { class Size; class Rect; @@ -152,7 +155,7 @@ class RenderWidgetHostViewWin // RenderWidgetHostView implementation. virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE; - virtual RenderWidgetHost* GetRenderWidgetHost() const OVERRIDE; + virtual content::RenderWidgetHost* GetRenderWidgetHost() const OVERRIDE; virtual void SetSize(const gfx::Size& size) OVERRIDE; virtual void SetBounds(const gfx::Rect& rect) OVERRIDE; virtual gfx::NativeView GetNativeView() const OVERRIDE; @@ -239,7 +242,7 @@ class RenderWidgetHostViewWin // Should construct only via RenderWidgetHostView::CreateViewForWidget. // // The view will associate itself with the given widget. - explicit RenderWidgetHostViewWin(RenderWidgetHost* widget); + explicit RenderWidgetHostViewWin(content::RenderWidgetHost* widget); // Windows Message Handlers LRESULT OnCreate(CREATESTRUCT* create_struct); @@ -382,7 +385,7 @@ class RenderWidgetHostViewWin // The associated Model. While |this| is being Destroyed, // |render_widget_host_| is NULL and the Windows message loop is run one last // time. Message handlers must check for a NULL |render_widget_host_|. - RenderWidgetHostImpl* render_widget_host_; + content::RenderWidgetHostImpl* render_widget_host_; // When we are doing accelerated compositing HWND compositor_host_window_; diff --git a/content/browser/renderer_host/resource_dispatcher_host.cc b/content/browser/renderer_host/resource_dispatcher_host.cc index af94ed1..1f99041 100644 --- a/content/browser/renderer_host/resource_dispatcher_host.cc +++ b/content/browser/renderer_host/resource_dispatcher_host.cc @@ -89,6 +89,7 @@ using base::TimeDelta; using base::TimeTicks; using content::BrowserThread; using content::GlobalRequestID; +using content::RenderViewHostImpl; using content::ResourceContext; using content::ResourceResponse; using content::ResourceThrottle; diff --git a/content/browser/renderer_host/resource_dispatcher_host_browsertest.cc b/content/browser/renderer_host/resource_dispatcher_host_browsertest.cc index 74e4546..ad2b192 100644 --- a/content/browser/renderer_host/resource_dispatcher_host_browsertest.cc +++ b/content/browser/renderer_host/resource_dispatcher_host_browsertest.cc @@ -19,7 +19,7 @@ class ResourceDispatcherHostBrowserTest : public InProcessBrowserTest { } protected: - RenderViewHost* render_view_host() { + content::RenderViewHost* render_view_host() { return browser()->GetSelectedWebContents()->GetRenderViewHost(); } diff --git a/content/browser/renderer_host/test_backing_store.cc b/content/browser/renderer_host/test_backing_store.cc index 4f14eb9..87c7043 100644 --- a/content/browser/renderer_host/test_backing_store.cc +++ b/content/browser/renderer_host/test_backing_store.cc @@ -4,7 +4,7 @@ #include "content/browser/renderer_host/test_backing_store.h" -TestBackingStore::TestBackingStore(RenderWidgetHost* widget, +TestBackingStore::TestBackingStore(content::RenderWidgetHost* widget, const gfx::Size& size) : BackingStore(widget, size) { } diff --git a/content/browser/renderer_host/test_backing_store.h b/content/browser/renderer_host/test_backing_store.h index d3bfa64..bd03772 100644 --- a/content/browser/renderer_host/test_backing_store.h +++ b/content/browser/renderer_host/test_backing_store.h @@ -12,7 +12,7 @@ class TestBackingStore : public BackingStore { public: - TestBackingStore(RenderWidgetHost* widget, const gfx::Size& size); + TestBackingStore(content::RenderWidgetHost* widget, const gfx::Size& size); virtual ~TestBackingStore(); // BackingStore implementation. diff --git a/content/browser/renderer_host/test_render_view_host.cc b/content/browser/renderer_host/test_render_view_host.cc index d56b8a0..2b98c57 100644 --- a/content/browser/renderer_host/test_render_view_host.cc +++ b/content/browser/renderer_host/test_render_view_host.cc @@ -27,17 +27,21 @@ using content::NavigationController; using content::NavigationEntry; using content::RenderViewHostDelegate; +using content::RenderWidgetHost; using content::SessionStorageNamespace; using content::SiteInstance; +using content::TestRenderViewHost; using webkit::forms::PasswordForm; +namespace content { + void InitNavigateParams(ViewHostMsg_FrameNavigate_Params* params, int page_id, const GURL& url, - content::PageTransition transition) { + PageTransition transition) { params->page_id = page_id; params->url = url; - params->referrer = content::Referrer(); + params->referrer = Referrer(); params->transition = transition; params->redirects = std::vector<GURL>(); params->should_update_history = false; @@ -52,7 +56,7 @@ void InitNavigateParams(ViewHostMsg_FrameNavigate_Params* params, } TestRenderViewHost* TestRenderViewHost::GetPendingForController( - content::NavigationController* controller) { + NavigationController* controller) { TabContents* tab_contents = static_cast<TabContents*>( controller->GetWebContents()); return static_cast<TestRenderViewHost*>( @@ -73,7 +77,7 @@ TestRenderViewHost::TestRenderViewHost(SiteInstance* instance, // For normal RenderViewHosts, this is freed when |Shutdown()| is called. // For TestRenderViewHost, the view is explicitly deleted in the destructor // below, because TestRenderWidgetHostView::Destroy() doesn't |delete this|. - SetView(new content::TestRenderWidgetHostView(this)); + SetView(new TestRenderWidgetHostView(this)); } TestRenderViewHost::~TestRenderViewHost() { @@ -112,16 +116,16 @@ bool TestRenderViewHost::TestOnMessageReceived(const IPC::Message& msg) { } void TestRenderViewHost::SendNavigate(int page_id, const GURL& url) { - SendNavigateWithTransition(page_id, url, content::PAGE_TRANSITION_LINK); + SendNavigateWithTransition(page_id, url, PAGE_TRANSITION_LINK); } void TestRenderViewHost::SendNavigateWithTransition( - int page_id, const GURL& url, content::PageTransition transition) { + int page_id, const GURL& url, PageTransition transition) { ViewHostMsg_FrameNavigate_Params params; params.page_id = page_id; params.url = url; - params.referrer = content::Referrer(); + params.referrer = Referrer(); params.transition = transition; params.redirects = std::vector<GURL>(); params.should_update_history = true; @@ -160,8 +164,6 @@ void TestRenderViewHost::set_contents_mime_type(const std::string& mime_type) { contents_mime_type_ = mime_type; } -namespace content { - TestRenderWidgetHostView::TestRenderWidgetHostView(RenderWidgetHost* rwh) : rwh_(RenderWidgetHostImpl::From(rwh)), is_showing_(false) { @@ -331,7 +333,7 @@ void TestRenderViewHostFactory::set_render_process_host_factory( render_process_host_factory_ = rph_factory; } -RenderViewHost* TestRenderViewHostFactory::CreateRenderViewHost( +content::RenderViewHost* TestRenderViewHostFactory::CreateRenderViewHost( SiteInstance* instance, RenderViewHostDelegate* delegate, int routing_id, diff --git a/content/browser/renderer_host/test_render_view_host.h b/content/browser/renderer_host/test_render_view_host.h index 597bde2..79251da 100644 --- a/content/browser/renderer_host/test_render_view_host.h +++ b/content/browser/renderer_host/test_render_view_host.h @@ -17,6 +17,13 @@ #include "content/public/common/page_transition_types.h" #include "testing/gtest/include/gtest/gtest.h" +// This file provides a testing framework for mocking out the RenderProcessHost +// layer. It allows you to test RenderViewHost, TabContents, +// NavigationController, and other layers above that without running an actual +// renderer process. +// +// To use, derive your test base class from RenderViewHostTestHarness. + #if defined(USE_AURA) namespace aura { class RootWindow; @@ -40,22 +47,14 @@ class Rect; class TestTabContents; struct ViewHostMsg_FrameNavigate_Params; +namespace content { + // Utility function to initialize ViewHostMsg_NavigateParams_Params // with given |page_id|, |url| and |transition_type|. void InitNavigateParams(ViewHostMsg_FrameNavigate_Params* params, int page_id, const GURL& url, - content::PageTransition transition_type); - -// This file provides a testing framework for mocking out the RenderProcessHost -// layer. It allows you to test RenderViewHost, TabContents, -// NavigationController, and other layers above that without running an actual -// renderer process. -// -// To use, derive your test base class from RenderViewHostTestHarness. - - -namespace content { + PageTransition transition_type); // TestRenderViewHostView ------------------------------------------------------ @@ -95,10 +94,10 @@ class TestRenderWidgetHostView : public RenderWidgetHostViewBase { const WebKit::WebMouseWheelEvent& event) OVERRIDE {} // RenderWidgetHostViewPort implementation. - virtual void InitAsPopup(content::RenderWidgetHostView* parent_host_view, + virtual void InitAsPopup(RenderWidgetHostView* parent_host_view, const gfx::Rect& pos) OVERRIDE {} virtual void InitAsFullscreen( - content::RenderWidgetHostView* reference_host_view) OVERRIDE {} + RenderWidgetHostView* reference_host_view) OVERRIDE {} virtual void DidBecomeSelected() OVERRIDE {} virtual void WasHidden() OVERRIDE {} virtual void MovePluginWindows( @@ -187,8 +186,6 @@ class TestRenderWidgetHostView : public RenderWidgetHostViewBase { bool is_showing_; }; -} // namespace content - #if defined(COMPILER_MSVC) // See comment for same warning on RenderViewHostImpl. #pragma warning(push) @@ -204,10 +201,10 @@ class TestRenderViewHost : public RenderViewHostImpl { public: // If the given TabContnets has a pending RVH, returns it, otherwise NULL. static TestRenderViewHost* GetPendingForController( - content::NavigationController* controller); + NavigationController* controller); - TestRenderViewHost(content::SiteInstance* instance, - content::RenderViewHostDelegate* delegate, + TestRenderViewHost(SiteInstance* instance, + RenderViewHostDelegate* delegate, int routing_id); virtual ~TestRenderViewHost(); @@ -223,11 +220,11 @@ class TestRenderViewHost : public RenderViewHostImpl { void SendNavigate(int page_id, const GURL& url); // Calls OnMsgNavigate on the RenderViewHost with the given information, - // including a custom content::PageTransition. Sets the rest of the + // including a custom PageTransition. Sets the rest of the // parameters in the message to the "typical" values. This is a helper // function for simulating the most common types of loads. void SendNavigateWithTransition(int page_id, const GURL& url, - content::PageTransition transition); + PageTransition transition); // Calls OnMsgShouldCloseACK on the RenderViewHost with the given parameter. void SendShouldCloseACK(bool proceed); @@ -311,6 +308,8 @@ class TestRenderViewHost : public RenderViewHostImpl { #pragma warning(pop) #endif +} // namespace content + // TestRenderViewHostFactory --------------------------------------------------- // Manages creation of the RenderViewHosts using our special subclass. This @@ -325,7 +324,7 @@ class TestRenderViewHostFactory : public RenderViewHostFactory { virtual void set_render_process_host_factory( content::RenderProcessHostFactory* rph_factory); - virtual RenderViewHost* CreateRenderViewHost( + virtual content::RenderViewHost* CreateRenderViewHost( content::SiteInstance* instance, content::RenderViewHostDelegate* delegate, int routing_id, @@ -353,9 +352,9 @@ class RenderViewHostTestHarness : public testing::Test { content::NavigationController& controller(); virtual TestTabContents* contents(); - TestRenderViewHost* rvh(); - TestRenderViewHost* pending_rvh(); - TestRenderViewHost* active_rvh(); + content::TestRenderViewHost* rvh(); + content::TestRenderViewHost* pending_rvh(); + content::TestRenderViewHost* active_rvh(); content::BrowserContext* browser_context(); MockRenderProcessHost* process(); diff --git a/content/browser/renderer_host/text_input_client_mac.h b/content/browser/renderer_host/text_input_client_mac.h index 00c67b8..cf767995 100644 --- a/content/browser/renderer_host/text_input_client_mac.h +++ b/content/browser/renderer_host/text_input_client_mac.h @@ -14,7 +14,9 @@ template <typename T> struct DefaultSingletonTraits; +namespace content { class RenderWidgetHost; +} // This class helps with the Mac OS X dictionary popup. For the design overview, // look at this document: @@ -44,13 +46,14 @@ class TextInputClientMac { // unlock and return that stored value. // // Returns NSNotFound if the request times out or is not completed. - NSUInteger GetCharacterIndexAtPoint(RenderWidgetHost* rwh, gfx::Point point); + NSUInteger GetCharacterIndexAtPoint(content::RenderWidgetHost* rwh, + gfx::Point point); // Returns nil if the request times out or is completed. - NSAttributedString* GetAttributedSubstringFromRange(RenderWidgetHost* rwh, - NSRange range); + NSAttributedString* GetAttributedSubstringFromRange( + content::RenderWidgetHost* rwh, NSRange range); // Returns NSZeroRect if the request times out or is not completed. The result // is in WebKit coordinates. - NSRect GetFirstRectForRange(RenderWidgetHost* rwh, NSRange range); + NSRect GetFirstRectForRange(content::RenderWidgetHost* rwh, NSRange range); // When the renderer sends the ViewHostMsg reply, the RenderMessageFilter will // call the corresponding method on the IO thread to unlock the condition and diff --git a/content/browser/renderer_host/text_input_client_mac.mm b/content/browser/renderer_host/text_input_client_mac.mm index 59f0caa..933511e 100644 --- a/content/browser/renderer_host/text_input_client_mac.mm +++ b/content/browser/renderer_host/text_input_client_mac.mm @@ -10,6 +10,9 @@ #include "content/browser/renderer_host/render_widget_host_impl.h" #include "content/common/text_input_client_messages.h" +using content::RenderWidgetHost; +using content::RenderWidgetHostImpl; + // The amount of time in milliseconds that the browser process will wait for a // response from the renderer. // TODO(rsesek): Using the histogram data, find the best upper-bound for this diff --git a/content/browser/renderer_host/text_input_client_mac_unittest.mm b/content/browser/renderer_host/text_input_client_mac_unittest.mm index 3ff1363..1791d32 100644 --- a/content/browser/renderer_host/text_input_client_mac_unittest.mm +++ b/content/browser/renderer_host/text_input_client_mac_unittest.mm @@ -17,6 +17,8 @@ #include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest_mac.h" +using content::RenderWidgetHostImpl; + namespace { const int64 kTaskDelayMs = 200; diff --git a/content/browser/speech/speech_recognition_manager_impl.cc b/content/browser/speech/speech_recognition_manager_impl.cc index 9ced53f..aff3f08 100644 --- a/content/browser/speech/speech_recognition_manager_impl.cc +++ b/content/browser/speech/speech_recognition_manager_impl.cc @@ -19,6 +19,7 @@ using content::BrowserMainLoop; using content::BrowserThread; +using content::RenderViewHostImpl; using content::SpeechRecognitionManager; using content::SpeechRecognitionManagerDelegate; diff --git a/content/browser/ssl/ssl_error_handler.cc b/content/browser/ssl/ssl_error_handler.cc index fb29a922..ee06a32 100644 --- a/content/browser/ssl/ssl_error_handler.cc +++ b/content/browser/ssl/ssl_error_handler.cc @@ -16,6 +16,7 @@ #include "net/url_request/url_request.h" using content::BrowserThread; +using content::RenderViewHostImpl; using content::WebContents; SSLErrorHandler::SSLErrorHandler(ResourceDispatcherHost* rdh, diff --git a/content/browser/tab_contents/interstitial_page_impl.cc b/content/browser/tab_contents/interstitial_page_impl.cc index 4a29a22..a01cbf5 100644 --- a/content/browser/tab_contents/interstitial_page_impl.cc +++ b/content/browser/tab_contents/interstitial_page_impl.cc @@ -41,7 +41,11 @@ using content::InterstitialPageDelegate; using content::NavigationController; using content::NavigationEntry; using content::NavigationEntryImpl; +using content::RenderViewHost; +using content::RenderViewHostImpl; using content::RenderViewHostDelegate; +using content::RenderWidgetHost; +using content::RenderWidgetHostImpl; using content::RenderWidgetHostView; using content::RenderWidgetHostViewPort; using content::SiteInstance; diff --git a/content/browser/tab_contents/interstitial_page_impl.h b/content/browser/tab_contents/interstitial_page_impl.h index 6f1f27a..0bfdbf8 100644 --- a/content/browser/tab_contents/interstitial_page_impl.h +++ b/content/browser/tab_contents/interstitial_page_impl.h @@ -16,11 +16,11 @@ #include "content/public/common/renderer_preferences.h" #include "googleurl/src/gurl.h" -class RenderViewHostImpl; class TabContents; namespace content { class NavigationEntry; +class RenderViewHostImpl; class WebContentsView; } @@ -53,7 +53,7 @@ class CONTENT_EXPORT InterstitialPageImpl virtual void Hide() OVERRIDE; virtual void DontProceed() OVERRIDE; virtual void Proceed() OVERRIDE; - virtual RenderViewHost* GetRenderViewHostForTesting() const OVERRIDE; + virtual content::RenderViewHost* GetRenderViewHostForTesting() const OVERRIDE; virtual content::InterstitialPageDelegate* GetDelegateForTesting() OVERRIDE; virtual void DontCreateViewForTesting() OVERRIDE; virtual void SetSize(const gfx::Size& size) OVERRIDE; @@ -83,13 +83,13 @@ class CONTENT_EXPORT InterstitialPageImpl // RenderViewHostDelegate implementation: virtual View* GetViewDelegate() OVERRIDE; virtual const GURL& GetURL() const OVERRIDE; - virtual void RenderViewGone(RenderViewHost* render_view_host, + virtual void RenderViewGone(content::RenderViewHost* render_view_host, base::TerminationStatus status, int error_code) OVERRIDE; virtual void DidNavigate( - RenderViewHost* render_view_host, + content::RenderViewHost* render_view_host, const ViewHostMsg_FrameNavigate_Params& params) OVERRIDE; - virtual void UpdateTitle(RenderViewHost* render_view_host, + virtual void UpdateTitle(content::RenderViewHost* render_view_host, int32 page_id, const string16& title, base::i18n::TextDirection title_direction) OVERRIDE; @@ -109,7 +109,7 @@ class CONTENT_EXPORT InterstitialPageImpl // Creates the RenderViewHost containing the interstitial content. // Overriden in unit tests. - virtual RenderViewHost* CreateRenderViewHost(); + virtual content::RenderViewHost* CreateRenderViewHost(); // Creates the WebContentsView that shows the interstitial RVH. // Overriden in unit tests. @@ -160,7 +160,7 @@ class CONTENT_EXPORT InterstitialPageImpl ActionState action_taken_; // The RenderViewHost displaying the interstitial contents. - RenderViewHostImpl* render_view_host_; + content::RenderViewHostImpl* render_view_host_; // The IDs for the Render[View|Process]Host hidden by this interstitial. int original_child_id_; diff --git a/content/browser/tab_contents/navigation_controller_impl.cc b/content/browser/tab_contents/navigation_controller_impl.cc index 0073e64..1f2d8a6 100644 --- a/content/browser/tab_contents/navigation_controller_impl.cc +++ b/content/browser/tab_contents/navigation_controller_impl.cc @@ -40,6 +40,7 @@ using content::GlobalRequestID; using content::NavigationController; using content::NavigationEntry; using content::NavigationEntryImpl; +using content::RenderViewHostImpl; using content::SessionStorageNamespace; using content::SiteInstance; using content::UserMetricsAction; diff --git a/content/browser/tab_contents/navigation_controller_impl_unittest.cc b/content/browser/tab_contents/navigation_controller_impl_unittest.cc index 71c5de5..57758f2 100644 --- a/content/browser/tab_contents/navigation_controller_impl_unittest.cc +++ b/content/browser/tab_contents/navigation_controller_impl_unittest.cc @@ -38,6 +38,7 @@ using content::NavigationController; using content::NavigationEntry; using content::NavigationEntryImpl; using content::SiteInstance; +using content::TestRenderViewHost; using content::WebContents; // NavigationControllerTest ---------------------------------------------------- diff --git a/content/browser/tab_contents/popup_menu_helper_mac.h b/content/browser/tab_contents/popup_menu_helper_mac.h index 74f6f6a..1c10a9e 100644 --- a/content/browser/tab_contents/popup_menu_helper_mac.h +++ b/content/browser/tab_contents/popup_menu_helper_mac.h @@ -12,15 +12,18 @@ #include "content/public/browser/notification_registrar.h" #include "ui/gfx/rect.h" +struct WebMenuItem; + +namespace content { class RenderViewHost; class RenderViewHostImpl; -struct WebMenuItem; +} class PopupMenuHelper : public content::NotificationObserver { public: // Creates a PopupMenuHelper that will notify |render_view_host| when a user // selects or cancels the popup. - explicit PopupMenuHelper(RenderViewHost* render_view_host); + explicit PopupMenuHelper(content::RenderViewHost* render_view_host); // Shows the popup menu and notifies the RenderViewHost of the selection/ // cancel. @@ -40,7 +43,7 @@ class PopupMenuHelper : public content::NotificationObserver { content::NotificationRegistrar notification_registrar_; - RenderViewHostImpl* render_view_host_; + content::RenderViewHostImpl* render_view_host_; DISALLOW_COPY_AND_ASSIGN(PopupMenuHelper); }; diff --git a/content/browser/tab_contents/popup_menu_helper_mac.mm b/content/browser/tab_contents/popup_menu_helper_mac.mm index 02e29a4..0d7aaf2 100644 --- a/content/browser/tab_contents/popup_menu_helper_mac.mm +++ b/content/browser/tab_contents/popup_menu_helper_mac.mm @@ -16,6 +16,10 @@ #import "ui/base/cocoa/base_view.h" #include "webkit/glue/webmenurunner_mac.h" +using content::RenderViewHost; +using content::RenderViewHostImpl; +using content::RenderWidgetHost; + PopupMenuHelper::PopupMenuHelper(RenderViewHost* render_view_host) : render_view_host_(static_cast<RenderViewHostImpl*>(render_view_host)) { notification_registrar_.Add( diff --git a/content/browser/tab_contents/render_view_host_manager.cc b/content/browser/tab_contents/render_view_host_manager.cc index 3d7b9c5..8b76009 100644 --- a/content/browser/tab_contents/render_view_host_manager.cc +++ b/content/browser/tab_contents/render_view_host_manager.cc @@ -30,6 +30,8 @@ using content::NavigationController; using content::NavigationEntry; using content::NavigationEntryImpl; +using content::RenderViewHost; +using content::RenderViewHostImpl; using content::RenderWidgetHostView; using content::RenderWidgetHostViewPort; using content::SiteInstance; diff --git a/content/browser/tab_contents/render_view_host_manager.h b/content/browser/tab_contents/render_view_host_manager.h index 179a400..1f02a22 100644 --- a/content/browser/tab_contents/render_view_host_manager.h +++ b/content/browser/tab_contents/render_view_host_manager.h @@ -17,14 +17,14 @@ class InterstitialPageImpl; class NavigationControllerImpl; -class RenderViewHost; -class RenderViewHostImpl; class WebUIImpl; namespace content { class BrowserContext; class NavigationEntry; class NavigationEntryImpl; +class RenderViewHost; +class RenderViewHostImpl; class RenderWidgetHostView; } @@ -55,13 +55,13 @@ class CONTENT_EXPORT RenderViewHostManager // If you are attaching to an already-existing RenderView, you should call // InitWithExistingID. virtual bool CreateRenderViewForRenderManager( - RenderViewHost* render_view_host) = 0; + content::RenderViewHost* render_view_host) = 0; virtual void BeforeUnloadFiredFromRenderManager( bool proceed, bool* proceed_to_fire_unload) = 0; virtual void DidStartLoadingFromRenderManager( - RenderViewHost* render_view_host) = 0; + content::RenderViewHost* render_view_host) = 0; virtual void RenderViewGoneFromRenderManager( - RenderViewHost* render_view_host) = 0; + content::RenderViewHost* render_view_host) = 0; virtual void UpdateRenderViewSizeForRenderManager() = 0; virtual void NotifySwappedFromRenderManager() = 0; virtual NavigationControllerImpl& GetControllerForRenderManager() = 0; @@ -85,7 +85,7 @@ class CONTENT_EXPORT RenderViewHostManager virtual void SetFocusToLocationBar(bool select_all) = 0; // Creates a view and sets the size for the specified RVH. - virtual void CreateViewAndSetSizeForRVH(RenderViewHost* rvh) = 0; + virtual void CreateViewAndSetSizeForRVH(content::RenderViewHost* rvh) = 0; protected: virtual ~Delegate() {} @@ -110,14 +110,14 @@ class CONTENT_EXPORT RenderViewHostManager // This will be non-NULL between Init() and Shutdown(). You may want to NULL // check it in many cases, however. Windows can send us messages during the // destruction process after it has been shut down. - RenderViewHostImpl* current_host() const; + content::RenderViewHostImpl* current_host() const; // Returns the view associated with the current RenderViewHost, or NULL if // there is no current one. content::RenderWidgetHostView* GetRenderWidgetHostView() const; // Returns the pending render view host, or NULL if there is no pending one. - RenderViewHostImpl* pending_render_view_host() const; + content::RenderViewHostImpl* pending_render_view_host() const; // Returns the current committed Web UI or NULL if none applies. WebUIImpl* web_ui() const { return web_ui_.get(); } @@ -129,7 +129,8 @@ class CONTENT_EXPORT RenderViewHostManager // navigation entry. It may create a new RenderViewHost or re-use an existing // one. The RenderViewHost to navigate will be returned. Returns NULL if one // could not be created. - RenderViewHostImpl* Navigate(const content::NavigationEntryImpl& entry); + content::RenderViewHostImpl* Navigate( + const content::NavigationEntryImpl& entry); // Instructs the various live views to stop. Called when the user directed the // page to stop loading. @@ -146,7 +147,7 @@ class CONTENT_EXPORT RenderViewHostManager bool ShouldCloseTabOnUnresponsiveRenderer(); // Called when a renderer's main frame navigates. - void DidNavigateMainFrame(RenderViewHost* render_view_host); + void DidNavigateMainFrame(content::RenderViewHost* render_view_host); // Set the WebUI after committing a page load. This is useful for navigations // initiated from a renderer, where we want to give the new renderer WebUI @@ -154,7 +155,8 @@ class CONTENT_EXPORT RenderViewHostManager void SetWebUIPostCommit(WebUIImpl* web_ui); // Called when a provisional load on the given renderer is aborted. - void RendererAbortedProvisionalLoad(RenderViewHost* render_view_host); + void RendererAbortedProvisionalLoad( + content::RenderViewHost* render_view_host); // Sets the passed passed interstitial as the currently showing interstitial. // |interstitial_page| should be non NULL (use the remove_interstitial_page @@ -189,11 +191,11 @@ class CONTENT_EXPORT RenderViewHostManager const content::NotificationDetails& details) OVERRIDE; // Called when a RenderViewHost is about to be deleted. - void RenderViewDeleted(RenderViewHost* rvh); + void RenderViewDeleted(content::RenderViewHost* rvh); // Returns whether the given RenderViewHost is on the list of swapped out // RenderViewHosts. - bool IsSwappedOut(RenderViewHost* rvh); + bool IsSwappedOut(content::RenderViewHost* rvh); private: friend class TestTabContents; @@ -228,7 +230,7 @@ class CONTENT_EXPORT RenderViewHostManager // Sets up the necessary state for a new RenderViewHost navigating to the // given entry. - bool InitRenderView(RenderViewHost* render_view_host, + bool InitRenderView(content::RenderViewHost* render_view_host, const content::NavigationEntryImpl& entry); // Sets the pending RenderViewHost/WebUI to be the active one. Note that this @@ -239,7 +241,7 @@ class CONTENT_EXPORT RenderViewHostManager // Helper method to terminate the pending RenderViewHost. void CancelPending(); - RenderViewHostImpl* UpdateRendererStateForNavigate( + content::RenderViewHostImpl* UpdateRendererStateForNavigate( const content::NavigationEntryImpl& entry); // Called when a renderer process is starting to close. We should not @@ -261,7 +263,7 @@ class CONTENT_EXPORT RenderViewHostManager // Our RenderView host and its associated Web UI (if any, will be NULL for // non-DOM-UI pages). This object is responsible for all communication with // a child RenderView instance. - RenderViewHostImpl* render_view_host_; + content::RenderViewHostImpl* render_view_host_; scoped_ptr<WebUIImpl> web_ui_; // A RenderViewHost used to load a cross-site page. This remains hidden @@ -273,11 +275,11 @@ class CONTENT_EXPORT RenderViewHostManager // is. This will happen when we're transitioning between two Web UI pages: // the RVH won't be swapped, so the pending pointer will be unused, but there // will be a pending Web UI associated with the navigation. - RenderViewHostImpl* pending_render_view_host_; + content::RenderViewHostImpl* pending_render_view_host_; scoped_ptr<WebUIImpl> pending_web_ui_; // A map of site instance ID to swapped out RenderViewHosts. - typedef base::hash_map<int32, RenderViewHostImpl*> RenderViewHostMap; + typedef base::hash_map<int32, content::RenderViewHostImpl*> RenderViewHostMap; RenderViewHostMap swapped_out_hosts_; // The intersitial page currently shown if any, not own by this class diff --git a/content/browser/tab_contents/render_view_host_manager_unittest.cc b/content/browser/tab_contents/render_view_host_manager_unittest.cc index 7d29909..1cd01cb 100644 --- a/content/browser/tab_contents/render_view_host_manager_unittest.cc +++ b/content/browser/tab_contents/render_view_host_manager_unittest.cc @@ -34,7 +34,10 @@ using content::BrowserThreadImpl; using content::NavigationController; using content::NavigationEntry; using content::NavigationEntryImpl; +using content::RenderViewHost; +using content::RenderViewHostImpl; using content::SiteInstance; +using content::TestRenderViewHost; using content::WebContents; using content::WebUI; using content::WebUIController; diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc index 85a55f2..239ec8e 100644 --- a/content/browser/tab_contents/tab_contents.cc +++ b/content/browser/tab_contents/tab_contents.cc @@ -123,7 +123,10 @@ using content::NavigationController; using content::NavigationEntry; using content::NavigationEntryImpl; using content::OpenURLParams; +using content::RenderViewHost; +using content::RenderViewHostImpl; using content::RenderViewHostDelegate; +using content::RenderWidgetHost; using content::RenderWidgetHostView; using content::RenderWidgetHostViewPort; using content::SessionStorageNamespace; diff --git a/content/browser/tab_contents/tab_contents.h b/content/browser/tab_contents/tab_contents.h index dd1cb8b..b2bca01 100644 --- a/content/browser/tab_contents/tab_contents.h +++ b/content/browser/tab_contents/tab_contents.h @@ -32,8 +32,6 @@ class InterstitialPageImpl; class LoadNotificationDetails; -class RenderViewHost; -class RenderViewHostImpl; class SavePackage; class SessionStorageNamespaceImpl; struct ViewHostMsg_DidFailProvisionalLoadWithError_Params; @@ -42,6 +40,8 @@ namespace content { class DownloadItem; class SiteInstance; class JavaScriptDialogCreator; +class RenderViewHost; +class RenderViewHostImpl; class WebContentsDelegate; class WebContentsObserver; class WebContentsView; @@ -65,7 +65,8 @@ class CONTENT_EXPORT TabContents virtual ~TabContents(); // Returns the content specific prefs for the given RVH. - static WebPreferences GetWebkitPrefs(RenderViewHost* rvh, const GURL& url); + static WebPreferences GetWebkitPrefs( + content::RenderViewHost* rvh, const GURL& url); // Returns the SavePackage which manages the page saving job. May be NULL. SavePackage* save_package() const { return save_package_.get(); } @@ -135,7 +136,7 @@ class CONTENT_EXPORT TabContents virtual void SetViewType(content::ViewType type) OVERRIDE; virtual content::ViewType GetViewType() const OVERRIDE; virtual content::RenderProcessHost* GetRenderProcessHost() const OVERRIDE; - virtual RenderViewHost* GetRenderViewHost() const OVERRIDE; + virtual content::RenderViewHost* GetRenderViewHost() const OVERRIDE; virtual content::RenderWidgetHostView* GetRenderWidgetHostView() const OVERRIDE; virtual content::WebContentsView* GetView() const OVERRIDE; @@ -232,36 +233,39 @@ class CONTENT_EXPORT TabContents virtual WebContents* GetAsWebContents() OVERRIDE; virtual content::ViewType GetRenderViewType() const OVERRIDE; virtual gfx::Rect GetRootWindowResizerRect() const OVERRIDE; - virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; - virtual void RenderViewReady(RenderViewHost* render_view_host) OVERRIDE; - virtual void RenderViewGone(RenderViewHost* render_view_host, + virtual void RenderViewCreated( + content::RenderViewHost* render_view_host) OVERRIDE; + virtual void RenderViewReady( + content::RenderViewHost* render_view_host) OVERRIDE; + virtual void RenderViewGone(content::RenderViewHost* render_view_host, base::TerminationStatus status, int error_code) OVERRIDE; - virtual void RenderViewDeleted(RenderViewHost* render_view_host) OVERRIDE; + virtual void RenderViewDeleted( + content::RenderViewHost* render_view_host) OVERRIDE; virtual void DidNavigate( - RenderViewHost* render_view_host, + content::RenderViewHost* render_view_host, const ViewHostMsg_FrameNavigate_Params& params) OVERRIDE; - virtual void UpdateState(RenderViewHost* render_view_host, + virtual void UpdateState(content::RenderViewHost* render_view_host, int32 page_id, const std::string& state) OVERRIDE; - virtual void UpdateTitle(RenderViewHost* render_view_host, + virtual void UpdateTitle(content::RenderViewHost* render_view_host, int32 page_id, const string16& title, base::i18n::TextDirection title_direction) OVERRIDE; - virtual void UpdateEncoding(RenderViewHost* render_view_host, + virtual void UpdateEncoding(content::RenderViewHost* render_view_host, const std::string& encoding) OVERRIDE; virtual void UpdateTargetURL(int32 page_id, const GURL& url) OVERRIDE; - virtual void Close(RenderViewHost* render_view_host) OVERRIDE; + virtual void Close(content::RenderViewHost* render_view_host) OVERRIDE; virtual void RequestMove(const gfx::Rect& new_bounds) OVERRIDE; - virtual void SwappedOut(RenderViewHost* render_view_host) OVERRIDE; + virtual void SwappedOut(content::RenderViewHost* render_view_host) OVERRIDE; virtual void DidStartLoading() OVERRIDE; virtual void DidStopLoading() OVERRIDE; virtual void DidCancelLoading() OVERRIDE; virtual void DidChangeLoadProgress(double progress) OVERRIDE; virtual void DocumentAvailableInMainFrame( - RenderViewHost* render_view_host) OVERRIDE; + content::RenderViewHost* render_view_host) OVERRIDE; virtual void DocumentOnLoadCompletedInMainFrame( - RenderViewHost* render_view_host, + content::RenderViewHost* render_view_host, int32 page_id) OVERRIDE; virtual void RequestOpenURL(const GURL& url, const content::Referrer& referrer, @@ -273,14 +277,14 @@ class CONTENT_EXPORT TabContents WindowOpenDisposition disposition, int64 source_frame_id, const content::GlobalRequestID& transferred_global_request_id) OVERRIDE; - virtual void RunJavaScriptMessage(RenderViewHost* rvh, + virtual void RunJavaScriptMessage(content::RenderViewHost* rvh, const string16& message, const string16& default_prompt, const GURL& frame_url, ui::JavascriptMessageType type, IPC::Message* reply_msg, bool* did_suppress_message) OVERRIDE; - virtual void RunBeforeUnloadConfirm(RenderViewHost* rvh, + virtual void RunBeforeUnloadConfirm(content::RenderViewHost* rvh, const string16& message, bool is_reload, IPC::Message* reply_msg) OVERRIDE; @@ -289,9 +293,10 @@ class CONTENT_EXPORT TabContents virtual WebPreferences GetWebkitPrefs() OVERRIDE; virtual void OnUserGesture() OVERRIDE; virtual void OnIgnoredUIEvent() OVERRIDE; - virtual void RendererUnresponsive(RenderViewHost* render_view_host, + virtual void RendererUnresponsive(content::RenderViewHost* render_view_host, bool is_during_unload) OVERRIDE; - virtual void RendererResponsive(RenderViewHost* render_view_host) OVERRIDE; + virtual void RendererResponsive( + content::RenderViewHost* render_view_host) OVERRIDE; virtual void LoadStateChanged(const GURL& url, const net::LoadStateWithParam& load_state, uint64 upload_position, @@ -308,30 +313,30 @@ class CONTENT_EXPORT TabContents virtual void HandleMouseUp() OVERRIDE; virtual void HandleMouseActivate() OVERRIDE; virtual void RunFileChooser( - RenderViewHost* render_view_host, + content::RenderViewHost* render_view_host, const content::FileChooserParams& params) OVERRIDE; virtual void ToggleFullscreenMode(bool enter_fullscreen) OVERRIDE; virtual bool IsFullscreenForCurrentTab() const OVERRIDE; virtual void UpdatePreferredSize(const gfx::Size& pref_size) OVERRIDE; virtual void ResizeDueToAutoResize(const gfx::Size& new_size) OVERRIDE; - virtual void WebUISend(RenderViewHost* render_view_host, - const GURL& source_url, - const std::string& name, - const base::ListValue& args) OVERRIDE; + virtual void WebUISend(content::RenderViewHost* render_view_host, + const GURL& source_url, + const std::string& name, + const base::ListValue& args) OVERRIDE; virtual void RequestToLockMouse() OVERRIDE; virtual void LostMouseLock() OVERRIDE; // RenderViewHostManager::Delegate ------------------------------------------- virtual bool CreateRenderViewForRenderManager( - RenderViewHost* render_view_host) OVERRIDE; + content::RenderViewHost* render_view_host) OVERRIDE; virtual void BeforeUnloadFiredFromRenderManager( bool proceed, bool* proceed_to_fire_unload) OVERRIDE; virtual void DidStartLoadingFromRenderManager( - RenderViewHost* render_view_host) OVERRIDE; + content::RenderViewHost* render_view_host) OVERRIDE; virtual void RenderViewGoneFromRenderManager( - RenderViewHost* render_view_host) OVERRIDE; + content::RenderViewHost* render_view_host) OVERRIDE; virtual void UpdateRenderViewSizeForRenderManager() OVERRIDE; virtual void NotifySwappedFromRenderManager() OVERRIDE; virtual NavigationControllerImpl& GetControllerForRenderManager() OVERRIDE; @@ -340,7 +345,8 @@ class CONTENT_EXPORT TabContents GetLastCommittedNavigationEntryForRenderManager() OVERRIDE; virtual bool FocusLocationBarByDefault() OVERRIDE; virtual void SetFocusToLocationBar(bool select_all) OVERRIDE; - virtual void CreateViewAndSetSizeForRVH(RenderViewHost* rvh) OVERRIDE; + virtual void CreateViewAndSetSizeForRVH( + content::RenderViewHost* rvh) OVERRIDE; protected: friend class content::WebContentsObserver; @@ -379,7 +385,7 @@ class CONTENT_EXPORT TabContents friend class TestTabContents; // Callback function when showing JS dialogs. - void OnDialogClosed(RenderViewHost* rvh, + void OnDialogClosed(content::RenderViewHost* rvh, IPC::Message* reply_msg, bool success, const string16& user_input); @@ -459,7 +465,7 @@ class CONTENT_EXPORT TabContents const content::LoadCommittedDetails& details, const ViewHostMsg_FrameNavigate_Params& params); void DidNavigateAnyFramePostCommit( - RenderViewHost* render_view_host, + content::RenderViewHost* render_view_host, const content::LoadCommittedDetails& details, const ViewHostMsg_FrameNavigate_Params& params); @@ -467,7 +473,7 @@ class CONTENT_EXPORT TabContents // given RenderViewHost to be larger than the number of restored entries. // This is called in CreateRenderView before any navigations in the RenderView // have begun, to prevent any races in updating RenderView::next_page_id. - void UpdateMaxPageIDIfNecessary(RenderViewHost* rvh); + void UpdateMaxPageIDIfNecessary(content::RenderViewHost* rvh); // Saves the given title to the navigation entry and does associated work. It // will update history and the view for the new title, and also synthesize @@ -507,7 +513,7 @@ class CONTENT_EXPORT TabContents // Save a URL to the local filesystem. void SaveURL(const GURL& url, const GURL& referrer, bool is_main_frame); - RenderViewHostImpl* GetRenderViewHostImpl(); + content::RenderViewHostImpl* GetRenderViewHostImpl(); // Stores random bits of data for others to associate with this object. // WARNING: this needs to be deleted after NavigationController. diff --git a/content/browser/tab_contents/tab_contents_unittest.cc b/content/browser/tab_contents/tab_contents_unittest.cc index 57c4844..f36cb80f 100644 --- a/content/browser/tab_contents/tab_contents_unittest.cc +++ b/content/browser/tab_contents/tab_contents_unittest.cc @@ -33,6 +33,7 @@ using content::InterstitialPage; using content::NavigationEntry; using content::NavigationEntryImpl; using content::SiteInstance; +using content::TestRenderViewHost; using content::WebContents; using content::WebUI; using content::WebUIController; @@ -201,7 +202,7 @@ class TestInterstitialPage : public InterstitialPageImpl { } protected: - virtual RenderViewHost* CreateRenderViewHost() OVERRIDE { + virtual content::RenderViewHost* CreateRenderViewHost() OVERRIDE { return new TestRenderViewHost( SiteInstance::Create(tab()->GetBrowserContext()), this, MSG_ROUTING_NONE); diff --git a/content/browser/tab_contents/tab_contents_view_gtk.cc b/content/browser/tab_contents/tab_contents_view_gtk.cc index 83079a9..49fd71e 100644 --- a/content/browser/tab_contents/tab_contents_view_gtk.cc +++ b/content/browser/tab_contents/tab_contents_view_gtk.cc @@ -30,6 +30,7 @@ using WebKit::WebDragOperation; using WebKit::WebDragOperationsMask; +using content::RenderWidgetHost; using content::WebContents; namespace { @@ -202,7 +203,7 @@ void TabContentsViewGtk::SizeContents(const gfx::Size& size) { rwhv->SetSize(size); } -void TabContentsViewGtk::RenderViewCreated(RenderViewHost* host) { +void TabContentsViewGtk::RenderViewCreated(content::RenderViewHost* host) { } void TabContentsViewGtk::Focus() { diff --git a/content/browser/tab_contents/tab_contents_view_gtk.h b/content/browser/tab_contents/tab_contents_view_gtk.h index c5b8499..877c87d 100644 --- a/content/browser/tab_contents/tab_contents_view_gtk.h +++ b/content/browser/tab_contents/tab_contents_view_gtk.h @@ -53,7 +53,7 @@ class CONTENT_EXPORT TabContentsViewGtk : public WebContentsView { virtual void CreateView(const gfx::Size& initial_size) OVERRIDE; virtual content::RenderWidgetHostView* CreateViewForWidget( - RenderWidgetHost* render_widget_host) OVERRIDE; + content::RenderWidgetHost* render_widget_host) OVERRIDE; virtual gfx::NativeView GetNativeView() const OVERRIDE; virtual gfx::NativeView GetContentNativeView() const OVERRIDE; @@ -63,7 +63,7 @@ class CONTENT_EXPORT TabContentsViewGtk : public WebContentsView { virtual void OnTabCrashed(base::TerminationStatus status, int error_code) OVERRIDE; virtual void SizeContents(const gfx::Size& size) OVERRIDE; - virtual void RenderViewCreated(RenderViewHost* host) OVERRIDE; + virtual void RenderViewCreated(content::RenderViewHost* host) OVERRIDE; virtual void Focus() OVERRIDE; virtual void SetInitialFocus() OVERRIDE; virtual void StoreFocus() OVERRIDE; diff --git a/content/browser/tab_contents/tab_contents_view_helper.cc b/content/browser/tab_contents/tab_contents_view_helper.cc index 98817e6..2edfab2 100644 --- a/content/browser/tab_contents/tab_contents_view_helper.cc +++ b/content/browser/tab_contents/tab_contents_view_helper.cc @@ -16,6 +16,9 @@ #include "content/public/browser/web_contents_delegate.h" #include "content/public/browser/web_contents_view.h" +using content::RenderViewHostImpl; +using content::RenderWidgetHost; +using content::RenderWidgetHostImpl; using content::RenderWidgetHostView; using content::RenderWidgetHostViewPort; using content::WebContents; diff --git a/content/browser/tab_contents/tab_contents_view_win.cc b/content/browser/tab_contents/tab_contents_view_win.cc index 91d0e5e..e2678a5 100644 --- a/content/browser/tab_contents/tab_contents_view_win.cc +++ b/content/browser/tab_contents/tab_contents_view_win.cc @@ -74,7 +74,7 @@ void TabContentsViewWin::CreateView(const gfx::Size& initial_size) { } RenderWidgetHostView* TabContentsViewWin::CreateViewForWidget( - RenderWidgetHost* render_widget_host) { + content::RenderWidgetHost* render_widget_host) { if (render_widget_host->GetView()) { // During testing, the view will already be set up in most cases to the // test view, so we don't want to clobber it with a real one. To verify that @@ -142,7 +142,7 @@ void TabContentsViewWin::SizeContents(const gfx::Size& size) { } } -void TabContentsViewWin::RenderViewCreated(RenderViewHost* host) { +void TabContentsViewWin::RenderViewCreated(content::RenderViewHost* host) { } void TabContentsViewWin::Focus() { diff --git a/content/browser/tab_contents/tab_contents_view_win.h b/content/browser/tab_contents/tab_contents_view_win.h index 568a71d..f4f958c 100644 --- a/content/browser/tab_contents/tab_contents_view_win.h +++ b/content/browser/tab_contents/tab_contents_view_win.h @@ -29,7 +29,7 @@ class TabContentsViewWin : public content::WebContentsView, // Overridden from WebContentsView: virtual void CreateView(const gfx::Size& initial_size) OVERRIDE; virtual content::RenderWidgetHostView* CreateViewForWidget( - RenderWidgetHost* render_widget_host) OVERRIDE; + content::RenderWidgetHost* render_widget_host) OVERRIDE; virtual gfx::NativeView GetNativeView() const OVERRIDE; virtual gfx::NativeView GetContentNativeView() const OVERRIDE; virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE; @@ -38,7 +38,7 @@ class TabContentsViewWin : public content::WebContentsView, virtual void OnTabCrashed(base::TerminationStatus status, int error_code) OVERRIDE; virtual void SizeContents(const gfx::Size& size) OVERRIDE; - virtual void RenderViewCreated(RenderViewHost* host) OVERRIDE; + virtual void RenderViewCreated(content::RenderViewHost* host) OVERRIDE; virtual void Focus() OVERRIDE; virtual void SetInitialFocus() OVERRIDE; virtual void StoreFocus() OVERRIDE; diff --git a/content/browser/tab_contents/test_tab_contents.cc b/content/browser/tab_contents/test_tab_contents.cc index a29f716..fc6bf57 100644 --- a/content/browser/tab_contents/test_tab_contents.cc +++ b/content/browser/tab_contents/test_tab_contents.cc @@ -18,7 +18,10 @@ #include "webkit/forms/password_form.h" using content::NavigationEntry; +using content::RenderViewHost; +using content::RenderViewHostImpl; using content::SiteInstance; +using content::TestRenderViewHost; using content::WebContents; TestTabContents::TestTabContents(content::BrowserContext* browser_context, diff --git a/content/browser/tab_contents/test_tab_contents.h b/content/browser/tab_contents/test_tab_contents.h index 7f3a073..9842038 100644 --- a/content/browser/tab_contents/test_tab_contents.h +++ b/content/browser/tab_contents/test_tab_contents.h @@ -11,7 +11,10 @@ #include "webkit/glue/webpreferences.h" class SiteInstanceImpl; + +namespace content { class TestRenderViewHost; +} // Subclass TabContents to ensure it creates TestRenderViewHosts and does // not do anything involving views. @@ -21,7 +24,7 @@ class TestTabContents : public TabContents { content::SiteInstance* instance); virtual ~TestTabContents(); - TestRenderViewHost* pending_rvh() const; + content::TestRenderViewHost* pending_rvh() const; // State accessor. bool cross_navigation_pending() { @@ -32,11 +35,11 @@ class TestTabContents : public TabContents { // alternatives without using command-line switches. bool ShouldTransitionCrossSite() { return transition_cross_site; } - void TestDidNavigate(RenderViewHost* render_view_host, + void TestDidNavigate(content::RenderViewHost* render_view_host, int page_id, const GURL& url, content::PageTransition transition); - void TestDidNavigateWithReferrer(RenderViewHost* render_view_host, + void TestDidNavigateWithReferrer(content::RenderViewHost* render_view_host, int page_id, const GURL& url, const content::Referrer& referrer, @@ -49,7 +52,7 @@ class TestTabContents : public TabContents { // Prevent interaction with views. virtual bool CreateRenderViewForRenderManager( - RenderViewHost* render_view_host) OVERRIDE; + content::RenderViewHost* render_view_host) OVERRIDE; virtual void UpdateRenderViewSizeForRenderManager() OVERRIDE {} // Returns a clone of this TestTabContents. The returned object is also a diff --git a/content/browser/tab_contents/web_contents_view_android.cc b/content/browser/tab_contents/web_contents_view_android.cc index 4c26f73..cc67789 100644 --- a/content/browser/tab_contents/web_contents_view_android.cc +++ b/content/browser/tab_contents/web_contents_view_android.cc @@ -20,7 +20,7 @@ void WebContentsViewAndroid::CreateView(const gfx::Size& initial_size) { } content::RenderWidgetHostView* WebContentsViewAndroid::CreateViewForWidget( - RenderWidgetHost* render_widget_host) { + content::RenderWidgetHost* render_widget_host) { NOTIMPLEMENTED(); return NULL; } @@ -57,7 +57,7 @@ void WebContentsViewAndroid::SizeContents(const gfx::Size& size) { NOTIMPLEMENTED(); } -void WebContentsViewAndroid::RenderViewCreated(RenderViewHost* host) { +void WebContentsViewAndroid::RenderViewCreated(content::RenderViewHost* host) { NOTIMPLEMENTED(); } diff --git a/content/browser/tab_contents/web_contents_view_android.h b/content/browser/tab_contents/web_contents_view_android.h index 02b728d..72e8530 100644 --- a/content/browser/tab_contents/web_contents_view_android.h +++ b/content/browser/tab_contents/web_contents_view_android.h @@ -17,7 +17,7 @@ class WebContentsViewAndroid : public content::WebContentsView { virtual void CreateView(const gfx::Size& initial_size) OVERRIDE; virtual content::RenderWidgetHostView* CreateViewForWidget( - RenderWidgetHost* render_widget_host) OVERRIDE; + content::RenderWidgetHost* render_widget_host) OVERRIDE; virtual gfx::NativeView GetNativeView() const OVERRIDE; virtual gfx::NativeView GetContentNativeView() const OVERRIDE; @@ -27,7 +27,7 @@ class WebContentsViewAndroid : public content::WebContentsView { virtual void OnTabCrashed(base::TerminationStatus status, int error_code) OVERRIDE; virtual void SizeContents(const gfx::Size& size) OVERRIDE; - virtual void RenderViewCreated(RenderViewHost* host) OVERRIDE; + virtual void RenderViewCreated(content::RenderViewHost* host) OVERRIDE; virtual void Focus() OVERRIDE; virtual void SetInitialFocus() OVERRIDE; virtual void StoreFocus() OVERRIDE; diff --git a/content/browser/tab_contents/web_contents_view_mac.h b/content/browser/tab_contents/web_contents_view_mac.h index 1d2a21e..5a4acc9 100644 --- a/content/browser/tab_contents/web_contents_view_mac.h +++ b/content/browser/tab_contents/web_contents_view_mac.h @@ -66,12 +66,12 @@ class WebContentsViewMac : public content::WebContentsView { virtual void CreateView(const gfx::Size& initial_size) OVERRIDE; virtual content::RenderWidgetHostView* CreateViewForWidget( - RenderWidgetHost* render_widget_host) OVERRIDE; + content::RenderWidgetHost* render_widget_host) OVERRIDE; virtual gfx::NativeView GetNativeView() const OVERRIDE; virtual gfx::NativeView GetContentNativeView() const OVERRIDE; virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE; virtual void GetContainerBounds(gfx::Rect* out) const OVERRIDE; - virtual void RenderViewCreated(RenderViewHost* host) OVERRIDE; + virtual void RenderViewCreated(content::RenderViewHost* host) OVERRIDE; virtual void SetPageTitle(const string16& title) OVERRIDE; virtual void OnTabCrashed(base::TerminationStatus status, int error_code) OVERRIDE; diff --git a/content/browser/tab_contents/web_contents_view_mac.mm b/content/browser/tab_contents/web_contents_view_mac.mm index 419f297..89e5cf25 100644 --- a/content/browser/tab_contents/web_contents_view_mac.mm +++ b/content/browser/tab_contents/web_contents_view_mac.mm @@ -90,7 +90,7 @@ void WebContentsViewMac::CreateView(const gfx::Size& initial_size) { } RenderWidgetHostView* WebContentsViewMac::CreateViewForWidget( - RenderWidgetHost* render_widget_host) { + content::RenderWidgetHost* render_widget_host) { if (render_widget_host->GetView()) { // During testing, the view will already be set up in most cases to the // test view, so we don't want to clobber it with a real one. To verify that @@ -185,7 +185,7 @@ void WebContentsViewMac::StartDragging( offset:offset]; } -void WebContentsViewMac::RenderViewCreated(RenderViewHost* host) { +void WebContentsViewMac::RenderViewCreated(content::RenderViewHost* host) { // We want updates whenever the intrinsic width of the webpage changes. // Put the RenderView into that mode. The preferred width is used for example // when the "zoom" button in the browser window is clicked. diff --git a/content/browser/tab_contents/web_drag_dest_gtk.cc b/content/browser/tab_contents/web_drag_dest_gtk.cc index 27022c6..213cd32 100644 --- a/content/browser/tab_contents/web_drag_dest_gtk.cc +++ b/content/browser/tab_contents/web_drag_dest_gtk.cc @@ -20,6 +20,7 @@ #include "ui/base/dragdrop/gtk_dnd_util.h" #include "ui/base/gtk/gtk_screen_utils.h" +using content::RenderViewHostImpl; using WebKit::WebDragOperation; using WebKit::WebDragOperationNone; diff --git a/content/browser/tab_contents/web_drag_dest_gtk.h b/content/browser/tab_contents/web_drag_dest_gtk.h index 23d8bcc..7790604 100644 --- a/content/browser/tab_contents/web_drag_dest_gtk.h +++ b/content/browser/tab_contents/web_drag_dest_gtk.h @@ -16,10 +16,9 @@ #include "ui/base/gtk/gtk_signal.h" #include "webkit/glue/webdropdata.h" -class RenderViewHostImpl; - namespace content { +class RenderViewHostImpl; class WebContents; class WebDragDestDelegate; @@ -42,7 +41,7 @@ class CONTENT_EXPORT WebDragDestGtk { void set_delegate(WebDragDestDelegate* delegate) { delegate_ = delegate; } private: - RenderViewHostImpl* GetRenderViewHost() const; + content::RenderViewHostImpl* GetRenderViewHost() const; // Called when a system drag crosses over the render view. As there is no drag // enter event, we treat it as an enter event (and not a regular motion event) diff --git a/content/browser/tab_contents/web_drag_dest_mac.h b/content/browser/tab_contents/web_drag_dest_mac.h index 78d5418..db55174 100644 --- a/content/browser/tab_contents/web_drag_dest_mac.h +++ b/content/browser/tab_contents/web_drag_dest_mac.h @@ -6,16 +6,16 @@ #include "base/string16.h" -class RenderViewHost; class TabContents; struct WebDropData; namespace content { +class RenderViewHost; class WebDragDestDelegate; } // A typedef for a RenderViewHost used for comparison purposes only. -typedef RenderViewHost* RenderViewHostIdentifier; +typedef content::RenderViewHost* RenderViewHostIdentifier; // A class that handles tracking and event processing for a drag and drop // over the content area. Assumes something else initiates the drag, this is diff --git a/content/browser/tab_contents/web_drag_dest_win.h b/content/browser/tab_contents/web_drag_dest_win.h index 037e688..8bb16c2 100644 --- a/content/browser/tab_contents/web_drag_dest_win.h +++ b/content/browser/tab_contents/web_drag_dest_win.h @@ -12,9 +12,9 @@ #include "ui/base/dragdrop/drop_target.h" class InterstitialDropTarget; -class RenderViewHost; namespace content { +class RenderViewHost; class WebContents; class WebDragDestDelegate; } @@ -62,7 +62,7 @@ class CONTENT_EXPORT WebDragDest : public ui::DropTarget { // during a drag, we need to re-send the DragEnter message. WARNING: // this pointer should never be dereferenced. We only use it for comparing // pointers. - RenderViewHost* current_rvh_; + content::RenderViewHost* current_rvh_; // Used to determine what cursor we should display when dragging over web // content area. This can be updated async during a drag operation. diff --git a/content/browser/tab_contents/web_drag_source_gtk.cc b/content/browser/tab_contents/web_drag_source_gtk.cc index f750db1..88a3928 100644 --- a/content/browser/tab_contents/web_drag_source_gtk.cc +++ b/content/browser/tab_contents/web_drag_source_gtk.cc @@ -29,10 +29,11 @@ #include "ui/gfx/gtk_util.h" #include "webkit/glue/webdropdata.h" +using content::RenderViewHostImpl; +using content::WebContents; using WebKit::WebDragOperation; using WebKit::WebDragOperationsMask; using WebKit::WebDragOperationNone; -using content::WebContents; namespace content { diff --git a/content/browser/tab_contents/web_drag_source_gtk.h b/content/browser/tab_contents/web_drag_source_gtk.h index 83ea99d..929c84d 100644 --- a/content/browser/tab_contents/web_drag_source_gtk.h +++ b/content/browser/tab_contents/web_drag_source_gtk.h @@ -20,12 +20,12 @@ #include "ui/gfx/native_widget_types.h" #include "ui/gfx/point.h" -class RenderViewHostImpl; class SkBitmap; struct WebDropData; namespace content { +class RenderViewHostImpl; class WebContents; // WebDragSourceGtk takes care of managing the drag from a WebContents @@ -59,7 +59,7 @@ class CONTENT_EXPORT WebDragSourceGtk : public MessageLoopForUI::Observer { CHROMEGTK_CALLBACK_1(WebDragSourceGtk, gboolean, OnDragIconExpose, GdkEventExpose*); - RenderViewHostImpl* GetRenderViewHost() const; + content::RenderViewHostImpl* GetRenderViewHost() const; gfx::NativeView GetContentNativeView() const; // The tab we're manging the drag for. diff --git a/content/browser/tab_contents/web_drag_source_mac.mm b/content/browser/tab_contents/web_drag_source_mac.mm index dd78e12..68f4696 100644 --- a/content/browser/tab_contents/web_drag_source_mac.mm +++ b/content/browser/tab_contents/web_drag_source_mac.mm @@ -32,6 +32,7 @@ using base::SysNSStringToUTF8; using base::SysUTF8ToNSString; using base::SysUTF16ToNSString; using content::BrowserThread; +using content::RenderViewHostImpl; using net::FileStream; namespace { diff --git a/content/browser/tab_contents/web_drag_source_win.h b/content/browser/tab_contents/web_drag_source_win.h index 06580c2..68316b6 100644 --- a/content/browser/tab_contents/web_drag_source_win.h +++ b/content/browser/tab_contents/web_drag_source_win.h @@ -13,9 +13,8 @@ #include "ui/gfx/native_widget_types.h" #include "ui/gfx/point.h" -class RenderViewHost; - namespace content { +class RenderViewHost; class WebContents; } @@ -58,7 +57,7 @@ class WebDragSource : public ui::DragSource, // We use this as a channel to the renderer to tell it about various drag // drop events that it needs to know about (such as when a drag operation it // initiated terminates). - RenderViewHost* render_view_host_; + content::RenderViewHost* render_view_host_; content::NotificationRegistrar registrar_; diff --git a/content/browser/webui/web_ui_impl.cc b/content/browser/webui/web_ui_impl.cc index 9beb557..4c83d0e 100644 --- a/content/browser/webui/web_ui_impl.cc +++ b/content/browser/webui/web_ui_impl.cc @@ -20,6 +20,7 @@ #include "content/public/common/bindings_policy.h" #include "ui/base/ui_base_switches.h" +using content::RenderViewHostImpl; using content::WebContents; using content::WebUIController; using content::WebUIMessageHandler; @@ -96,7 +97,7 @@ void WebUIImpl::OnWebUISend(const GURL& source_url, } } -void WebUIImpl::RenderViewCreated(RenderViewHost* render_view_host) { +void WebUIImpl::RenderViewCreated(content::RenderViewHost* render_view_host) { controller_->RenderViewCreated(render_view_host); // Do not attempt to set the toolkit property if WebUI is not enabled, e.g., diff --git a/content/browser/webui/web_ui_impl.h b/content/browser/webui/web_ui_impl.h index eef3948..28b7360 100644 --- a/content/browser/webui/web_ui_impl.h +++ b/content/browser/webui/web_ui_impl.h @@ -12,7 +12,9 @@ #include "content/public/browser/web_ui.h" #include "ipc/ipc_channel.h" +namespace content { class RenderViewHost; +} class CONTENT_EXPORT WebUIImpl : public content::WebUI, public IPC::Channel::Listener { @@ -23,7 +25,7 @@ class CONTENT_EXPORT WebUIImpl : public content::WebUI, // Called by TabContents when the RenderView is first created. This is *not* // called for every page load because in some cases RenderViewHostManager will // reuse RenderView instances. - void RenderViewCreated(RenderViewHost* render_view_host); + void RenderViewCreated(content::RenderViewHost* render_view_host); // WebUI implementation: virtual content::WebContents* GetWebContents() const OVERRIDE; diff --git a/content/browser/worker_host/worker_process_host.cc b/content/browser/worker_host/worker_process_host.cc index 1d3bd75..6932785 100644 --- a/content/browser/worker_host/worker_process_host.cc +++ b/content/browser/worker_host/worker_process_host.cc @@ -54,6 +54,7 @@ using content::BrowserThread; using content::ChildProcessData; using content::ChildProcessHost; +using content::RenderViewHostImpl; using content::ResourceContext; using content::UserMetricsAction; using content::WorkerDevToolsManager; diff --git a/content/port/browser/render_widget_host_view_port.h b/content/port/browser/render_widget_host_view_port.h index a82fd03..471c427 100644 --- a/content/port/browser/render_widget_host_view_port.h +++ b/content/port/browser/render_widget_host_view_port.h @@ -48,7 +48,7 @@ class CONTENT_EXPORT RenderWidgetHostViewPort : public RenderWidgetHostView { // Like RenderWidgetHostView::CreateViewForWidget, with cast. static RenderWidgetHostViewPort* CreateViewForWidget( - RenderWidgetHost* widget); + content::RenderWidgetHost* widget); // Perform all the initialization steps necessary for this object to represent // a popup (such as a <select> dropdown), then shows the popup at |pos|. diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h index cca6ae2..1441efd 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -21,7 +21,6 @@ class CommandLine; class FilePath; class GURL; class PluginProcessHost; -class RenderViewHost; class ResourceDispatcherHost; class SkBitmap; struct WebPreferences; @@ -66,6 +65,7 @@ class BrowserMainParts; class RenderProcessHost; class QuotaPermissionContext; class ResourceContext; +class RenderViewHost; class SiteInstance; class SpeechInputManagerDelegate; class WebContents; @@ -98,7 +98,8 @@ class ContentBrowserClient { virtual WebContentsView* CreateWebContentsView(WebContents* web_contents) = 0; // Notifies that a new RenderHostView has been created. - virtual void RenderViewHostCreated(RenderViewHost* render_view_host) = 0; + virtual void RenderViewHostCreated( + content::RenderViewHost* render_view_host) = 0; // Notifies that a RenderProcessHost has been created. This is called before // the content layer adds its own BrowserMessageFilters, so that the @@ -352,27 +353,27 @@ class ContentBrowserClient { // Called by WebContents to override the WebKit preferences that are used by // the renderer. The content layer will add its own settings, and then it's up // to the embedder to update it if it wants. - virtual void OverrideWebkitPrefs(RenderViewHost* render_view_host, + virtual void OverrideWebkitPrefs(content::RenderViewHost* render_view_host, const GURL& url, WebPreferences* prefs) = 0; // Inspector setting was changed and should be persisted. - virtual void UpdateInspectorSetting(RenderViewHost* rvh, + virtual void UpdateInspectorSetting(content::RenderViewHost* rvh, const std::string& key, const std::string& value) = 0; // Clear the Inspector settings. - virtual void ClearInspectorSettings(RenderViewHost* rvh) = 0; + virtual void ClearInspectorSettings(content::RenderViewHost* rvh) = 0; // Notifies that BrowserURLHandler has been created, so that the embedder can // optionally add their own handlers. virtual void BrowserURLHandlerCreated(BrowserURLHandler* handler) = 0; // Clears browser cache. - virtual void ClearCache(RenderViewHost* rvh) = 0; + virtual void ClearCache(content::RenderViewHost* rvh) = 0; // Clears browser cookies. - virtual void ClearCookies(RenderViewHost* rvh) = 0; + virtual void ClearCookies(content::RenderViewHost* rvh) = 0; // Returns the default download directory. // This can be called on any thread. diff --git a/content/public/browser/devtools_agent_host_registry.h b/content/public/browser/devtools_agent_host_registry.h index 404a5cb..147c3bd 100644 --- a/content/public/browser/devtools_agent_host_registry.h +++ b/content/public/browser/devtools_agent_host_registry.h @@ -8,11 +8,10 @@ #include "content/common/content_export.h" -class RenderViewHost; - namespace content { class DevToolsAgentHost; +class RenderViewHost; class WebContents; class CONTENT_EXPORT DevToolsAgentHostRegistry { @@ -22,7 +21,8 @@ class CONTENT_EXPORT DevToolsAgentHostRegistry { static DevToolsAgentHost* GetDevToolsAgentHost(RenderViewHost* rvh); // Returns render view host instance for given |agent_host|. - static RenderViewHost* GetRenderViewHost(DevToolsAgentHost* agent_host); + static RenderViewHost* GetRenderViewHost( + DevToolsAgentHost* agent_host); // Returns true iff an instance of DevToolsAgentHost for the |rvh| // does exist. diff --git a/content/public/browser/devtools_client_host.h b/content/public/browser/devtools_client_host.h index 29d23ad..19ca75a 100644 --- a/content/public/browser/devtools_client_host.h +++ b/content/public/browser/devtools_client_host.h @@ -15,10 +15,9 @@ namespace IPC { class Message; } -class RenderViewHost; - namespace content { +class RenderViewHost; class WebContents; class DevToolsFrontendHostDelegate; diff --git a/content/public/browser/interstitial_page.h b/content/public/browser/interstitial_page.h index 0e9a101..a8479f3 100644 --- a/content/public/browser/interstitial_page.h +++ b/content/public/browser/interstitial_page.h @@ -9,7 +9,6 @@ #include "content/common/content_export.h" class GURL; -class RenderViewHost; namespace gfx { class Size; @@ -18,6 +17,7 @@ class Size; namespace content { class InterstitialPageDelegate; +class RenderViewHost; class WebContents; // This class is used for showing interstitial pages, pages that show some diff --git a/content/public/browser/render_view_host.h b/content/public/browser/render_view_host.h index df7f6ad..ea98983 100644 --- a/content/public/browser/render_view_host.h +++ b/content/public/browser/render_view_host.h @@ -18,13 +18,6 @@ class GURL; struct WebDropData; struct WebPreferences; -namespace content { -class RenderViewHostDelegate; -class SessionStorageNamespace; -class SiteInstance; -struct CustomContextMenuContext; -} - namespace gfx { class Point; } @@ -35,6 +28,13 @@ struct WebMediaPlayerAction; struct WebPluginAction; } +namespace content { + +class RenderViewHostDelegate; +class SessionStorageNamespace; +class SiteInstance; +struct CustomContextMenuContext; + // A RenderViewHost is responsible for creating and talking to a RenderView // object in a child process. It exposes a high level API to users, for things // like loading pages, adjusting the display and other browser functionality, @@ -46,8 +46,6 @@ struct WebPluginAction; // The intent of this interface is to provide a view-agnostic communication // conduit with a renderer. This is so we can build HTML views not only as // TabContents (see TabContents for an example) but also as views, etc. -// -// TODO(joi): Move to content namespace. class CONTENT_EXPORT RenderViewHost : virtual public RenderWidgetHost { public: // Returns the RenderViewHost given its ID and the ID of its render process. @@ -142,7 +140,7 @@ class CONTENT_EXPORT RenderViewHost : virtual public RenderWidgetHost { // Executes custom context menu action that was provided from WebKit. virtual void ExecuteCustomContextMenuCommand( - int action, const content::CustomContextMenuContext& context) = 0; + int action, const CustomContextMenuContext& context) = 0; // Tells the renderer to perform the given action on the media player // located at the given point. @@ -177,7 +175,7 @@ class CONTENT_EXPORT RenderViewHost : virtual public RenderWidgetHost { // Notifies the renderer that the user has closed the FindInPage window // (and what action to take regarding the selection). - virtual void StopFinding(content::StopFindAction action) = 0; + virtual void StopFinding(StopFindAction action) = 0; // Causes the renderer to invoke the onbeforeunload event handler. The // result will be returned via ViewMsg_ShouldClose. See also ClosePage and @@ -195,15 +193,15 @@ class CONTENT_EXPORT RenderViewHost : virtual public RenderWidgetHost { virtual void FilesSelectedInChooser(const std::vector<FilePath>& files, int permissions) = 0; - virtual content::RenderViewHostDelegate* GetDelegate() const = 0; + virtual RenderViewHostDelegate* GetDelegate() const = 0; // Returns a bitwise OR of bindings types that have been enabled for this // RenderView. See BindingsPolicy for details. virtual int GetEnabledBindings() const = 0; - virtual content::SessionStorageNamespace* GetSessionStorageNamespace() = 0; + virtual SessionStorageNamespace* GetSessionStorageNamespace() = 0; - virtual content::SiteInstance* GetSiteInstance() const = 0; + virtual SiteInstance* GetSiteInstance() const = 0; // Requests the renderer to evaluate an xpath to a frame and insert css // into that frame's document. @@ -216,7 +214,7 @@ class CONTENT_EXPORT RenderViewHost : virtual public RenderWidgetHost { // Let the renderer know that the menu has been closed. virtual void NotifyContextMenuClosed( - const content::CustomContextMenuContext& context) = 0; + const CustomContextMenuContext& context) = 0; // Notification that a move or resize renderer's containing window has // started. @@ -237,7 +235,7 @@ class CONTENT_EXPORT RenderViewHost : virtual public RenderWidgetHost { virtual void SetZoomLevel(double level) = 0; // Changes the zoom level for the current main frame. - virtual void Zoom(content::PageZoom zoom) = 0; + virtual void Zoom(PageZoom zoom) = 0; // Send the renderer process the current preferences supplied by the // RenderViewHostDelegate. @@ -249,5 +247,6 @@ class CONTENT_EXPORT RenderViewHost : virtual public RenderWidgetHost { virtual void UpdateWebkitPreferences(const WebPreferences& prefs) = 0; }; +} // namespace content #endif // CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_ diff --git a/content/public/browser/render_view_host_delegate.h b/content/public/browser/render_view_host_delegate.h index 3a41689..bb3701e 100644 --- a/content/public/browser/render_view_host_delegate.h +++ b/content/public/browser/render_view_host_delegate.h @@ -23,7 +23,6 @@ #include "webkit/glue/window_open_disposition.h" class GURL; -class RenderViewHost; class SkBitmap; class TabContents; class WebKeyboardEvent; @@ -47,6 +46,7 @@ class Size; namespace content { class BrowserContext; +class RenderViewHost; class WebContents; struct ContextMenuParams; struct FileChooserParams; diff --git a/content/public/browser/render_view_host_observer.h b/content/public/browser/render_view_host_observer.h index 1c87dce..a6a1734 100644 --- a/content/public/browser/render_view_host_observer.h +++ b/content/public/browser/render_view_host_observer.h @@ -10,11 +10,12 @@ #include "content/common/content_export.h" class GURL; -class RenderViewHost; -class RenderViewHostImpl; namespace content { +class RenderViewHost; +class RenderViewHostImpl; + // An observer API implemented by classes which want to filter IPC messages from // RenderViewHost. class CONTENT_EXPORT RenderViewHostObserver : public IPC::Channel::Listener, @@ -49,7 +50,7 @@ class CONTENT_EXPORT RenderViewHostObserver : public IPC::Channel::Listener, int routing_id() { return routing_id_; } private: - friend class ::RenderViewHostImpl; + friend class RenderViewHostImpl; // Invoked from RenderViewHost. Invokes RenderViewHostDestroyed and NULL out // |render_view_host_|. diff --git a/content/public/browser/render_widget_host.h b/content/public/browser/render_widget_host.h index a6206de..72846b7 100644 --- a/content/public/browser/render_widget_host.h +++ b/content/public/browser/render_widget_host.h @@ -21,13 +21,6 @@ #include "skia/ext/platform_device.h" #endif -class RenderWidgetHostImpl; - -namespace content { -class RenderProcessHost; -class RenderWidgetHostView; -} - namespace gfx { class Rect; } @@ -36,6 +29,12 @@ namespace skia { class PlatformCanvas; } +namespace content { + +class RenderProcessHost; +class RenderWidgetHostImpl; +class RenderWidgetHostView; + // A RenderWidgetHost manages the browser side of a browser<->renderer // HWND connection. The HWND lives in the browser process, and // windows events are sent over IPC to the corresponding object in the @@ -206,7 +205,7 @@ class CONTENT_EXPORT RenderWidgetHost : public IPC::Channel::Sender { virtual const gfx::Point& GetLastScrollOffset() const = 0; - virtual content::RenderProcessHost* GetProcess() const = 0; + virtual RenderProcessHost* GetProcess() const = 0; virtual int GetRoutingID() const = 0; @@ -214,7 +213,7 @@ class CONTENT_EXPORT RenderWidgetHost : public IPC::Channel::Sender { // RenderWidget is being destroyed or the render process crashed. You should // never cache this pointer since it can become NULL if the renderer crashes, // instead you should always ask for it using the accessor. - virtual content::RenderWidgetHostView* GetView() const = 0; + virtual RenderWidgetHostView* GetView() const = 0; // Returns true if this is a RenderViewHost, false if not. virtual bool IsRenderView() const = 0; @@ -295,4 +294,6 @@ class CONTENT_EXPORT RenderWidgetHost : public IPC::Channel::Sender { virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; }; +} // namespace content + #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ diff --git a/content/public/browser/render_widget_host_view.h b/content/public/browser/render_widget_host_view.h index 3ca9b92..db457db 100644 --- a/content/public/browser/render_widget_host_view.h +++ b/content/public/browser/render_widget_host_view.h @@ -17,7 +17,6 @@ #include "ui/gfx/native_widget_types.h" class BrowserAccessibilityManager; -class RenderWidgetHost; namespace gfx { class Rect; @@ -26,6 +25,8 @@ class Size; namespace content { +class RenderWidgetHost; + // RenderWidgetHostView is an interface implemented by an object that acts as // the "View" portion of a RenderWidgetHost. The RenderWidgetHost and its // associated RenderProcessHost own the "Model" in this case which is the diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h index 655ec2e..f73813b 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h @@ -18,8 +18,6 @@ #include "ui/gfx/native_widget_types.h" #include "webkit/glue/window_open_disposition.h" -class RenderViewHost; - namespace base { class PropertyBag; class TimeTicks; @@ -40,6 +38,7 @@ class BrowserContext; class InterstitialPage; class NavigationController; class RenderProcessHost; +class RenderViewHost; class RenderWidgetHostView; class SessionStorageNamespace; class SiteInstance; diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h index 8303525..fe6dffa 100644 --- a/content/public/browser/web_contents_observer.h +++ b/content/public/browser/web_contents_observer.h @@ -12,11 +12,11 @@ #include "ipc/ipc_channel.h" #include "webkit/glue/window_open_disposition.h" -class RenderViewHost; class TabContents; namespace content { +class RenderViewHost; class WebContents; struct FrameNavigateParams; struct LoadCommittedDetails; diff --git a/content/public/browser/web_contents_view.h b/content/public/browser/web_contents_view.h index 8bfc1cc..f89148c 100644 --- a/content/public/browser/web_contents_view.h +++ b/content/public/browser/web_contents_view.h @@ -15,12 +15,12 @@ #include "ui/gfx/rect.h" #include "ui/gfx/size.h" -class RenderViewHost; -class RenderWidgetHost; class TabContents; namespace content { +class RenderViewHost; +class RenderWidgetHost; class RenderWidgetHostView; // The WebContentsView is an interface that is implemented by the platform- diff --git a/content/public/browser/web_contents_view_mac_delegate.h b/content/public/browser/web_contents_view_mac_delegate.h index 6f41994..8ad568b 100644 --- a/content/public/browser/web_contents_view_mac_delegate.h +++ b/content/public/browser/web_contents_view_mac_delegate.h @@ -8,11 +8,11 @@ #import <Cocoa/Cocoa.h> -class RenderWidgetHost; @protocol RenderWidgetHostViewMacDelegate; namespace content { +class RenderWidgetHost; class WebDragDestDelegate; struct ContextMenuParams; diff --git a/content/public/browser/web_ui_controller.h b/content/public/browser/web_ui_controller.h index b785f1e..bee5339 100644 --- a/content/public/browser/web_ui_controller.h +++ b/content/public/browser/web_ui_controller.h @@ -11,7 +11,6 @@ #include "content/common/content_export.h" class GURL; -class RenderViewHost; namespace base { class ListValue; @@ -19,6 +18,7 @@ class ListValue; namespace content { +class RenderViewHost; class WebUI; // A WebUI page is controller by the embedder's WebUIController object. It diff --git a/content/test/js_injection_ready_observer.h b/content/test/js_injection_ready_observer.h index 8daf7d8..76370b5 100644 --- a/content/test/js_injection_ready_observer.h +++ b/content/test/js_injection_ready_observer.h @@ -6,7 +6,9 @@ #define CONTENT_TEST_JS_INJECTION_READY_OBSERVER_H_ #pragma once +namespace content { class RenderViewHost; +} // Interface to notify when JavaScript injection is possible. class JsInjectionReadyObserver { @@ -14,7 +16,8 @@ class JsInjectionReadyObserver { // Called to indicate page entry committed and ready for JavaScript // injection. |render_view_host| may be used to route injection messages to // the appropriate RenderView. - virtual void OnJsInjectionReady(RenderViewHost* render_view_host) = 0; + virtual void OnJsInjectionReady( + content::RenderViewHost* render_view_host) = 0; protected: virtual ~JsInjectionReadyObserver() {} diff --git a/content/test/test_navigation_observer.cc b/content/test/test_navigation_observer.cc index aadff92..6cd9fa8 100644 --- a/content/test/test_navigation_observer.cc +++ b/content/test/test_navigation_observer.cc @@ -16,7 +16,7 @@ class TestNavigationObserver::RVHOSendJS : public content::RenderViewHostObserver { public: - RVHOSendJS(RenderViewHost* render_view_host, + RVHOSendJS(content::RenderViewHost* render_view_host, JsInjectionReadyObserver* js_injection_ready_observer) : content::RenderViewHostObserver(render_view_host), js_injection_ready_observer_(js_injection_ready_observer) { @@ -113,7 +113,7 @@ void TestNavigationObserver::Observe( break; case content::NOTIFICATION_RENDER_VIEW_HOST_CREATED: rvho_send_js_.reset(new RVHOSendJS( - content::Source<RenderViewHost>(source).ptr(), + content::Source<content::RenderViewHost>(source).ptr(), js_injection_ready_observer_)); break; default: diff --git a/content/test/test_web_contents_view.cc b/content/test/test_web_contents_view.cc index 7e1a6d4..52b5e32 100644 --- a/content/test/test_web_contents_view.cc +++ b/content/test/test_web_contents_view.cc @@ -38,7 +38,7 @@ void TestWebContentsView::ShowCreatedFullscreenWidget(int route_id) { } void TestWebContentsView::ShowContextMenu( - const content::ContextMenuParams& params) { + const ContextMenuParams& params) { } void TestWebContentsView::ShowPopupMenu(const gfx::Rect& bounds, diff --git a/content/test/test_web_contents_view.h b/content/test/test_web_contents_view.h index bd9c04b..facf4d2 100644 --- a/content/test/test_web_contents_view.h +++ b/content/test/test_web_contents_view.h @@ -30,8 +30,7 @@ class TestWebContentsView : public WebContentsView { virtual void ShowCreatedWidget(int route_id, const gfx::Rect& initial_pos) OVERRIDE; virtual void ShowCreatedFullscreenWidget(int route_id) OVERRIDE; - virtual void ShowContextMenu( - const content::ContextMenuParams& params) OVERRIDE; + virtual void ShowContextMenu(const ContextMenuParams& params) OVERRIDE; virtual void ShowPopupMenu(const gfx::Rect& bounds, int item_height, double item_font_size, |