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

Unified Diff: chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc

Issue 10911300: Move ExtensionAction from common/ to browser/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: proof of concept Created 8 years, 3 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/gtk/extensions/extension_installed_bubble_gtk.cc
diff --git a/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc b/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc
index 88fcc4d33b40dd9514aefa680b530c517150ba6c..c2d3885100045247467d3f1ba514dd83a7a13673 100644
--- a/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc
@@ -24,7 +24,7 @@
#include "chrome/browser/ui/singleton_tabs.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
-#include "chrome/common/extensions/extension_action.h"
+#include "chrome/browser/extensions/extension_action.h"
#include "chrome/common/url_constants.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
@@ -159,10 +159,11 @@ void ExtensionInstalledBubbleGtk::ShowInternal() {
} else if (type_ == PAGE_ACTION) {
LocationBarViewGtk* location_bar_view =
browser_window->GetToolbar()->GetLocationBarView();
- location_bar_view->SetPreviewEnabledPageAction(extension_->page_action(),
+ ExtensionAction* page_action = GetPageAction(browser_->profile(),
+ *extension_);
+ location_bar_view->SetPreviewEnabledPageAction(page_action,
true); // preview_enabled
- reference_widget = location_bar_view->GetPageActionWidget(
- extension_->page_action());
+ reference_widget = location_bar_view->GetPageActionWidget(page_action);
// glib delays recalculating layout, but we need reference_widget to know
// its coordinates, so we force a check_resize here.
gtk_container_check_resize(GTK_CONTAINER(
@@ -379,7 +380,9 @@ void ExtensionInstalledBubbleGtk::BubbleClosing(BubbleGtk* bubble,
browser_->window()->GetNativeWindow());
LocationBarViewGtk* location_bar_view =
browser_window->GetToolbar()->GetLocationBarView();
- location_bar_view->SetPreviewEnabledPageAction(extension_->page_action(),
+ ExtensionAction* page_action = GetPageAction(browser_->profile(),
+ *extension_);
+ location_bar_view->SetPreviewEnabledPageAction(page_action,
false); // preview_enabled
}

Powered by Google App Engine
This is Rietveld 408576698