summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/app_menu_model.cc1
-rw-r--r--chrome/browser/automation/automation_provider.cc6
-rw-r--r--chrome/browser/automation/automation_provider_win.cc1
-rw-r--r--chrome/browser/browser.cc1
-rw-r--r--chrome/browser/browser_browsertest.cc1
-rw-r--r--chrome/browser/browser_theme_pack_unittest.cc2
-rw-r--r--chrome/browser/child_process_security_policy_browser_test.cc4
-rw-r--r--chrome/browser/cocoa/autocomplete_text_field_editor.mm1
-rw-r--r--chrome/browser/cocoa/browser_window_controller.mm18
-rw-r--r--chrome/browser/cocoa/find_bar_cocoa_controller.mm1
-rw-r--r--chrome/browser/cocoa/html_dialog_window_controller.mm1
-rw-r--r--chrome/browser/cocoa/hung_renderer_controller.mm10
-rw-r--r--chrome/browser/cocoa/tab_contents_controller.mm1
-rw-r--r--chrome/browser/debugger/debugger_remote_service.cc1
-rw-r--r--chrome/browser/debugger/devtools_window.cc1
-rw-r--r--chrome/browser/dom_ui/dom_ui.cc1
-rw-r--r--chrome/browser/download/download_manager.cc4
-rw-r--r--chrome/browser/download/save_package.cc8
-rw-r--r--chrome/browser/extensions/crx_installer.cc1
-rw-r--r--chrome/browser/extensions/extension_apitest.cc1
-rw-r--r--chrome/browser/extensions/extension_processes_api.cc2
-rw-r--r--chrome/browser/extensions/extension_startup_unittest.cc1
-rw-r--r--chrome/browser/extensions/extension_toolbar_model_unittest.cc1
-rw-r--r--chrome/browser/extensions/user_script_listener_unittest.cc1
-rw-r--r--chrome/browser/extensions/user_script_master.h3
-rw-r--r--chrome/browser/external_tab_container.cc1
-rw-r--r--chrome/browser/form_field_history_manager.cc1
-rw-r--r--chrome/browser/gtk/browser_window_gtk.cc1
-rw-r--r--chrome/browser/gtk/find_bar_gtk.cc1
-rw-r--r--chrome/browser/gtk/html_dialog_gtk.cc1
-rw-r--r--chrome/browser/gtk/hung_renderer_dialog_gtk.cc10
-rw-r--r--chrome/browser/gtk/tab_contents_drag_source.cc1
-rw-r--r--chrome/browser/gtk/tabs/dragged_tab_gtk.cc1
-rw-r--r--chrome/browser/memory_details.cc1
-rw-r--r--chrome/browser/password_manager/password_form_manager_unittest.cc1
-rw-r--r--chrome/browser/password_manager/password_manager.cc1
-rw-r--r--chrome/browser/plugin_installer.cc1
-rw-r--r--chrome/browser/renderer_host/test/web_cache_manager_browsertest.cc4
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc2
-rw-r--r--chrome/browser/search_engines/template_url_model_unittest.cc1
-rw-r--r--chrome/browser/sessions/tab_restore_service_unittest.cc3
-rw-r--r--chrome/browser/ssl/ssl_blocking_page.cc1
-rw-r--r--chrome/browser/sync/glue/bookmark_model_associator.cc1
-rw-r--r--chrome/browser/sync/profile_sync_service.h3
-rwxr-xr-xchrome/browser/sync/sync_setup_flow.cc1
-rw-r--r--chrome/browser/sync/sync_setup_wizard.cc1
-rw-r--r--chrome/browser/sync/sync_ui_util.cc1
-rw-r--r--chrome/browser/tab_contents/interstitial_page.cc1
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu.cc1
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu_gtk.cc12
-rw-r--r--chrome/browser/tab_contents/render_view_host_delegate_helper.cc2
-rw-r--r--chrome/browser/tab_contents/render_view_host_manager.cc6
-rw-r--r--chrome/browser/tab_contents/render_view_host_manager.h8
-rw-r--r--chrome/browser/tab_contents/render_view_host_manager_unittest.cc2
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc45
-rw-r--r--chrome/browser/tab_contents/tab_contents.h23
-rw-r--r--chrome/browser/tab_contents/tab_contents_view.cc3
-rw-r--r--chrome/browser/tab_contents/tab_contents_view_gtk.cc15
-rw-r--r--chrome/browser/tab_contents/tab_contents_view_mac.mm6
-rw-r--r--chrome/browser/tab_contents/test_tab_contents.cc8
-rw-r--r--chrome/browser/tab_contents/test_tab_contents.h6
-rw-r--r--chrome/browser/tab_contents/web_drag_dest_gtk.cc1
-rw-r--r--chrome/browser/tabs/tab_strip_model.cc2
-rw-r--r--chrome/browser/tabs/tab_strip_model_unittest.cc7
-rw-r--r--chrome/browser/task_manager_resource_providers.cc13
-rw-r--r--chrome/browser/views/bookmark_bar_view.cc1
-rw-r--r--chrome/browser/views/bookmark_menu_controller_views.cc1
-rw-r--r--chrome/browser/views/browser_actions_container.cc1
-rw-r--r--chrome/browser/views/dom_view.cc1
-rw-r--r--chrome/browser/views/hung_renderer_view.cc8
-rw-r--r--chrome/browser/views/options/content_page_view.cc1
-rw-r--r--chrome/browser/views/tab_contents/tab_contents_view_win.cc14
-rw-r--r--chrome/browser/views/tabs/tab_overview_controller.cc5
-rw-r--r--chrome/browser/views/tabs/tab_strip.cc1
74 files changed, 196 insertions, 110 deletions
diff --git a/chrome/browser/app_menu_model.cc b/chrome/browser/app_menu_model.cc
index dd5ce6a..8a9bc5a 100644
--- a/chrome/browser/app_menu_model.cc
+++ b/chrome/browser/app_menu_model.cc
@@ -11,6 +11,7 @@
#include "chrome/app/chrome_dll_resource.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/defaults.h"
+#include "chrome/browser/profile.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/sync_ui_util.h"
#include "chrome/common/chrome_switches.h"
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index 82bd20b..8cef80a 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -37,6 +37,7 @@
#include "chrome/browser/extensions/crx_installer.h"
#include "chrome/browser/extensions/extension_install_ui.h"
#include "chrome/browser/extensions/extension_message_service.h"
+#include "chrome/browser/extensions/user_script_master.h"
#include "chrome/browser/find_bar.h"
#include "chrome/browser/find_bar_controller.h"
#include "chrome/browser/find_notification_details.h"
@@ -1073,8 +1074,9 @@ void AutomationProvider::GetTabProcessID(int handle, int* process_id) {
*process_id = 0;
TabContents* tab_contents =
tab_tracker_->GetResource(handle)->tab_contents();
- if (tab_contents->process())
- *process_id = base::GetProcId(tab_contents->process()->GetHandle());
+ RenderProcessHost* rph = tab_contents->GetRenderProcessHost();
+ if (rph)
+ *process_id = base::GetProcId(rph->GetHandle());
}
}
diff --git a/chrome/browser/automation/automation_provider_win.cc b/chrome/browser/automation/automation_provider_win.cc
index 6069708..d5457e9 100644
--- a/chrome/browser/automation/automation_provider_win.cc
+++ b/chrome/browser/automation/automation_provider_win.cc
@@ -8,6 +8,7 @@
#include "chrome/browser/automation/ui_controls.h"
#include "chrome/browser/browser_window.h"
#include "chrome/browser/external_tab_container.h"
+#include "chrome/browser/profile.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/views/bookmark_bar_view.h"
#include "chrome/test/automation/automation_messages.h"
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index 6884979..9fa5078 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -49,6 +49,7 @@
#include "chrome/browser/net/url_fixer_upper.h"
#include "chrome/browser/options_window.h"
#include "chrome/browser/profile.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/renderer_host/site_instance.h"
#include "chrome/browser/sessions/session_service.h"
#include "chrome/browser/sessions/session_types.h"
diff --git a/chrome/browser/browser_browsertest.cc b/chrome/browser/browser_browsertest.cc
index 723e175..fcd063d 100644
--- a/chrome/browser/browser_browsertest.cc
+++ b/chrome/browser/browser_browsertest.cc
@@ -16,6 +16,7 @@
#include "chrome/browser/js_modal_dialog.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/renderer_host/render_process_host.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension.h"
diff --git a/chrome/browser/browser_theme_pack_unittest.cc b/chrome/browser/browser_theme_pack_unittest.cc
index 1885a30..3068248 100644
--- a/chrome/browser/browser_theme_pack_unittest.cc
+++ b/chrome/browser/browser_theme_pack_unittest.cc
@@ -8,11 +8,13 @@
#include "app/theme_provider.h"
#include "base/file_util.h"
#include "base/json/json_reader.h"
+#include "base/message_loop.h"
#include "base/path_service.h"
#include "base/scoped_temp_dir.h"
#include "base/values.h"
#include "chrome/browser/theme_resources_util.h"
#include "chrome/browser/browser_theme_provider.h"
+#include "chrome/browser/chrome_thread.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/json_value_serializer.h"
#include "grit/theme_resources.h"
diff --git a/chrome/browser/child_process_security_policy_browser_test.cc b/chrome/browser/child_process_security_policy_browser_test.cc
index 7bd8d5c..c5475af 100644
--- a/chrome/browser/child_process_security_policy_browser_test.cc
+++ b/chrome/browser/child_process_security_policy_browser_test.cc
@@ -39,8 +39,8 @@ IN_PROC_BROWSER_TEST_F(ChildProcessSecurityPolicyInProcessBrowserTest, NoLeak) {
TabContents* tab = browser()->GetTabContentsAt(0);
ASSERT_TRUE(tab != NULL);
- base::KillProcess(
- tab->process()->GetHandle(), base::PROCESS_END_KILLED_BY_USER, true);
+ base::KillProcess(tab->GetRenderProcessHost()->GetHandle(),
+ base::PROCESS_END_KILLED_BY_USER, true);
tab->controller().Reload(true);
EXPECT_EQ(
diff --git a/chrome/browser/cocoa/autocomplete_text_field_editor.mm b/chrome/browser/cocoa/autocomplete_text_field_editor.mm
index 96bbfa8..6b200f8 100644
--- a/chrome/browser/cocoa/autocomplete_text_field_editor.mm
+++ b/chrome/browser/cocoa/autocomplete_text_field_editor.mm
@@ -17,6 +17,7 @@
#import "chrome/browser/cocoa/toolbar_controller.h"
#include "chrome/browser/extensions/extensions_service.h"
#include "chrome/common/extensions/extension_action.h"
+#include "chrome/browser/profile.h"
class Extension;
diff --git a/chrome/browser/cocoa/browser_window_controller.mm b/chrome/browser/cocoa/browser_window_controller.mm
index d7058e9..bba182d 100644
--- a/chrome/browser/cocoa/browser_window_controller.mm
+++ b/chrome/browser/cocoa/browser_window_controller.mm
@@ -511,7 +511,7 @@ willPositionSheet:(NSWindow*)sheet
// We need to activate the controls (in the "WebView"). To do this, get the
// selected TabContents's RenderWidgetHostViewMac and tell it to activate.
if (TabContents* contents = browser_->GetSelectedTabContents()) {
- if (RenderWidgetHostView* rwhv = contents->render_widget_host_view())
+ if (RenderWidgetHostView* rwhv = contents->GetRenderWidgetHostView())
rwhv->SetActive(true);
}
}
@@ -528,7 +528,7 @@ willPositionSheet:(NSWindow*)sheet
// We need to deactivate the controls (in the "WebView"). To do this, get the
// selected TabContents's RenderWidgetHostView and tell it to deactivate.
if (TabContents* contents = browser_->GetSelectedTabContents()) {
- if (RenderWidgetHostView* rwhv = contents->render_widget_host_view())
+ if (RenderWidgetHostView* rwhv = contents->GetRenderWidgetHostView())
rwhv->SetActive(false);
}
}
@@ -537,7 +537,7 @@ willPositionSheet:(NSWindow*)sheet
- (void)windowDidMiniaturize:(NSNotification *)notification {
// Let the selected RenderWidgetHostView know, so that it can tell plugins.
if (TabContents* contents = browser_->GetSelectedTabContents()) {
- if (RenderWidgetHostView* rwhv = contents->render_widget_host_view())
+ if (RenderWidgetHostView* rwhv = contents->GetRenderWidgetHostView())
rwhv->SetWindowVisibility(false);
}
}
@@ -546,7 +546,7 @@ willPositionSheet:(NSWindow*)sheet
- (void)windowDidDeminiaturize:(NSNotification *)notification {
// Let the selected RenderWidgetHostView know, so that it can tell plugins.
if (TabContents* contents = browser_->GetSelectedTabContents()) {
- if (RenderWidgetHostView* rwhv = contents->render_widget_host_view())
+ if (RenderWidgetHostView* rwhv = contents->GetRenderWidgetHostView())
rwhv->SetWindowVisibility(true);
}
}
@@ -557,7 +557,7 @@ willPositionSheet:(NSWindow*)sheet
// (unless we are minimized, in which case nothing has really changed).
if (![[self window] isMiniaturized]) {
if (TabContents* contents = browser_->GetSelectedTabContents()) {
- if (RenderWidgetHostView* rwhv = contents->render_widget_host_view())
+ if (RenderWidgetHostView* rwhv = contents->GetRenderWidgetHostView())
rwhv->SetWindowVisibility(false);
}
}
@@ -569,7 +569,7 @@ willPositionSheet:(NSWindow*)sheet
// (unless we are minimized, in which case nothing has really changed).
if (![[self window] isMiniaturized]) {
if (TabContents* contents = browser_->GetSelectedTabContents()) {
- if (RenderWidgetHostView* rwhv = contents->render_widget_host_view())
+ if (RenderWidgetHostView* rwhv = contents->GetRenderWidgetHostView())
rwhv->SetWindowVisibility(true);
}
}
@@ -1704,7 +1704,7 @@ willPositionSheet:(NSWindow*)sheet
// Let the selected RenderWidgetHostView know, so that it can tell plugins.
if (TabContents* contents = browser_->GetSelectedTabContents()) {
- if (RenderWidgetHostView* rwhv = contents->render_widget_host_view())
+ if (RenderWidgetHostView* rwhv = contents->GetRenderWidgetHostView())
rwhv->WindowFrameChanged();
}
}
@@ -1747,7 +1747,7 @@ willPositionSheet:(NSWindow*)sheet
// Let the selected RenderWidgetHostView know, so that it can tell plugins.
if (TabContents* contents = browser_->GetSelectedTabContents()) {
- if (RenderWidgetHostView* rwhv = contents->render_widget_host_view())
+ if (RenderWidgetHostView* rwhv = contents->GetRenderWidgetHostView())
rwhv->WindowFrameChanged();
}
}
@@ -2137,7 +2137,7 @@ willPositionSheet:(NSWindow*)sheet
// If the relayout shifts the content area up or down, let the renderer know.
if (contentShifted) {
if (TabContents* contents = browser_->GetSelectedTabContents()) {
- if (RenderWidgetHostView* rwhv = contents->render_widget_host_view())
+ if (RenderWidgetHostView* rwhv = contents->GetRenderWidgetHostView())
rwhv->WindowFrameChanged();
}
}
diff --git a/chrome/browser/cocoa/find_bar_cocoa_controller.mm b/chrome/browser/cocoa/find_bar_cocoa_controller.mm
index c78a1bc..8c5a0ab 100644
--- a/chrome/browser/cocoa/find_bar_cocoa_controller.mm
+++ b/chrome/browser/cocoa/find_bar_cocoa_controller.mm
@@ -15,6 +15,7 @@
#import "chrome/browser/cocoa/find_pasteboard.h"
#import "chrome/browser/cocoa/focus_tracker.h"
#import "chrome/browser/cocoa/tab_strip_controller.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h"
diff --git a/chrome/browser/cocoa/html_dialog_window_controller.mm b/chrome/browser/cocoa/html_dialog_window_controller.mm
index ab13e52..c07d0c0 100644
--- a/chrome/browser/cocoa/html_dialog_window_controller.mm
+++ b/chrome/browser/cocoa/html_dialog_window_controller.mm
@@ -15,6 +15,7 @@
#include "chrome/browser/dom_ui/html_dialog_tab_contents_delegate.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/tab_contents/tab_contents.h"
+#include "ipc/ipc_message.h"
// Thin bridge that routes notifications to
// HtmlDialogWindowController's member variables.
diff --git a/chrome/browser/cocoa/hung_renderer_controller.mm b/chrome/browser/cocoa/hung_renderer_controller.mm
index db68bd1..36c9441 100644
--- a/chrome/browser/cocoa/hung_renderer_controller.mm
+++ b/chrome/browser/cocoa/hung_renderer_controller.mm
@@ -15,6 +15,7 @@
#include "chrome/browser/hung_renderer_dialog.h"
#import "chrome/browser/cocoa/multi_key_equivalent_button.h"
#include "chrome/browser/renderer_host/render_process_host.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/logging_chrome.h"
#include "chrome/common/result_codes.h"
@@ -80,8 +81,8 @@ HungRendererController* g_instance = NULL;
- (IBAction)kill:(id)sender {
if (hungContents_)
- base::KillProcess(hungContents_->process()->GetHandle(), ResultCodes::HUNG,
- false);
+ base::KillProcess(hungContents_->GetRenderProcessHost()->GetHandle(),
+ ResultCodes::HUNG, false);
// Cannot call performClose:, because the close button is disabled.
[self close];
}
@@ -135,7 +136,7 @@ HungRendererController* g_instance = NULL;
scoped_nsobject<NSMutableArray> titles([[NSMutableArray alloc] init]);
scoped_nsobject<NSMutableArray> favicons([[NSMutableArray alloc] init]);
for (TabContentsIterator it; !it.done(); ++it) {
- if (it->process() == hungContents_->process()) {
+ if (it->GetRenderProcessHost() == hungContents_->GetRenderProcessHost()) {
const string16 title = (*it)->GetTitle();
if (title.empty()) {
[titles addObject:
@@ -166,7 +167,8 @@ HungRendererController* g_instance = NULL;
- (void)endForTabContents:(TabContents*)contents {
DCHECK(contents);
DCHECK(hungContents_);
- if (hungContents_ && hungContents_->process() == contents->process()) {
+ if (hungContents_ && hungContents_->GetRenderProcessHost() ==
+ contents->GetRenderProcessHost()) {
// Cannot call performClose:, because the close button is disabled.
[self close];
}
diff --git a/chrome/browser/cocoa/tab_contents_controller.mm b/chrome/browser/cocoa/tab_contents_controller.mm
index 70daa32..59dda16 100644
--- a/chrome/browser/cocoa/tab_contents_controller.mm
+++ b/chrome/browser/cocoa/tab_contents_controller.mm
@@ -8,6 +8,7 @@
#include "base/sys_string_conversions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
diff --git a/chrome/browser/debugger/debugger_remote_service.cc b/chrome/browser/debugger/debugger_remote_service.cc
index 8f941ca..91fca90 100644
--- a/chrome/browser/debugger/debugger_remote_service.cc
+++ b/chrome/browser/debugger/debugger_remote_service.cc
@@ -16,6 +16,7 @@
#include "chrome/browser/debugger/devtools_protocol_handler.h"
#include "chrome/browser/debugger/devtools_remote_message.h"
#include "chrome/browser/debugger/inspectable_tab_proxy.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/devtools_messages.h"
#include "chrome/common/render_messages.h"
diff --git a/chrome/browser/debugger/devtools_window.cc b/chrome/browser/debugger/devtools_window.cc
index 3de0d5a..aa1e638 100644
--- a/chrome/browser/debugger/devtools_window.cc
+++ b/chrome/browser/debugger/devtools_window.cc
@@ -11,6 +11,7 @@
#include "chrome/browser/debugger/devtools_manager.h"
#include "chrome/browser/debugger/devtools_window.h"
#include "chrome/browser/profile.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/tab_contents/navigation_controller.h"
#include "chrome/browser/tab_contents/navigation_entry.h"
#include "chrome/browser/tab_contents/tab_contents.h"
diff --git a/chrome/browser/dom_ui/dom_ui.cc b/chrome/browser/dom_ui/dom_ui.cc
index 5017a9f..f874dab 100644
--- a/chrome/browser/dom_ui/dom_ui.cc
+++ b/chrome/browser/dom_ui/dom_ui.cc
@@ -11,6 +11,7 @@
#include "base/values.h"
#include "chrome/browser/browser_theme_provider.h"
#include "chrome/browser/profile.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tab_contents/tab_contents_view.h"
#include "chrome/common/bindings_policy.h"
diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc
index 252b43c..1248d94 100644
--- a/chrome/browser/download/download_manager.cc
+++ b/chrome/browser/download/download_manager.cc
@@ -1205,7 +1205,7 @@ void DownloadManager::DownloadUrl(const GURL& url,
referrer,
referrer_charset,
FilePath(),
- tab_contents->process()->id(),
+ tab_contents->GetRenderProcessHost()->id(),
tab_contents->render_view_host()->routing_id(),
request_context_getter_);
}
@@ -1220,7 +1220,7 @@ void DownloadManager::DownloadUrlToFile(const GURL& url,
referrer,
referrer_charset,
save_file_path,
- tab_contents->process()->id(),
+ tab_contents->GetRenderProcessHost()->id(),
tab_contents->render_view_host()->routing_id(),
request_context_getter_);
}
diff --git a/chrome/browser/download/save_package.cc b/chrome/browser/download/save_package.cc
index 446022d..3f45115 100644
--- a/chrome/browser/download/save_package.cc
+++ b/chrome/browser/download/save_package.cc
@@ -163,7 +163,7 @@ SavePackage::SavePackage(TabContents* web_content,
save_type_(save_type),
all_save_items_count_(0),
wait_state_(INITIALIZE),
- tab_id_(web_content->process()->id()),
+ tab_id_(web_content->GetRenderProcessHost()->id()),
ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)) {
DCHECK(web_content);
const GURL& current_page_url = tab_contents_->GetURL();
@@ -188,7 +188,7 @@ SavePackage::SavePackage(TabContents* tab_contents)
save_type_(SAVE_TYPE_UNKNOWN),
all_save_items_count_(0),
wait_state_(INITIALIZE),
- tab_id_(tab_contents->process()->id()),
+ tab_id_(tab_contents->GetRenderProcessHost()->id()),
ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)) {
const GURL& current_page_url = tab_contents_->GetURL();
DCHECK(current_page_url.is_valid());
@@ -625,7 +625,7 @@ void SavePackage::CheckFinish() {
&SaveFileManager::RenameAllFiles,
final_names,
dir,
- tab_contents_->process()->id(),
+ tab_contents_->GetRenderProcessHost()->id(),
tab_contents_->render_view_host()->routing_id()));
}
@@ -773,7 +773,7 @@ void SavePackage::SaveNextFile(bool process_all_remaining_items) {
save_item->Start();
file_manager_->SaveURL(save_item->url(),
save_item->referrer(),
- tab_contents_->process()->id(),
+ tab_contents_->GetRenderProcessHost()->id(),
tab_contents_->render_view_host()->routing_id(),
save_item->save_source(),
save_item->full_path(),
diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc
index 7549eb2..e9874cd 100644
--- a/chrome/browser/extensions/crx_installer.cc
+++ b/chrome/browser/extensions/crx_installer.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/extensions/convert_user_script.h"
#include "chrome/browser/extensions/extension_file_util.h"
+#include "chrome/browser/profile.h"
#include "chrome/browser/shell_integration.h"
#include "chrome/browser/web_applications/web_app.h"
#include "chrome/common/extensions/extension_error_reporter.h"
diff --git a/chrome/browser/extensions/extension_apitest.cc b/chrome/browser/extensions/extension_apitest.cc
index 498e437..25eff22 100644
--- a/chrome/browser/extensions/extension_apitest.cc
+++ b/chrome/browser/extensions/extension_apitest.cc
@@ -6,6 +6,7 @@
#include "chrome/browser/browser.h"
#include "chrome/browser/extensions/extensions_service.h"
+#include "chrome/browser/profile.h"
#include "chrome/common/notification_registrar.h"
#include "chrome/test/ui_test_utils.h"
diff --git a/chrome/browser/extensions/extension_processes_api.cc b/chrome/browser/extensions/extension_processes_api.cc
index 3330cdd..8495d9d 100644
--- a/chrome/browser/extensions/extension_processes_api.cc
+++ b/chrome/browser/extensions/extension_processes_api.cc
@@ -28,7 +28,7 @@ bool GetProcessForTabFunction::RunImpl() {
&contents, &tab_index))
return false;
- int process_id = contents->process()->id();
+ int process_id = contents->GetRenderProcessHost()->id();
result_.reset(CreateProcessValue(process_id));
return true;
}
diff --git a/chrome/browser/extensions/extension_startup_unittest.cc b/chrome/browser/extensions/extension_startup_unittest.cc
index 2ec4701..ad043df 100644
--- a/chrome/browser/extensions/extension_startup_unittest.cc
+++ b/chrome/browser/extensions/extension_startup_unittest.cc
@@ -10,6 +10,7 @@
#include "base/path_service.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/extensions/extensions_service.h"
+#include "chrome/browser/extensions/user_script_master.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/chrome_paths.h"
diff --git a/chrome/browser/extensions/extension_toolbar_model_unittest.cc b/chrome/browser/extensions/extension_toolbar_model_unittest.cc
index 068df03..79b9efb 100644
--- a/chrome/browser/extensions/extension_toolbar_model_unittest.cc
+++ b/chrome/browser/extensions/extension_toolbar_model_unittest.cc
@@ -6,6 +6,7 @@
#include "chrome/browser/extensions/extension_browsertest.h"
#include "chrome/browser/extensions/extension_toolbar_model.h"
#include "chrome/browser/extensions/extensions_service.h"
+#include "chrome/browser/profile.h"
#include "chrome/test/in_process_browser_test.h"
// An InProcessBrowserTest for testing the ExtensionToolbarModel.
diff --git a/chrome/browser/extensions/user_script_listener_unittest.cc b/chrome/browser/extensions/user_script_listener_unittest.cc
index 82a8880..4d08553 100644
--- a/chrome/browser/extensions/user_script_listener_unittest.cc
+++ b/chrome/browser/extensions/user_script_listener_unittest.cc
@@ -9,6 +9,7 @@
#include "base/thread.h"
#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/extensions/extensions_service.h"
+#include "chrome/browser/extensions/user_script_master.h"
#include "chrome/browser/renderer_host/resource_dispatcher_host.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_plugin_lib.h"
diff --git a/chrome/browser/extensions/user_script_master.h b/chrome/browser/extensions/user_script_master.h
index 645e91d..0423305 100644
--- a/chrome/browser/extensions/user_script_master.h
+++ b/chrome/browser/extensions/user_script_master.h
@@ -9,7 +9,6 @@
#include "base/scoped_ptr.h"
#include "base/shared_memory.h"
#include "chrome/browser/chrome_thread.h"
-#include "chrome/browser/profile.h"
#include "chrome/common/extensions/user_script.h"
#include "chrome/common/notification_registrar.h"
#include "testing/gtest/include/gtest/gtest_prod.h"
@@ -18,6 +17,8 @@ namespace base {
class StringPiece;
}
+class Profile;
+
// Manages a segment of shared memory that contains the user scripts the user
// has installed. Lives on the UI thread.
class UserScriptMaster : public base::RefCountedThreadSafe<UserScriptMaster>,
diff --git a/chrome/browser/external_tab_container.cc b/chrome/browser/external_tab_container.cc
index 993411c..2f9b334 100644
--- a/chrome/browser/external_tab_container.cc
+++ b/chrome/browser/external_tab_container.cc
@@ -19,6 +19,7 @@
#include "chrome/browser/page_info_window.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/renderer_host/render_process_host.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h"
#include "chrome/browser/tab_contents/provisional_load_details.h"
#include "chrome/browser/views/tab_contents/render_view_context_menu_external_win.h"
diff --git a/chrome/browser/form_field_history_manager.cc b/chrome/browser/form_field_history_manager.cc
index 40901c9..861b8f0 100644
--- a/chrome/browser/form_field_history_manager.cc
+++ b/chrome/browser/form_field_history_manager.cc
@@ -8,6 +8,7 @@
#include "base/string_util.h"
#include "chrome/browser/profile.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc
index 6bbc700..c3bf87b 100644
--- a/chrome/browser/gtk/browser_window_gtk.cc
+++ b/chrome/browser/gtk/browser_window_gtk.cc
@@ -68,6 +68,7 @@
#include "chrome/browser/gtk/toolbar_star_toggle_gtk.h"
#include "chrome/browser/location_bar.h"
#include "chrome/browser/page_info_window.h"
+#include "chrome/browser/profile.h"
#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/renderer_host/render_widget_host_view_gtk.h"
#include "chrome/browser/tab_contents/tab_contents.h"
diff --git a/chrome/browser/gtk/find_bar_gtk.cc b/chrome/browser/gtk/find_bar_gtk.cc
index 8cf46c2..9a9ff9c 100644
--- a/chrome/browser/gtk/find_bar_gtk.cc
+++ b/chrome/browser/gtk/find_bar_gtk.cc
@@ -23,6 +23,7 @@
#include "chrome/browser/gtk/tab_contents_container_gtk.h"
#include "chrome/browser/gtk/tabs/tab_strip_gtk.h"
#include "chrome/browser/gtk/view_id_util.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/gtk_util.h"
#include "chrome/common/notification_service.h"
diff --git a/chrome/browser/gtk/html_dialog_gtk.cc b/chrome/browser/gtk/html_dialog_gtk.cc
index c48b1f0..a303a07 100644
--- a/chrome/browser/gtk/html_dialog_gtk.cc
+++ b/chrome/browser/gtk/html_dialog_gtk.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/gtk/tab_contents_container_gtk.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/gtk_util.h"
+#include "ipc/ipc_message.h"
// static
void HtmlDialogGtk::ShowHtmlDialogGtk(Browser* browser,
diff --git a/chrome/browser/gtk/hung_renderer_dialog_gtk.cc b/chrome/browser/gtk/hung_renderer_dialog_gtk.cc
index e10757a..0c0c97b 100644
--- a/chrome/browser/gtk/hung_renderer_dialog_gtk.cc
+++ b/chrome/browser/gtk/hung_renderer_dialog_gtk.cc
@@ -12,6 +12,7 @@
#include "base/process_util.h"
#include "chrome/browser/browser_list.h"
#include "chrome/browser/renderer_host/render_process_host.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/gtk_util.h"
#include "chrome/common/logging_chrome.h"
@@ -149,7 +150,7 @@ void HungRendererDialogGtk::ShowForTabContents(TabContents* hung_contents) {
GtkTreeIter tree_iter;
for (TabContentsIterator it; !it.done(); ++it) {
- if (it->process() == hung_contents->process()) {
+ if (it->GetRenderProcessHost() == hung_contents->GetRenderProcessHost()) {
gtk_list_store_append(model_, &tree_iter);
std::string title = UTF16ToUTF8(it->GetTitle());
if (title.empty())
@@ -169,7 +170,8 @@ void HungRendererDialogGtk::ShowForTabContents(TabContents* hung_contents) {
void HungRendererDialogGtk::EndForTabContents(TabContents* contents) {
DCHECK(contents);
- if (contents_ && contents_->process() == contents->process()) {
+ if (contents_ && contents_->GetRenderProcessHost() ==
+ contents->GetRenderProcessHost()) {
gtk_widget_hide(GTK_WIDGET(dialog_));
// Since we're closing, we no longer need this TabContents.
contents_ = NULL;
@@ -183,8 +185,8 @@ void HungRendererDialogGtk::OnDialogResponse(gint response_id) {
switch (response_id) {
case kKillPagesButtonResponse:
// Kill the process.
- base::KillProcess(contents_->process()->GetHandle(), ResultCodes::HUNG,
- false);
+ base::KillProcess(contents_->GetRenderProcessHost()->GetHandle(),
+ ResultCodes::HUNG, false);
break;
case GTK_RESPONSE_OK:
diff --git a/chrome/browser/gtk/tab_contents_drag_source.cc b/chrome/browser/gtk/tab_contents_drag_source.cc
index 2371d78..15b111c 100644
--- a/chrome/browser/gtk/tab_contents_drag_source.cc
+++ b/chrome/browser/gtk/tab_contents_drag_source.cc
@@ -7,6 +7,7 @@
#include "app/gtk_dnd_util.h"
#include "base/mime_util.h"
#include "base/string_util.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/renderer_host/render_view_host_delegate.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tab_contents/tab_contents_view.h"
diff --git a/chrome/browser/gtk/tabs/dragged_tab_gtk.cc b/chrome/browser/gtk/tabs/dragged_tab_gtk.cc
index afaedea..6cbae72 100644
--- a/chrome/browser/gtk/tabs/dragged_tab_gtk.cc
+++ b/chrome/browser/gtk/tabs/dragged_tab_gtk.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/browser_theme_provider.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/renderer_host/backing_store_x.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/gtk/tabs/tab_renderer_gtk.h"
diff --git a/chrome/browser/memory_details.cc b/chrome/browser/memory_details.cc
index 4c7e2fb..1649fe5 100644
--- a/chrome/browser/memory_details.cc
+++ b/chrome/browser/memory_details.cc
@@ -11,6 +11,7 @@
#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/renderer_host/backing_store_manager.h"
#include "chrome/browser/renderer_host/render_process_host.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/tab_contents/navigation_entry.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/child_process_host.h"
diff --git a/chrome/browser/password_manager/password_form_manager_unittest.cc b/chrome/browser/password_manager/password_form_manager_unittest.cc
index b3f4bb6..f2e9061 100644
--- a/chrome/browser/password_manager/password_form_manager_unittest.cc
+++ b/chrome/browser/password_manager/password_form_manager_unittest.cc
@@ -4,6 +4,7 @@
#include "testing/gtest/include/gtest/gtest.h"
+#include "base/string_util.h"
#include "chrome/browser/password_manager/password_form_manager.h"
#include "chrome/browser/password_manager/password_manager.h"
#include "chrome/browser/profile_manager.h"
diff --git a/chrome/browser/password_manager/password_manager.cc b/chrome/browser/password_manager/password_manager.cc
index da00ed7..94c2bb8 100644
--- a/chrome/browser/password_manager/password_manager.cc
+++ b/chrome/browser/password_manager/password_manager.cc
@@ -10,6 +10,7 @@
#include "base/string_util.h"
#include "chrome/browser/password_manager/password_form_manager.h"
#include "chrome/browser/profile.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/notification_registrar.h"
#include "chrome/common/notification_service.h"
diff --git a/chrome/browser/plugin_installer.cc b/chrome/browser/plugin_installer.cc
index f2859de..4bbe22c 100644
--- a/chrome/browser/plugin_installer.cc
+++ b/chrome/browser/plugin_installer.cc
@@ -7,6 +7,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "base/string_util.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
diff --git a/chrome/browser/renderer_host/test/web_cache_manager_browsertest.cc b/chrome/browser/renderer_host/test/web_cache_manager_browsertest.cc
index 18718f0..b32ffd8 100644
--- a/chrome/browser/renderer_host/test/web_cache_manager_browsertest.cc
+++ b/chrome/browser/renderer_host/test/web_cache_manager_browsertest.cc
@@ -29,8 +29,8 @@ IN_PROC_BROWSER_TEST_F(WebCacheManagerBrowserTest, DISABLED_CrashOnceOnly) {
TabContents* tab = browser()->GetTabContentsAt(0);
ASSERT_TRUE(tab != NULL);
- base::KillProcess(
- tab->process()->GetHandle(), base::PROCESS_END_KILLED_BY_USER, true);
+ base::KillProcess(tab->GetRenderProcessHost()->GetHandle(),
+ base::PROCESS_END_KILLED_BY_USER, true);
browser()->SelectTabContentsAt(0, true);
browser()->NewTab();
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 ea41f26..cc55d3b 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
@@ -153,7 +153,7 @@ class SafeBrowsingBlockingPageTest : public RenderViewHostTestHarness,
resource->url = url;
resource->resource_type = resource_type;
resource->threat_type = SafeBrowsingService::URL_MALWARE;
- resource->render_process_host_id = contents_->process()->id();
+ resource->render_process_host_id = contents_->GetRenderProcessHost()->id();
resource->render_view_id = contents_->render_view_host()->routing_id();
}
diff --git a/chrome/browser/search_engines/template_url_model_unittest.cc b/chrome/browser/search_engines/template_url_model_unittest.cc
index 7845421..1b6f7ae 100644
--- a/chrome/browser/search_engines/template_url_model_unittest.cc
+++ b/chrome/browser/search_engines/template_url_model_unittest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/path_service.h"
+#include "base/string_util.h"
#include "base/thread.h"
#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/history/history_notifications.h"
diff --git a/chrome/browser/sessions/tab_restore_service_unittest.cc b/chrome/browser/sessions/tab_restore_service_unittest.cc
index b288024..19f1056 100644
--- a/chrome/browser/sessions/tab_restore_service_unittest.cc
+++ b/chrome/browser/sessions/tab_restore_service_unittest.cc
@@ -4,13 +4,12 @@
#include "chrome/browser/renderer_host/test/test_render_view_host.h"
#include "chrome/browser/sessions/session_types.h"
+#include "chrome/browser/sessions/session_service.h"
#include "chrome/browser/sessions/tab_restore_service.h"
#include "chrome/browser/tab_contents/navigation_entry.h"
#include "chrome/test/testing_profile.h"
#include "testing/gtest/include/gtest/gtest.h"
-
-
// Create subclass that overrides TimeNow so that we can control the time used
// for closed tabs and windows.
class TabRestoreTimeFactory : public TabRestoreService::TimeFactory {
diff --git a/chrome/browser/ssl/ssl_blocking_page.cc b/chrome/browser/ssl/ssl_blocking_page.cc
index c443600..2622402 100644
--- a/chrome/browser/ssl/ssl_blocking_page.cc
+++ b/chrome/browser/ssl/ssl_blocking_page.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/cert_store.h"
#include "chrome/browser/dom_operation_notification_details.h"
#include "chrome/browser/renderer_host/render_process_host.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/ssl/ssl_cert_error_handler.h"
#include "chrome/browser/ssl/ssl_error_info.h"
#include "chrome/browser/tab_contents/navigation_controller.h"
diff --git a/chrome/browser/sync/glue/bookmark_model_associator.cc b/chrome/browser/sync/glue/bookmark_model_associator.cc
index d6ad0ab..975ae8e 100644
--- a/chrome/browser/sync/glue/bookmark_model_associator.cc
+++ b/chrome/browser/sync/glue/bookmark_model_associator.cc
@@ -10,6 +10,7 @@
#include "base/message_loop.h"
#include "base/task.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
+#include "chrome/browser/profile.h"
#include "chrome/browser/sync/engine/syncapi.h"
#include "chrome/browser/sync/glue/bookmark_change_processor.h"
#include "chrome/browser/sync/profile_sync_service.h"
diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h
index 0d0ca2a..33be503 100644
--- a/chrome/browser/sync/profile_sync_service.h
+++ b/chrome/browser/sync/profile_sync_service.h
@@ -13,15 +13,14 @@
#include "base/file_path.h"
#include "base/observer_list.h"
#include "base/scoped_ptr.h"
-#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/google_service_auth_error.h"
-#include "chrome/browser/profile.h"
#include "chrome/browser/sync/glue/change_processor.h"
#include "chrome/browser/sync/glue/model_associator.h"
#include "chrome/browser/sync/glue/sync_backend_host.h"
#include "chrome/browser/sync/sync_setup_wizard.h"
#include "chrome/common/notification_registrar.h"
#include "googleurl/src/gurl.h"
+#include "testing/gtest/include/gtest/gtest_prod.h"
class CommandLine;
class MessageLoop;
diff --git a/chrome/browser/sync/sync_setup_flow.cc b/chrome/browser/sync/sync_setup_flow.cc
index 5c4b3d5..3029fb5 100755
--- a/chrome/browser/sync/sync_setup_flow.cc
+++ b/chrome/browser/sync/sync_setup_flow.cc
@@ -18,6 +18,7 @@
#include "chrome/browser/cocoa/html_dialog_window_controller_cppsafe.h"
#endif
#include "chrome/browser/google_service_auth_error.h"
+#include "chrome/browser/profile.h"
#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/tab_contents/tab_contents.h"
diff --git a/chrome/browser/sync/sync_setup_wizard.cc b/chrome/browser/sync/sync_setup_wizard.cc
index 1faf61f..bcc22845 100644
--- a/chrome/browser/sync/sync_setup_wizard.cc
+++ b/chrome/browser/sync/sync_setup_wizard.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/dom_ui/chrome_url_data_manager.h"
#include "chrome/browser/google_util.h"
+#include "chrome/browser/profile.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/sync_setup_flow.h"
#include "chrome/common/jstemplate_builder.h"
diff --git a/chrome/browser/sync/sync_ui_util.cc b/chrome/browser/sync/sync_ui_util.cc
index 5edd4db..1c20d0b 100644
--- a/chrome/browser/sync/sync_ui_util.cc
+++ b/chrome/browser/sync/sync_ui_util.cc
@@ -7,6 +7,7 @@
#include "app/l10n_util.h"
#include "base/string_util.h"
#include "chrome/browser/google_service_auth_error.h"
+#include "chrome/browser/profile.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/options_window.h"
#include "grit/chromium_strings.h"
diff --git a/chrome/browser/tab_contents/interstitial_page.cc b/chrome/browser/tab_contents/interstitial_page.cc
index 217ec0d..442b5e5 100644
--- a/chrome/browser/tab_contents/interstitial_page.cc
+++ b/chrome/browser/tab_contents/interstitial_page.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/dom_operation_notification_details.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/renderer_host/render_process_host.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/renderer_host/render_widget_host_view.h"
#include "chrome/browser/renderer_host/resource_dispatcher_host.h"
#include "chrome/browser/renderer_host/site_instance.h"
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc
index a9cc073..35768eb 100644
--- a/chrome/browser/tab_contents/render_view_context_menu.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc
@@ -19,6 +19,7 @@
#include "chrome/browser/net/browser_url_util.h"
#include "chrome/browser/page_info_window.h"
#include "chrome/browser/profile.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/search_versus_navigate_classifier.h"
#include "chrome/browser/search_engines/template_url_model.h"
#include "chrome/browser/spellcheck_host.h"
diff --git a/chrome/browser/tab_contents/render_view_context_menu_gtk.cc b/chrome/browser/tab_contents/render_view_context_menu_gtk.cc
index 470173b..f335e14 100644
--- a/chrome/browser/tab_contents/render_view_context_menu_gtk.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu_gtk.cc
@@ -28,14 +28,15 @@ void RenderViewContextMenuGtk::DoInit() {
gtk_menu_.reset(new MenuGtk(this, menu_.data()));
RenderWidgetHostViewGtk* rwhv = static_cast<RenderWidgetHostViewGtk*>(
- source_tab_contents_->render_widget_host_view());
+ source_tab_contents_->GetRenderWidgetHostView());
if (rwhv)
rwhv->AppendInputMethodsContextMenu(gtk_menu_.get());
}
void RenderViewContextMenuGtk::Popup(const gfx::Point& point) {
- if (source_tab_contents_->render_widget_host_view())
- source_tab_contents_->render_widget_host_view()->ShowingContextMenu(true);
+ RenderWidgetHostView* rwhv = source_tab_contents_->GetRenderWidgetHostView();
+ if (rwhv)
+ rwhv->ShowingContextMenu(true);
gtk_menu_->PopupAsContextAt(triggering_event_time_, point);
}
@@ -61,8 +62,9 @@ std::string RenderViewContextMenuGtk::GetLabel(int id) const {
}
void RenderViewContextMenuGtk::StoppedShowing() {
- if (source_tab_contents_->render_widget_host_view())
- source_tab_contents_->render_widget_host_view()->ShowingContextMenu(false);
+ RenderWidgetHostView* rwhv = source_tab_contents_->GetRenderWidgetHostView();
+ if (rwhv)
+ rwhv->ShowingContextMenu(false);
}
void RenderViewContextMenuGtk::AppendMenuItem(int id) {
diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
index 13f95b2..6ff76ee 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
@@ -67,7 +67,7 @@ TabContents* RenderViewHostDelegateViewHelper::GetCreatedWindow(int route_id) {
pending_contents_.erase(route_id);
if (!new_tab_contents->render_view_host()->view() ||
- !new_tab_contents->process()->HasConnection()) {
+ !new_tab_contents->GetRenderProcessHost()->HasConnection()) {
// The view has gone away or the renderer crashed. Nothing to do.
return NULL;
}
diff --git a/chrome/browser/tab_contents/render_view_host_manager.cc b/chrome/browser/tab_contents/render_view_host_manager.cc
index 6fec169..fd5057f 100644
--- a/chrome/browser/tab_contents/render_view_host_manager.cc
+++ b/chrome/browser/tab_contents/render_view_host_manager.cc
@@ -63,6 +63,12 @@ void RenderViewHostManager::Init(Profile* profile,
Details<RenderViewHost>(render_view_host_));
}
+RenderWidgetHostView* RenderViewHostManager::GetRenderWidgetHostView() const {
+ if (!render_view_host_)
+ return NULL;
+ return render_view_host_->view();
+}
+
RenderViewHost* RenderViewHostManager::Navigate(const NavigationEntry& entry) {
// Create a pending RenderViewHost. It will give us the one we should use
RenderViewHost* dest_render_view_host = UpdateRendererStateForNavigate(entry);
diff --git a/chrome/browser/tab_contents/render_view_host_manager.h b/chrome/browser/tab_contents/render_view_host_manager.h
index 3040ac7..4aa9351 100644
--- a/chrome/browser/tab_contents/render_view_host_manager.h
+++ b/chrome/browser/tab_contents/render_view_host_manager.h
@@ -7,7 +7,6 @@
#include "base/basictypes.h"
#include "base/scoped_ptr.h"
-#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/renderer_host/render_view_host_delegate.h"
#include "chrome/common/notification_registrar.h"
#include "chrome/common/notification_observer.h"
@@ -18,6 +17,7 @@ class NavigationController;
class NavigationEntry;
class Profile;
class RenderWidgetHostView;
+class RenderViewHost;
class SiteInstance;
// Manages RenderViewHosts for a TabContents. Normally there is only one and
@@ -86,11 +86,7 @@ class RenderViewHostManager
// Returns the view associated with the current RenderViewHost, or NULL if
// there is no current one.
- RenderWidgetHostView* current_view() const {
- if (!render_view_host_)
- return NULL;
- return render_view_host_->view();
- }
+ RenderWidgetHostView* GetRenderWidgetHostView() const;
// Returns the pending render view host, or NULL if there is no pending one.
RenderViewHost* pending_render_view_host() const {
diff --git a/chrome/browser/tab_contents/render_view_host_manager_unittest.cc b/chrome/browser/tab_contents/render_view_host_manager_unittest.cc
index 1cf4e42..6e2c9cd 100644
--- a/chrome/browser/tab_contents/render_view_host_manager_unittest.cc
+++ b/chrome/browser/tab_contents/render_view_host_manager_unittest.cc
@@ -144,7 +144,7 @@ TEST_F(RenderViewHostManagerTest, Init) {
ASSERT_TRUE(host);
EXPECT_TRUE(instance == host->site_instance());
EXPECT_TRUE(&tab_contents == host->delegate());
- EXPECT_TRUE(manager.current_view());
+ EXPECT_TRUE(manager.GetRenderWidgetHostView());
EXPECT_FALSE(manager.pending_render_view_host());
}
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index ebc370b..db631f6 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -44,6 +44,7 @@
#include "chrome/browser/plugin_installer.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/renderer_host/render_process_host.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/renderer_host/render_widget_host_view.h"
#include "chrome/browser/renderer_host/resource_request_details.h"
#include "chrome/browser/renderer_host/site_instance.h"
@@ -454,6 +455,10 @@ PluginInstaller* TabContents::GetPluginInstaller() {
return plugin_installer_.get();
}
+RenderProcessHost* TabContents::GetRenderProcessHost() const {
+ return render_manager_.current_host()->process();
+}
+
void TabContents::SetAppExtension(Extension* extension) {
DCHECK(!extension || extension->IsApp());
app_extension_ = extension;
@@ -508,7 +513,7 @@ void TabContents::UpdateMaxPageID(int32 page_id) {
// testing.
if (GetSiteInstance())
GetSiteInstance()->UpdateMaxPageID(page_id);
- process()->UpdateMaxPageID(page_id);
+ GetRenderProcessHost()->UpdateMaxPageID(page_id);
}
SiteInstance* TabContents::GetSiteInstance() const {
@@ -633,14 +638,15 @@ void TabContents::NotifyNavigationStateChanged(unsigned changed_flags) {
void TabContents::DidBecomeSelected() {
controller_.SetActive(true);
- if (render_widget_host_view()) {
- render_widget_host_view()->DidBecomeSelected();
+ RenderWidgetHostView* rwhv = GetRenderWidgetHostView();
+ if (rwhv) {
+ rwhv->DidBecomeSelected();
#if defined(OS_MACOSX)
- render_widget_host_view()->SetActive(true);
+ rwhv->SetActive(true);
#endif
}
- WebCacheManager::GetInstance()->ObserveActivity(process()->id());
+ WebCacheManager::GetInstance()->ObserveActivity(GetRenderProcessHost()->id());
}
void TabContents::WasHidden() {
@@ -650,8 +656,9 @@ void TabContents::WasHidden() {
// is because closing the tab calls TabContents::Destroy(), which removes
// the |render_view_host()|; then when we actually destroy the window,
// OnWindowPosChanged() notices and calls HideContents() (which calls us).
- if (render_widget_host_view())
- render_widget_host_view()->WasHidden();
+ RenderWidgetHostView* rwhv = GetRenderWidgetHostView();
+ if (rwhv)
+ rwhv->WasHidden();
}
NotificationService::current()->Notify(
@@ -666,8 +673,9 @@ void TabContents::Activate() {
}
void TabContents::ShowContents() {
- if (render_widget_host_view())
- render_widget_host_view()->DidBecomeSelected();
+ RenderWidgetHostView* rwhv = GetRenderWidgetHostView();
+ if (rwhv)
+ rwhv->DidBecomeSelected();
}
void TabContents::HideContents() {
@@ -1197,6 +1205,20 @@ bool TabContents::IsActiveEntry(int32 page_id) {
active_entry->page_id() == page_id);
}
+void TabContents::override_encoding(const std::string& encoding) {
+ set_encoding(encoding);
+ render_view_host()->SetPageEncoding(encoding);
+}
+
+void TabContents::reset_override_encoding() {
+ reset_encoding();
+ render_view_host()->ResetPageEncodingToDefault();
+}
+
+void TabContents::WindowMoveOrResizeStarted() {
+ render_view_host()->WindowMoveOrResizeStarted();
+}
+
void TabContents::LogNewTabTime(const std::string& event_name) {
// Not all new tab pages get timed. In those cases, we don't have a
// new_tab_start_time_.
@@ -1834,7 +1856,7 @@ void TabContents::OnPageContents(const GURL& url,
}
NavigationEntry* entry = controller_.GetActiveEntry();
- if (process()->id() == renderer_process_id &&
+ if (GetRenderProcessHost()->id() == renderer_process_id &&
entry && entry->page_id() == page_id) {
entry->set_language(language);
}
@@ -1896,7 +1918,8 @@ void TabContents::DidLoadResourceFromMemoryCache(
&cert_id, &cert_status,
&security_bits);
LoadFromMemoryCacheDetails details(url, frame_origin, main_frame_origin,
- process()->id(), cert_id, cert_status);
+ GetRenderProcessHost()->id(), cert_id,
+ cert_status);
NotificationService::current()->Notify(
NotificationType::LOAD_FROM_MEMORY_CACHE,
diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h
index 97a2628..c8271c8 100644
--- a/chrome/browser/tab_contents/tab_contents.h
+++ b/chrome/browser/tab_contents/tab_contents.h
@@ -162,16 +162,14 @@ class TabContents : public PageNavigator,
// Return the currently active RenderProcessHost and RenderViewHost. Each of
// these may change over time.
- RenderProcessHost* process() const {
- return render_manager_.current_host()->process();
- }
+ RenderProcessHost* GetRenderProcessHost() const;
RenderViewHost* render_view_host() const {
return render_manager_.current_host();
}
// Returns the currently active RenderWidgetHostView. This may change over
// time and can be NULL (during setup and teardown).
- RenderWidgetHostView* render_widget_host_view() const {
- return render_manager_.current_view();
+ RenderWidgetHostView* GetRenderWidgetHostView() const {
+ return render_manager_.GetRenderWidgetHostView();
}
// The TabContentsView will never change and is guaranteed non-NULL.
@@ -604,20 +602,13 @@ class TabContents : public PageNavigator,
// the opposite of this, by which 'browser' is notified of
// the encoding of the current tab from 'renderer' (determined by
// auto-detect, http header, meta, bom detection, etc).
- void override_encoding(const std::string& encoding) {
- set_encoding(encoding);
- render_view_host()->SetPageEncoding(encoding);
- }
+ void override_encoding(const std::string& encoding);
+
// Remove any user-defined override encoding and reload by sending down
// ViewMsg_ResetPageEncodingToDefault to the renderer.
- void reset_override_encoding() {
- reset_encoding();
- render_view_host()->ResetPageEncodingToDefault();
- }
+ void reset_override_encoding();
- void WindowMoveOrResizeStarted() {
- render_view_host()->WindowMoveOrResizeStarted();
- }
+ void WindowMoveOrResizeStarted();
BlockedPopupContainer* blocked_popup_container() const {
return blocked_popups_;
diff --git a/chrome/browser/tab_contents/tab_contents_view.cc b/chrome/browser/tab_contents/tab_contents_view.cc
index 9b50bdb..4d25c33 100644
--- a/chrome/browser/tab_contents/tab_contents_view.cc
+++ b/chrome/browser/tab_contents/tab_contents_view.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/tab_contents/tab_contents_view.h"
#include "chrome/browser/renderer_host/render_process_host.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/renderer_host/render_widget_host.h"
#include "chrome/browser/renderer_host/render_widget_host_view.h"
#include "chrome/browser/tab_contents/tab_contents.h"
@@ -80,7 +81,7 @@ void TabContentsView::ShowCreatedWidgetInternal(
if (tab_contents_->delegate())
tab_contents_->delegate()->RenderWidgetShowing();
- widget_host_view->InitAsPopup(tab_contents_->render_widget_host_view(),
+ widget_host_view->InitAsPopup(tab_contents_->GetRenderWidgetHostView(),
initial_pos);
widget_host_view->GetRenderWidgetHost()->Init();
}
diff --git a/chrome/browser/tab_contents/tab_contents_view_gtk.cc b/chrome/browser/tab_contents/tab_contents_view_gtk.cc
index 6957566..bc0e6fc 100644
--- a/chrome/browser/tab_contents/tab_contents_view_gtk.cc
+++ b/chrome/browser/tab_contents/tab_contents_view_gtk.cc
@@ -195,9 +195,10 @@ gfx::NativeView TabContentsViewGtk::GetNativeView() const {
}
gfx::NativeView TabContentsViewGtk::GetContentNativeView() const {
- if (!tab_contents()->render_widget_host_view())
+ RenderWidgetHostView* rwhv = tab_contents()->GetRenderWidgetHostView();
+ if (!rwhv)
return NULL;
- return tab_contents()->render_widget_host_view()->GetNativeView();
+ return rwhv->GetNativeView();
}
gfx::NativeWindow TabContentsViewGtk::GetTopLevelNativeWindow() const {
@@ -239,8 +240,9 @@ void TabContentsViewGtk::SizeContents(const gfx::Size& size) {
// need to pass the sizing information on to the RWHV which will pass the
// sizing information on to the renderer.
requested_size_ = size;
- if (tab_contents()->render_widget_host_view())
- tab_contents()->render_widget_host_view()->SetSize(size);
+ RenderWidgetHostView* rwhv = tab_contents()->GetRenderWidgetHostView();
+ if (rwhv)
+ rwhv->SetSize(size);
}
void TabContentsViewGtk::Focus() {
@@ -363,8 +365,9 @@ void TabContentsViewGtk::OnSizeAllocate(GtkWidget* widget,
// We manually tell our RWHV to resize the renderer content. This avoids
// spurious resizes from GTK+.
- if (view->tab_contents()->render_widget_host_view())
- view->tab_contents()->render_widget_host_view()->SetSize(size);
+ RenderWidgetHostView* rwhv = view->tab_contents()->GetRenderWidgetHostView();
+ if (rwhv)
+ rwhv->SetSize(size);
if (view->tab_contents()->interstitial_page())
view->tab_contents()->interstitial_page()->SetSize(size);
}
diff --git a/chrome/browser/tab_contents/tab_contents_view_mac.mm b/chrome/browser/tab_contents/tab_contents_view_mac.mm
index c313493..4b6af63 100644
--- a/chrome/browser/tab_contents/tab_contents_view_mac.mm
+++ b/chrome/browser/tab_contents/tab_contents_view_mac.mm
@@ -17,6 +17,7 @@
#include "chrome/browser/cocoa/sad_tab_controller.h"
#import "chrome/browser/cocoa/web_drag_source.h"
#import "chrome/browser/cocoa/web_drop_target.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/renderer_host/render_view_host_factory.h"
#include "chrome/browser/renderer_host/render_widget_host.h"
#include "chrome/browser/renderer_host/render_widget_host_view_mac.h"
@@ -113,9 +114,10 @@ gfx::NativeView TabContentsViewMac::GetNativeView() const {
}
gfx::NativeView TabContentsViewMac::GetContentNativeView() const {
- if (!tab_contents()->render_widget_host_view())
+ RenderWidgetHostView* rwhv = tab_contents()->GetRenderWidgetHostView();
+ if (!rwhv)
return NULL;
- return tab_contents()->render_widget_host_view()->GetNativeView();
+ return rwhv->GetNativeView();
}
gfx::NativeWindow TabContentsViewMac::GetTopLevelNativeWindow() const {
diff --git a/chrome/browser/tab_contents/test_tab_contents.cc b/chrome/browser/tab_contents/test_tab_contents.cc
index 3724b8c..bd5eac4 100644
--- a/chrome/browser/tab_contents/test_tab_contents.cc
+++ b/chrome/browser/tab_contents/test_tab_contents.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/tab_contents/test_tab_contents.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/renderer_host/test/test_render_view_host.h"
TestTabContents::TestTabContents(Profile* profile, SiteInstance* instance)
@@ -16,6 +17,13 @@ TestRenderViewHost* TestTabContents::pending_rvh() {
render_manager_.pending_render_view_host_);
}
+bool TestTabContents::CreateRenderViewForRenderManager(
+ RenderViewHost* render_view_host) {
+ // This will go to a TestRenderViewHost.
+ render_view_host->CreateRenderView(profile()->GetRequestContext());
+ return true;
+}
+
TabContents* TestTabContents::Clone() {
TabContents* tc = new TestTabContents(
profile(), SiteInstance::CreateSiteInstance(profile()));
diff --git a/chrome/browser/tab_contents/test_tab_contents.h b/chrome/browser/tab_contents/test_tab_contents.h
index b626686..9ed1258 100644
--- a/chrome/browser/tab_contents/test_tab_contents.h
+++ b/chrome/browser/tab_contents/test_tab_contents.h
@@ -41,11 +41,7 @@ class TestTabContents : public TabContents {
}
// Prevent interaction with views.
- bool CreateRenderViewForRenderManager(RenderViewHost* render_view_host) {
- // This will go to a TestRenderViewHost.
- render_view_host->CreateRenderView(profile()->GetRequestContext());
- return true;
- }
+ bool CreateRenderViewForRenderManager(RenderViewHost* render_view_host);
void UpdateRenderViewSizeForRenderManager() {}
// Returns a clone of this TestTabContents. The returned object is also a
diff --git a/chrome/browser/tab_contents/web_drag_dest_gtk.cc b/chrome/browser/tab_contents/web_drag_dest_gtk.cc
index 390729d..d12f907 100644
--- a/chrome/browser/tab_contents/web_drag_dest_gtk.cc
+++ b/chrome/browser/tab_contents/web_drag_dest_gtk.cc
@@ -7,6 +7,7 @@
#include "app/gtk_dnd_util.h"
#include "base/file_path.h"
#include "base/string_util.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/gtk_util.h"
#include "net/base/net_util.h"
diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc
index 5a4368f..26c0d49 100644
--- a/chrome/browser/tabs/tab_strip_model.cc
+++ b/chrome/browser/tabs/tab_strip_model.cc
@@ -747,7 +747,7 @@ bool TabStripModel::InternalCloseTabs(std::vector<int> indices,
}
TabContents* detached_contents = GetContentsAt(indices[i]);
- RenderProcessHost* process = detached_contents->process();
+ RenderProcessHost* process = detached_contents->GetRenderProcessHost();
std::map<RenderProcessHost*, size_t>::iterator iter =
processes.find(process);
if (iter == processes.end()) {
diff --git a/chrome/browser/tabs/tab_strip_model_unittest.cc b/chrome/browser/tabs/tab_strip_model_unittest.cc
index 11f2f73..2329f0c 100644
--- a/chrome/browser/tabs/tab_strip_model_unittest.cc
+++ b/chrome/browser/tabs/tab_strip_model_unittest.cc
@@ -95,7 +95,8 @@ class TabStripModelTest : public RenderViewHostTestHarness {
TabContents* retval = new TabContents(profile(),
tab_contents->render_view_host()->site_instance(), MSG_ROUTING_NONE,
NULL);
- EXPECT_EQ(retval->process(), tab_contents->process());
+ EXPECT_EQ(retval->GetRenderProcessHost(),
+ tab_contents->GetRenderProcessHost());
return retval;
}
@@ -1315,7 +1316,7 @@ TEST_F(TabStripModelTest, FastShutdown) {
tabstrip.CloseAllTabs();
// On a mock RPH this checks whether we *attempted* fast shutdown.
// A real RPH would reject our attempt since there is an unload handler.
- EXPECT_TRUE(contents1->process()->fast_shutdown_started());
+ EXPECT_TRUE(contents1->GetRenderProcessHost()->fast_shutdown_started());
EXPECT_EQ(2, tabstrip.count());
delegate.set_run_unload_listener(false);
@@ -1336,7 +1337,7 @@ TEST_F(TabStripModelTest, FastShutdown) {
tabstrip.AppendTabContents(contents2, true);
tabstrip.CloseTabContentsAt(1);
- EXPECT_FALSE(contents1->process()->fast_shutdown_started());
+ EXPECT_FALSE(contents1->GetRenderProcessHost()->fast_shutdown_started());
EXPECT_EQ(1, tabstrip.count());
tabstrip.CloseAllTabs();
diff --git a/chrome/browser/task_manager_resource_providers.cc b/chrome/browser/task_manager_resource_providers.cc
index 57f6b7a..6c8dcad 100644
--- a/chrome/browser/task_manager_resource_providers.cc
+++ b/chrome/browser/task_manager_resource_providers.cc
@@ -29,6 +29,7 @@
#include "chrome/browser/extensions/extension_process_manager.h"
#include "chrome/browser/profile_manager.h"
#include "chrome/browser/renderer_host/render_process_host.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/renderer_host/resource_message_filter.h"
#include "chrome/browser/tab_contents/tab_util.h"
#include "chrome/browser/tab_contents/tab_contents.h"
@@ -57,7 +58,7 @@ TaskManagerTabContentsResource::TaskManagerTabContentsResource(
pending_v8_memory_allocated_update_(false) {
// We cache the process as when the TabContents is closed the process
// becomes NULL and the TaskManager still needs it.
- process_ = tab_contents_->process()->GetHandle();
+ process_ = tab_contents_->GetRenderProcessHost()->GetHandle();
pid_ = base::GetProcId(process_);
stats_.images.size = 0;
stats_.cssStyleSheets.size = 0;
@@ -165,15 +166,17 @@ TaskManager::Resource* TaskManagerTabContentsResourceProvider::GetResource(
tab_util::GetTabContentsByID(render_process_host_id, routing_id);
if (!tab_contents) // Not one of our resource.
return NULL;
-
- if (!tab_contents->process()->GetHandle()) {
+
+ base::ProcessHandle process_handle =
+ tab_contents->GetRenderProcessHost()->GetHandle();
+ if (!process_handle) {
// We should not be holding on to a dead tab (it should have been removed
// through the NOTIFY_TAB_CONTENTS_DISCONNECTED notification.
NOTREACHED();
return NULL;
}
- int pid = base::GetProcId(tab_contents->process()->GetHandle());
+ int pid = base::GetProcId(process_handle);
if (pid != origin_pid)
return NULL;
@@ -245,7 +248,7 @@ void TaskManagerTabContentsResourceProvider::Add(TabContents* tab_contents) {
// Don't add dead tabs or tabs that haven't yet connected.
// Also ignore tabs which display extension content. We collapse
// all of these into one extension row.
- if (!tab_contents->process()->GetHandle() ||
+ if (!tab_contents->GetRenderProcessHost()->GetHandle() ||
!tab_contents->notify_disconnection() ||
tab_contents->HostsExtension()) {
return;
diff --git a/chrome/browser/views/bookmark_bar_view.cc b/chrome/browser/views/bookmark_bar_view.cc
index 644b403..2c903ad 100644
--- a/chrome/browser/views/bookmark_bar_view.cc
+++ b/chrome/browser/views/bookmark_bar_view.cc
@@ -15,6 +15,7 @@
#include "app/os_exchange_data.h"
#include "app/resource_bundle.h"
#include "base/string_util.h"
+#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/bookmarks/bookmark_utils.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/browser_theme_provider.h"
diff --git a/chrome/browser/views/bookmark_menu_controller_views.cc b/chrome/browser/views/bookmark_menu_controller_views.cc
index 529eeee..66e41f8 100644
--- a/chrome/browser/views/bookmark_menu_controller_views.cc
+++ b/chrome/browser/views/bookmark_menu_controller_views.cc
@@ -9,6 +9,7 @@
#include "app/resource_bundle.h"
#include "base/stl_util-inl.h"
#include "chrome/browser/bookmarks/bookmark_drag_data.h"
+#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/bookmarks/bookmark_utils.h"
#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/browser/profile.h"
diff --git a/chrome/browser/views/browser_actions_container.cc b/chrome/browser/views/browser_actions_container.cc
index d32ef5a..6786ed6 100644
--- a/chrome/browser/views/browser_actions_container.cc
+++ b/chrome/browser/views/browser_actions_container.cc
@@ -16,6 +16,7 @@
#include "chrome/browser/extensions/extensions_service.h"
#include "chrome/browser/extensions/extension_tabs_module.h"
#include "chrome/browser/renderer_host/render_widget_host_view.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/view_ids.h"
diff --git a/chrome/browser/views/dom_view.cc b/chrome/browser/views/dom_view.cc
index 29aaf19..16a1278 100644
--- a/chrome/browser/views/dom_view.cc
+++ b/chrome/browser/views/dom_view.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/views/dom_view.h"
#include "chrome/browser/tab_contents/tab_contents.h"
+#include "ipc/ipc_message.h"
#include "views/focus/focus_manager.h"
DOMView::DOMView() : tab_contents_(NULL), initialized_(false) {
diff --git a/chrome/browser/views/hung_renderer_view.cc b/chrome/browser/views/hung_renderer_view.cc
index 6fd0171..33b497e 100644
--- a/chrome/browser/views/hung_renderer_view.cc
+++ b/chrome/browser/views/hung_renderer_view.cc
@@ -72,7 +72,7 @@ HungPagesTableModel::~HungPagesTableModel() {
void HungPagesTableModel::InitForTabContents(TabContents* hung_contents) {
tab_contentses_.clear();
for (TabContentsIterator it; !it.done(); ++it) {
- if (it->process() == hung_contents->process())
+ if (it->GetRenderProcessHost() == hung_contents->GetRenderProcessHost())
tab_contentses_.push_back(*it);
}
// The world is different.
@@ -253,7 +253,8 @@ void HungRendererDialogView::ShowForTabContents(TabContents* contents) {
void HungRendererDialogView::EndForTabContents(TabContents* contents) {
DCHECK(contents);
- if (contents_ && contents_->process() == contents->process()) {
+ if (contents_ && contents_->GetRenderProcessHost() ==
+ contents->GetRenderProcessHost()) {
window()->Close();
// Since we're closing, we no longer need this TabContents.
contents_ = NULL;
@@ -316,7 +317,8 @@ void HungRendererDialogView::ButtonPressed(
views::Button* sender, const views::Event& event) {
if (sender == kill_button_) {
// Kill the process.
- TerminateProcess(contents_->process()->GetHandle(), ResultCodes::HUNG);
+ TerminateProcess(contents_->GetRenderProcessHost()->GetHandle(),
+ ResultCodes::HUNG);
}
}
diff --git a/chrome/browser/views/options/content_page_view.cc b/chrome/browser/views/options/content_page_view.cc
index a995779..106f187 100644
--- a/chrome/browser/views/options/content_page_view.cc
+++ b/chrome/browser/views/options/content_page_view.cc
@@ -19,6 +19,7 @@
#include "chrome/browser/browser_list.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_window.h"
+#include "chrome/browser/profile.h"
#include "chrome/browser/sync/sync_ui_util.h"
#include "chrome/browser/views/importer_view.h"
#include "chrome/browser/views/options/options_group_view.h"
diff --git a/chrome/browser/views/tab_contents/tab_contents_view_win.cc b/chrome/browser/views/tab_contents/tab_contents_view_win.cc
index 05dfc32..d1c3bfe 100644
--- a/chrome/browser/views/tab_contents/tab_contents_view_win.cc
+++ b/chrome/browser/views/tab_contents/tab_contents_view_win.cc
@@ -110,9 +110,10 @@ gfx::NativeView TabContentsViewWin::GetNativeView() const {
}
gfx::NativeView TabContentsViewWin::GetContentNativeView() const {
- if (!tab_contents()->render_widget_host_view())
+ RenderWidgetHostView* rwhv = tab_contents()->GetRenderWidgetHostView();
+ if (!rwhv)
return NULL;
- return tab_contents()->render_widget_host_view()->GetNativeView();
+ return rwhv->GetNativeView();
}
gfx::NativeWindow TabContentsViewWin::GetTopLevelNativeWindow() const {
@@ -155,7 +156,7 @@ void TabContentsViewWin::SetPageTitle(const std::wstring& title) {
// TODO(brettw) this call seems messy the way it reaches into the widget
// view, and I'm not sure it's necessary. Maybe we should just remove it.
::SetWindowText(
- tab_contents()->render_widget_host_view()->GetNativeView(),
+ tab_contents()->GetRenderWidgetHostView()->GetNativeView(),
title.c_str());
}
}
@@ -187,7 +188,7 @@ void TabContentsViewWin::Focus() {
return;
}
- RenderWidgetHostView* rwhv = tab_contents()->render_widget_host_view();
+ RenderWidgetHostView* rwhv = tab_contents()->GetRenderWidgetHostView();
if (rwhv) {
::SetFocus(rwhv->GetNativeView());
return;
@@ -505,8 +506,9 @@ void TabContentsViewWin::WasSized(const gfx::Size& size) {
SetWindowPos(NULL, 0, 0, size.width(), size.height(), swp_flags);
if (tab_contents()->interstitial_page())
tab_contents()->interstitial_page()->SetSize(size);
- if (tab_contents()->render_widget_host_view())
- tab_contents()->render_widget_host_view()->SetSize(size);
+ RenderWidgetHostView* rwhv = tab_contents()->GetRenderWidgetHostView();
+ if (rwhv)
+ rwhv->SetSize(size);
}
bool TabContentsViewWin::ScrollZoom(int scroll_type) {
diff --git a/chrome/browser/views/tabs/tab_overview_controller.cc b/chrome/browser/views/tabs/tab_overview_controller.cc
index 3321e6d..5fde37b 100644
--- a/chrome/browser/views/tabs/tab_overview_controller.cc
+++ b/chrome/browser/views/tabs/tab_overview_controller.cc
@@ -6,10 +6,11 @@
#include "chrome/browser/browser.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/views/frame/browser_extender.h"
-#include "chrome/browser/views/frame/browser_view.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tab_contents/thumbnail_generator.h"
+#include "chrome/browser/views/frame/browser_extender.h"
+#include "chrome/browser/views/frame/browser_view.h"
#include "chrome/browser/views/tabs/tab_overview_cell.h"
#include "chrome/browser/views/tabs/tab_overview_container.h"
#include "chrome/browser/views/tabs/tab_overview_drag_controller.h"
diff --git a/chrome/browser/views/tabs/tab_strip.cc b/chrome/browser/views/tabs/tab_strip.cc
index 6dca162..cac1e62 100644
--- a/chrome/browser/views/tabs/tab_strip.cc
+++ b/chrome/browser/views/tabs/tab_strip.cc
@@ -17,6 +17,7 @@
#include "chrome/browser/defaults.h"
#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/browser/profile.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/view_ids.h"