Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_PAGE_ACTION_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_PAGE_ACTION_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_PAGE_ACTION_CONTROLLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_PAGE_ACTION_CONTROLLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 21 // A LocationBarController which populates the location bar with icons based | 21 // A LocationBarController which populates the location bar with icons based |
| 22 // on the page_action extension API. | 22 // on the page_action extension API. |
| 23 class PageActionController : public LocationBarController, | 23 class PageActionController : public LocationBarController, |
| 24 public content::WebContentsObserver { | 24 public content::WebContentsObserver { |
| 25 public: | 25 public: |
| 26 explicit PageActionController(TabContents* tab_contents); | 26 explicit PageActionController(TabContents* tab_contents); |
| 27 virtual ~PageActionController(); | 27 virtual ~PageActionController(); |
| 28 | 28 |
| 29 // LocationBarController implementation. | 29 // LocationBarController implementation. |
| 30 virtual std::vector<ExtensionAction*> GetCurrentActions() const OVERRIDE; | 30 virtual std::vector<ExtensionAction*> GetCurrentActions() const OVERRIDE; |
| 31 // As if the user never grants permission. | |
|
Aaron Boodman
2012/07/03 01:29:31
Weird comment is weird.
Jeffrey Yasskin
2012/07/10 21:52:33
My idea was that doing nothing in the PageActionCo
| |
| 32 virtual void RequestScriptPermission( | |
| 33 const std::string& extension_id) OVERRIDE {} | |
| 31 virtual Action OnClicked(const std::string& extension_id, | 34 virtual Action OnClicked(const std::string& extension_id, |
| 32 int mouse_button) OVERRIDE; | 35 int mouse_button) OVERRIDE; |
| 33 virtual void NotifyChange() OVERRIDE; | 36 virtual void NotifyChange() OVERRIDE; |
| 34 | 37 |
| 35 // content::WebContentsObserver implementation. | 38 // content::WebContentsObserver implementation. |
| 36 virtual void DidNavigateMainFrame( | 39 virtual void DidNavigateMainFrame( |
| 37 const content::LoadCommittedDetails& details, | 40 const content::LoadCommittedDetails& details, |
| 38 const content::FrameNavigateParams& params) OVERRIDE; | 41 const content::FrameNavigateParams& params) OVERRIDE; |
| 39 | 42 |
| 40 private: | 43 private: |
| 41 // Gets the ExtensionService for |tab_contents_|. | 44 // Gets the ExtensionService for |tab_contents_|. |
| 42 ExtensionService* GetExtensionService() const; | 45 ExtensionService* GetExtensionService() const; |
| 43 | 46 |
| 44 TabContents* tab_contents_; | 47 TabContents* tab_contents_; |
| 45 | 48 |
| 46 DISALLOW_COPY_AND_ASSIGN(PageActionController); | 49 DISALLOW_COPY_AND_ASSIGN(PageActionController); |
| 47 }; | 50 }; |
| 48 | 51 |
| 49 } // namespace extensions | 52 } // namespace extensions |
| 50 | 53 |
| 51 #endif // CHROME_BROWSER_EXTENSIONS_PAGE_ACTION_CONTROLLER_H_ | 54 #endif // CHROME_BROWSER_EXTENSIONS_PAGE_ACTION_CONTROLLER_H_ |
| OLD | NEW |