summaryrefslogtreecommitdiffstats
path: root/chrome/common/page_action.cc
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-06 16:46:11 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-06 16:46:11 +0000
commitce5c4504531cfd32972dfd123f98183c3706951a (patch)
tree679f14d1ea5738a6bedb752a4c61b7f3c50efde1 /chrome/common/page_action.cc
parentaec92f83d096ca57ab6ce515ae7063b8081b630e (diff)
downloadchromium_src-ce5c4504531cfd32972dfd123f98183c3706951a.zip
chromium_src-ce5c4504531cfd32972dfd123f98183c3706951a.tar.gz
chromium_src-ce5c4504531cfd32972dfd123f98183c3706951a.tar.bz2
PageActions now work across tabs and windows.
The extension system now provides TabId to extensions so it is now possible to activate PageActions in other tabs besides the first in the tab strip. :) BUG=None TEST=None (requires a PageAction extension to test against). Review URL: http://codereview.chromium.org/109046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15415 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/page_action.cc')
-rw-r--r--chrome/common/page_action.cc17
1 files changed, 1 insertions, 16 deletions
diff --git a/chrome/common/page_action.cc b/chrome/common/page_action.cc
index 1c8096f..233a735 100644
--- a/chrome/common/page_action.cc
+++ b/chrome/common/page_action.cc
@@ -5,23 +5,8 @@
#include "chrome/common/page_action.h"
PageAction::PageAction()
- : type_(PERMANENT),
- active_tab_id_(-1) {
+ : type_(PERMANENT) {
}
PageAction::~PageAction() {
}
-
-// TODO(finnur): The tracking of active tab and url probably needs to change
-// but it is hard to test while we are hard coding the tab index, so I'll
-// leave it for later.
-void PageAction::SetActiveTabIdAndUrl(int tab_id, const GURL& url) {
- active_tab_id_ = tab_id;
- active_url_ = url;
-}
-
-bool PageAction::IsActive(int tab_id, const GURL& url) const {
- return !active_url_.is_empty() &&
- url == active_url_ &&
- tab_id == active_tab_id_;
-}