| 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();
|
|
|