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 #pragma once |
| 8 |
| 9 #include "chrome/browser/extensions/action_box_controller.h" |
| 10 |
| 11 class ExtensionService; |
| 12 class TabContentsWrapper; |
| 13 |
| 14 namespace extensions { |
| 15 |
| 16 // An ActionBoxController which corresponds to the page actions of an extension. |
| 17 class PageActionController : public ActionBoxController { |
| 18 public: |
| 19 explicit PageActionController(TabContentsWrapper* tab_contents); |
| 20 virtual ~PageActionController(); |
| 21 |
| 22 virtual scoped_ptr<DataList> GetAllBadgeData() OVERRIDE; |
| 23 |
| 24 virtual Action OnClicked(const std::string& extension_id, |
| 25 int mouse_button) OVERRIDE; |
| 26 |
| 27 private: |
| 28 // Gets the ExtensionService for |tab_contents_|. |
| 29 ExtensionService* GetExtensionService(); |
| 30 |
| 31 TabContentsWrapper* tab_contents_; |
| 32 |
| 33 DISALLOW_COPY_AND_ASSIGN(PageActionController); |
| 34 }; |
| 35 |
| 36 } // namespace extensions |
| 37 |
| 38 #endif // CHROME_BROWSER_EXTENSIONS_PAGE_ACTION_CONTROLLER_H_ |
OLD | NEW |