| Index: chrome/browser/ui/views/location_bar/zoom_bubble_view.cc
|
| diff --git a/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc b/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc
|
| index d8238fc21cdc709ad06b7bf61239e446ec0a45b0..9308b6dc24fc9b7f18f8bccc2e623e6401425a37 100644
|
| --- a/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc
|
| +++ b/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc
|
| @@ -7,7 +7,6 @@
|
| #include "base/i18n/rtl.h"
|
| #include "base/strings/stringprintf.h"
|
| #include "chrome/browser/chrome_notification_types.h"
|
| -#include "chrome/browser/extensions/extension_util.h"
|
| #include "chrome/browser/ui/browser.h"
|
| #include "chrome/browser/ui/browser_finder.h"
|
| #include "chrome/browser/ui/browser_tabstrip.h"
|
| @@ -39,18 +38,6 @@ ZoomBubbleView* ZoomBubbleView::zoom_bubble_ = NULL;
|
| // static
|
| void ZoomBubbleView::ShowBubble(content::WebContents* web_contents,
|
| bool auto_close) {
|
| - // Find the extension that initiated the zoom change, if any.
|
| - ui_zoom::ZoomController* zoom_controller =
|
| - ui_zoom::ZoomController::FromWebContents(web_contents);
|
| - const extensions::ExtensionZoomRequestClient* client =
|
| - static_cast<const extensions::ExtensionZoomRequestClient*>(
|
| - zoom_controller->last_client());
|
| -
|
| - if (auto_close && client &&
|
| - extensions::util::AllowZoomWithoutBubble(client->extension())) {
|
| - return;
|
| - }
|
| -
|
| Browser* browser = chrome::FindBrowserWithWebContents(web_contents);
|
| DCHECK(browser && browser->window() &&
|
| browser->exclusive_access_manager()->fullscreen_controller());
|
| @@ -62,6 +49,11 @@ void ZoomBubbleView::ShowBubble(content::WebContents* web_contents,
|
| views::View* anchor_view = anchor_to_view ?
|
| browser_view->GetLocationBarView()->zoom_view() : NULL;
|
|
|
| + // Find the extension that initiated the zoom change, if any.
|
| + ui_zoom::ZoomController* zoom_controller =
|
| + ui_zoom::ZoomController::FromWebContents(web_contents);
|
| + const ui_zoom::ZoomRequestClient* client = zoom_controller->last_client();
|
| +
|
| // If the bubble is already showing in this window and the zoom change was not
|
| // initiated by an extension, then the bubble can be reused and only the label
|
| // text needs to be updated.
|
| @@ -80,8 +72,11 @@ void ZoomBubbleView::ShowBubble(content::WebContents* web_contents,
|
|
|
| // If the zoom change was initiated by an extension, capture the relevent
|
| // information from it.
|
| - if (client)
|
| - zoom_bubble_->SetExtensionInfo(client->extension());
|
| + if (client) {
|
| + zoom_bubble_->SetExtensionInfo(
|
| + static_cast<const extensions::ExtensionZoomRequestClient*>(client)
|
| + ->extension());
|
| + }
|
|
|
| // If we do not have an anchor view, parent the bubble to the content area.
|
| if (!anchor_to_view)
|
|
|