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

Side by Side Diff: chrome/browser/extensions/location_bar_controller.h

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, 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_LOCATION_BAR_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_LOCATION_BAR_CONTROLLER_H_
6 #define CHROME_BROWSER_EXTENSIONS_LOCATION_BAR_CONTROLLER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_LOCATION_BAR_CONTROLLER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 26 matching lines...) Expand all
37 virtual ExtensionAction* GetActionForExtension( 37 virtual ExtensionAction* GetActionForExtension(
38 const Extension* extension) = 0; 38 const Extension* extension) = 0;
39 39
40 // A notification that the WebContents has navigated in the main frame (and 40 // A notification that the WebContents has navigated in the main frame (and
41 // not in page), so any state relating to the current page should likely be 41 // not in page), so any state relating to the current page should likely be
42 // reset. 42 // reset.
43 virtual void OnNavigated() = 0; 43 virtual void OnNavigated() = 0;
44 44
45 // A notification that the given |extension| has been unloaded, and any 45 // A notification that the given |extension| has been unloaded, and any
46 // actions associated with it should be removed. 46 // actions associated with it should be removed.
47 // The location bar controller will update itself after this if needed, so 47 // The LocationBarController will handle notifying of page action changes,
48 // Providers should not call NotifyChange(). 48 // if any.
49 virtual void OnExtensionUnloaded(const Extension* extension) {} 49 virtual void OnExtensionUnloaded(const Extension* extension) {}
50 }; 50 };
51 51
52 explicit LocationBarController(content::WebContents* web_contents); 52 explicit LocationBarController(content::WebContents* web_contents);
53 virtual ~LocationBarController(); 53 virtual ~LocationBarController();
54 54
55 // Returns the actions which should be displayed in the location bar. 55 // Returns the actions which should be displayed in the location bar.
56 std::vector<ExtensionAction*> GetCurrentActions(); 56 std::vector<ExtensionAction*> GetCurrentActions();
57 57
58 // Notifies the window that the actions have changed.
59 static void NotifyChange(content::WebContents* web_contents);
60
61 ActiveScriptController* active_script_controller() { 58 ActiveScriptController* active_script_controller() {
62 return active_script_controller_.get(); 59 return active_script_controller_.get();
63 } 60 }
64 61
65 private: 62 private:
66 // content::WebContentsObserver implementation. 63 // content::WebContentsObserver implementation.
67 virtual void DidNavigateMainFrame( 64 virtual void DidNavigateMainFrame(
68 const content::LoadCommittedDetails& details, 65 const content::LoadCommittedDetails& details,
69 const content::FrameNavigateParams& params) OVERRIDE; 66 const content::FrameNavigateParams& params) OVERRIDE;
70 67
(...skipping 16 matching lines...) Expand all
87 84
88 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> 85 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
89 extension_registry_observer_; 86 extension_registry_observer_;
90 87
91 DISALLOW_COPY_AND_ASSIGN(LocationBarController); 88 DISALLOW_COPY_AND_ASSIGN(LocationBarController);
92 }; 89 };
93 90
94 } // namespace extensions 91 } // namespace extensions
95 92
96 #endif // CHROME_BROWSER_EXTENSIONS_LOCATION_BAR_CONTROLLER_H_ 93 #endif // CHROME_BROWSER_EXTENSIONS_LOCATION_BAR_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/lazy_background_page_apitest.cc ('k') | chrome/browser/extensions/location_bar_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698