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

Unified Diff: chrome/browser/tab_contents/tab_contents.h

Issue 332021: Move page actions over to ExtensionAction2 (Closed)
Patch Set: Review feedback Created 11 years, 2 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/tab_contents/tab_contents.h
diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h
index 091bde22389190e97e70c5208194c869df387937..b61362700f34bdfd742a68e5ac8002585357a9c5 100644
--- a/chrome/browser/tab_contents/tab_contents.h
+++ b/chrome/browser/tab_contents/tab_contents.h
@@ -30,7 +30,6 @@
#include "chrome/browser/tab_contents/navigation_entry.h"
#include "chrome/browser/tab_contents/page_navigator.h"
#include "chrome/browser/tab_contents/render_view_host_manager.h"
-#include "chrome/common/extensions/extension_action.h"
#include "chrome/common/gears_api.h"
#include "chrome/common/navigation_types.h"
#include "chrome/common/notification_registrar.h"
@@ -74,7 +73,6 @@ class DOMUI;
class DownloadItem;
class LoadNotificationDetails;
class OmniboxSearchHint;
-class PageAction;
class PasswordManager;
class PluginInstaller;
class Profile;
@@ -255,28 +253,7 @@ class TabContents : public PageNavigator,
bool is_crashed() const { return is_crashed_; }
void SetIsCrashed(bool state);
- // Adds/removes a page action to the list of page actions that are active in
- // this tab. The parameter |title| (if not empty) can be used to override the
- // page action title for this tab and |icon_id| specifies an icon index
- // (defined in the manifest) to use instead of the first icon (for this tab).
- void SetPageActionEnabled(const ExtensionAction* page_action, bool enable,
- const std::string& title, int icon_id);
-
- // Returns the page action state for this tab. The pair returns contains
- // the title (string) for the page action and the icon index to use (int).
- // If this function returns NULL it means the page action is not enabled for
- // this tab.
- const ExtensionActionState* GetPageActionState(
- const ExtensionAction* page_action);
-
- // Same as above, but creates an enable state if it doesn't exist. The return
- // value can be updated. The caller should call PageActionStateChanged when
- // done modifying the state.
- ExtensionActionState* GetOrCreatePageActionState(
- const ExtensionAction* page_action);
-
- // Call this after updating a ExtensionActionState object returned by
- // GetOrCreatePageActionState to notify clients about the changes.
+ // Call this after updating a page action to notify clients about the changes.
void PageActionStateChanged();
// Whether the tab is in the process of being destroyed.
@@ -1127,16 +1104,6 @@ class TabContents : public PageNavigator,
// information to build its presentation.
FindNotificationDetails last_search_result_;
- // Data for Page Actions -----------------------------------------------------
-
- // A map of page actions that this tab knows about (and a state object that
- // can be used to update the title, icon, visibilty, etc used for the page
- // action). This map is cleared every time the mainframe navigates and
- // populated by the PageAction extension API.
- typedef std::map< const ExtensionAction*, linked_ptr<ExtensionActionState> >
- PageActionStateMap;
- PageActionStateMap page_actions_;
-
// Data for misc internal state ----------------------------------------------
// See capturing_contents() above.

Powered by Google App Engine
This is Rietveld 408576698