summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-28 21:09:56 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-28 21:09:56 +0000
commitba69a7db718bd6815e154b36cead5d0e25d9e45e (patch)
tree57a415ee022130e50bd27e8346fc02f6d2a238cc /chrome/browser/views
parentd55aaa139da94452ebd6812bfa9241ba050978d9 (diff)
downloadchromium_src-ba69a7db718bd6815e154b36cead5d0e25d9e45e.zip
chromium_src-ba69a7db718bd6815e154b36cead5d0e25d9e45e.tar.gz
chromium_src-ba69a7db718bd6815e154b36cead5d0e25d9e45e.tar.bz2
Moving ContextualAction class to common/extensions and in the process renaming it ExtensionAction.
No code change. BUG=None TEST=Page actions and browser actions should work as before (no change) Review URL: http://codereview.chromium.org/242035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27406 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r--chrome/browser/views/browser_actions_container.cc16
-rw-r--r--chrome/browser/views/browser_actions_container.h4
-rw-r--r--chrome/browser/views/location_bar_view.cc8
-rw-r--r--chrome/browser/views/location_bar_view.h4
4 files changed, 16 insertions, 16 deletions
diff --git a/chrome/browser/views/browser_actions_container.cc b/chrome/browser/views/browser_actions_container.cc
index 52e3531..2499692 100644
--- a/chrome/browser/views/browser_actions_container.cc
+++ b/chrome/browser/views/browser_actions_container.cc
@@ -11,9 +11,9 @@
#include "chrome/browser/image_loading_tracker.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/views/toolbar_view.h"
+#include "chrome/common/extensions/extension_action.h"
#include "chrome/common/notification_source.h"
#include "chrome/common/notification_type.h"
-#include "chrome/common/page_action.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "views/controls/button/image_button.h"
@@ -27,13 +27,13 @@ static const int kIconHorizontalPadding = 10;
// BrowserActionImageView
// The BrowserActionImageView is a specialization of the ImageButton class.
-// It acts on a ContextualAction, in this case a BrowserAction and handles
+// It acts on a ExtensionAction, in this case a BrowserAction and handles
// loading the image for the button asynchronously on the file thread to
class BrowserActionImageView : public views::ImageButton,
public views::ButtonListener,
public ImageLoadingTracker::Observer {
public:
- BrowserActionImageView(ContextualAction* browser_action,
+ BrowserActionImageView(ExtensionAction* browser_action,
Extension* extension,
BrowserActionsContainer* panel);
~BrowserActionImageView();
@@ -45,9 +45,9 @@ class BrowserActionImageView : public views::ImageButton,
virtual void OnImageLoaded(SkBitmap* image, size_t index);
private:
- // The browser action this view represents. The ContextualAction is not owned
+ // The browser action this view represents. The ExtensionAction is not owned
// by this class.
- ContextualAction* browser_action_;
+ ExtensionAction* browser_action_;
// The icons representing different states for the browser action.
std::vector<SkBitmap> browser_action_icons_;
@@ -64,7 +64,7 @@ class BrowserActionImageView : public views::ImageButton,
};
BrowserActionImageView::BrowserActionImageView(
- ContextualAction* browser_action, Extension* extension,
+ ExtensionAction* browser_action, Extension* extension,
BrowserActionsContainer* panel)
: ImageButton(this),
browser_action_(browser_action),
@@ -137,7 +137,7 @@ void BrowserActionsContainer::RefreshBrowserActionViews() {
if (!extension_service) // The |extension_service| can be NULL in Incognito.
return;
- std::vector<ContextualAction*> browser_actions;
+ std::vector<ExtensionAction*> browser_actions;
browser_actions = extension_service->GetBrowserActions();
if (browser_action_views_.size() != browser_actions.size()) {
@@ -171,7 +171,7 @@ void BrowserActionsContainer::OnBrowserActionVisibilityChanged() {
}
void BrowserActionsContainer::OnBrowserActionExecuted(
- const ContextualAction& browser_action) {
+ const ExtensionAction& browser_action) {
int window_id = ExtensionTabUtil::GetWindowId(toolbar_->browser());
ExtensionBrowserEventRouter::GetInstance()->BrowserActionExecuted(
profile_, browser_action.extension_id(), window_id);
diff --git a/chrome/browser/views/browser_actions_container.h b/chrome/browser/views/browser_actions_container.h
index 73d4f13..85b2c6c 100644
--- a/chrome/browser/views/browser_actions_container.h
+++ b/chrome/browser/views/browser_actions_container.h
@@ -11,7 +11,7 @@
#include "chrome/common/notification_registrar.h"
#include "views/view.h"
-class ContextualAction;
+class ExtensionAction;
class Profile;
class ToolbarView;
namespace views {
@@ -41,7 +41,7 @@ class BrowserActionsContainer : public views::View,
void OnBrowserActionVisibilityChanged();
// Called when the user clicks on the browser action icon.
- void OnBrowserActionExecuted(const ContextualAction& browser_action);
+ void OnBrowserActionExecuted(const ExtensionAction& browser_action);
// Overridden from views::View:
virtual gfx::Size GetPreferredSize();
diff --git a/chrome/browser/views/location_bar_view.cc b/chrome/browser/views/location_bar_view.cc
index e558dd2..35503a0 100644
--- a/chrome/browser/views/location_bar_view.cc
+++ b/chrome/browser/views/location_bar_view.cc
@@ -35,8 +35,8 @@
#include "chrome/browser/tab_contents/navigation_entry.h"
#include "chrome/browser/view_ids.h"
#include "chrome/browser/views/info_bubble.h"
+#include "chrome/common/extensions/extension_action.h"
#include "chrome/common/extensions/extension.h"
-#include "chrome/common/page_action.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "views/focus/focus_manager.h"
@@ -644,7 +644,7 @@ void LocationBarView::DeletePageActionViews() {
}
void LocationBarView::RefreshPageActionViews() {
- std::vector<ContextualAction*> page_actions;
+ std::vector<ExtensionAction*> page_actions;
if (profile_->GetExtensionsService())
page_actions = profile_->GetExtensionsService()->GetPageActions();
@@ -1183,7 +1183,7 @@ void LocationBarView::SecurityImageView::ShowInfoBubble() {
LocationBarView::PageActionImageView::PageActionImageView(
LocationBarView* owner,
Profile* profile,
- const ContextualAction* page_action,
+ const ExtensionAction* page_action,
const BubblePositioner* bubble_positioner)
: LocationBarImageView(bubble_positioner),
owner_(owner),
@@ -1250,7 +1250,7 @@ void LocationBarView::PageActionImageView::UpdateVisibility(
current_tab_id_ = ExtensionTabUtil::GetTabId(contents);
current_url_ = url;
- const ContextualActionState* state =
+ const ExtensionActionState* state =
contents->GetPageActionState(page_action_);
bool visible = state != NULL;
if (visible) {
diff --git a/chrome/browser/views/location_bar_view.h b/chrome/browser/views/location_bar_view.h
index 6ab77d7..b315e75 100644
--- a/chrome/browser/views/location_bar_view.h
+++ b/chrome/browser/views/location_bar_view.h
@@ -347,7 +347,7 @@ class LocationBarView : public LocationBar,
public:
PageActionImageView(LocationBarView* owner,
Profile* profile,
- const ContextualAction* page_action,
+ const ExtensionAction* page_action,
const BubblePositioner* bubble_positioner);
virtual ~PageActionImageView();
@@ -374,7 +374,7 @@ class LocationBarView : public LocationBar,
// The PageAction that this view represents. The PageAction is not owned by
// us, it resides in the extension of this particular profile.
- const ContextualAction* page_action_;
+ const ExtensionAction* page_action_;
// The icons representing different states for the page action.
std::vector<SkBitmap> page_action_icons_;