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

Unified Diff: chrome/browser/extensions/page_action_controller.cc

Issue 496403003: Remove NOTIFICATION_EXTENSION_PAGE_ACTIONS_UPDATED (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Latest master for CQ Created 6 years, 4 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/extensions/page_action_controller.cc
diff --git a/chrome/browser/extensions/page_action_controller.cc b/chrome/browser/extensions/page_action_controller.cc
index 09a7107c652b8f3f567b2714e10bd8d1243f9cd5..3c9fe2f02b84ee7933aaeac6add6c3b54bf6631b 100644
--- a/chrome/browser/extensions/page_action_controller.cc
+++ b/chrome/browser/extensions/page_action_controller.cc
@@ -4,32 +4,14 @@
#include "chrome/browser/extensions/page_action_controller.h"
-#include <set>
-
-#include "base/lazy_instance.h"
-#include "base/metrics/histogram.h"
-#include "chrome/browser/extensions/api/extension_action/extension_action_api.h"
-#include "chrome/browser/extensions/extension_action.h"
#include "chrome/browser/extensions/extension_action_manager.h"
-#include "chrome/browser/extensions/tab_helper.h"
-#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sessions/session_tab_helper.h"
-#include "content/public/browser/navigation_details.h"
#include "content/public/browser/web_contents.h"
-#include "extensions/browser/extension_registry.h"
-#include "extensions/common/extension_set.h"
namespace extensions {
-// Keeps track of the profiles for which we've sent UMA statistics.
-base::LazyInstance<std::set<Profile*> > g_reported_for_profiles =
- LAZY_INSTANCE_INITIALIZER;
-
PageActionController::PageActionController(content::WebContents* web_contents)
: web_contents_(web_contents),
- extension_action_observer_(this) {
- extension_action_observer_.Add(
- ExtensionActionAPI::Get(web_contents_->GetBrowserContext()));
+ browser_context_(web_contents_->GetBrowserContext()) {
}
PageActionController::~PageActionController() {
@@ -37,7 +19,8 @@ PageActionController::~PageActionController() {
ExtensionAction* PageActionController::GetActionForExtension(
const Extension* extension) {
- return ExtensionActionManager::Get(GetProfile())->GetPageAction(*extension);
+ return ExtensionActionManager::Get(browser_context_)->GetPageAction(
+ *extension);
}
void PageActionController::OnNavigated() {
@@ -45,17 +28,4 @@ void PageActionController::OnNavigated() {
// do here.
}
-void PageActionController::OnExtensionActionUpdated(
- ExtensionAction* extension_action,
- content::WebContents* web_contents,
- content::BrowserContext* browser_context) {
- if (web_contents == web_contents_ &&
- extension_action->action_type() == ActionInfo::TYPE_PAGE)
- LocationBarController::NotifyChange(web_contents_);
-}
-
-Profile* PageActionController::GetProfile() {
- return Profile::FromBrowserContext(web_contents_->GetBrowserContext());
-}
-
} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/page_action_controller.h ('k') | chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698