| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_PAGE_ACTION_CONTROLLER_H_ | |
| 6 #define CHROME_BROWSER_EXTENSIONS_PAGE_ACTION_CONTROLLER_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "chrome/browser/extensions/location_bar_controller.h" | |
| 10 | |
| 11 namespace content { | |
| 12 class BrowserContext; | |
| 13 class WebContents; | |
| 14 } | |
| 15 | |
| 16 namespace extensions { | |
| 17 class Extension; | |
| 18 | |
| 19 // A LocationBarControllerProvider which populates the location bar with icons | |
| 20 // based on the page_action extension API. | |
| 21 // TODO(rdevlin.cronin): This isn't really a controller. | |
| 22 class PageActionController : public LocationBarController::ActionProvider { | |
| 23 public: | |
| 24 explicit PageActionController(content::WebContents* web_contents); | |
| 25 virtual ~PageActionController(); | |
| 26 | |
| 27 // LocationBarController::Provider implementation. | |
| 28 virtual ExtensionAction* GetActionForExtension(const Extension* extension) | |
| 29 OVERRIDE; | |
| 30 virtual void OnNavigated() OVERRIDE; | |
| 31 | |
| 32 private: | |
| 33 // The associated WebContents. | |
| 34 content::WebContents* web_contents_; | |
| 35 | |
| 36 // The associated browser context. | |
| 37 content::BrowserContext* browser_context_; | |
| 38 | |
| 39 DISALLOW_COPY_AND_ASSIGN(PageActionController); | |
| 40 }; | |
| 41 | |
| 42 } // namespace extensions | |
| 43 | |
| 44 #endif // CHROME_BROWSER_EXTENSIONS_PAGE_ACTION_CONTROLLER_H_ | |
| OLD | NEW |