Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1072)

Unified Diff: chrome/browser/ui/browser.cc

Issue 7835004: Moved the following IPCs out of chrome into content where they are handled by (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/browser.cc
===================================================================
--- chrome/browser/ui/browser.cc (revision 99462)
+++ chrome/browser/ui/browser.cc (working copy)
@@ -59,8 +59,10 @@
#include "chrome/browser/net/url_fixer_upper.h"
#include "chrome/browser/notifications/notification_ui_manager.h"
#include "chrome/browser/platform_util.h"
+#include "chrome/browser/plugin_observer.h"
#include "chrome/browser/prefs/incognito_mode_prefs.h"
#include "chrome/browser/prefs/pref_service.h"
+#include "chrome/browser/prerender/prerender_tab_helper.h"
#include "chrome/browser/printing/cloud_print/cloud_print_setup_flow.h"
#include "chrome/browser/printing/print_preview_tab_controller.h"
#include "chrome/browser/printing/print_view_manager.h"
@@ -2549,6 +2551,41 @@
final_update);
}
+// static
+void Browser::CrashedPluginHelper(TabContents* tab,
+ const FilePath& plugin_path) {
+ TabContentsWrapper* tcw = TabContentsWrapper::GetCurrentWrapperForContents(
+ tab);
+ if (!tcw || !tcw->plugin_observer())
+ return;
+
+ tcw->plugin_observer()->CrashedPlugin(plugin_path);
+}
+
+// static
+void Browser::DidStartProvisionalLoadForFrameHelper(TabContents* tab,
+ int64 frame_id,
+ bool is_main_frame,
+ bool has_opener_set,
+ const GURL& url) {
+ TabContentsWrapper* tcw = TabContentsWrapper::GetCurrentWrapperForContents(
+ tab);
+ if (!tcw || !tcw->prerender_tab_helper())
+ return;
+ tcw->prerender_tab_helper()->DidStartProvisionalLoadForFrame(
+ frame_id, is_main_frame, has_opener_set, url);
+}
+
+// static
+void Browser::UpdateTargetURLHelper(TabContents* tab, int32 page_id,
+ const GURL& url) {
+ TabContentsWrapper* tcw = TabContentsWrapper::GetCurrentWrapperForContents(
+ tab);
+ if (!tcw || !tcw->prerender_tab_helper())
+ return;
+ tcw->prerender_tab_helper()->UpdateTargetURL(page_id, url);
+}
+
void Browser::ExecuteCommandWithDisposition(
int id, WindowOpenDisposition disposition) {
// No commands are enabled if there is not yet any selected tab.
@@ -3483,7 +3520,10 @@
}
}
-void Browser::UpdateTargetURL(TabContents* source, const GURL& url) {
+void Browser::UpdateTargetURL(TabContents* source, int32 page_id,
+ const GURL& url) {
+ Browser::UpdateTargetURLHelper(source, page_id, url);
+
if (!GetStatusBubble())
return;
@@ -3814,6 +3854,19 @@
active_match_ordinal, final_update);
}
+void Browser::CrashedPlugin(TabContents* tab, const FilePath& plugin_path) {
+ CrashedPluginHelper(tab, plugin_path);
+}
+
+void Browser::DidStartProvisionalLoadForFrame(TabContents* tab,
+ int64 frame_id,
+ bool is_main_frame,
+ bool has_opener_set,
+ const GURL& url) {
+ DidStartProvisionalLoadForFrameHelper(tab, frame_id, is_main_frame,
+ has_opener_set, url);
+}
+
void Browser::ExitTabbedFullscreenModeIfNecessary() {
if (tab_caused_fullscreen_)
ToggleFullscreenMode();

Powered by Google App Engine
This is Rietveld 408576698