Revert 285173 "Removed InProcessBrowserTest::CleanUpOnMainThread()"
[chromium-blink-merge.git] / chrome / browser / extensions / page_action_controller.h
blob179fd28bea77be617fe5d422a137cbd9ce1c32d8
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.
5 #ifndef CHROME_BROWSER_EXTENSIONS_PAGE_ACTION_CONTROLLER_H_
6 #define CHROME_BROWSER_EXTENSIONS_PAGE_ACTION_CONTROLLER_H_
8 #include <string>
10 #include "chrome/browser/extensions/location_bar_controller.h"
12 class Profile;
14 namespace extensions {
15 class ExtensionRegistry;
17 // A LocationBarControllerProvider which populates the location bar with icons
18 // based on the page_action extension API.
19 // TODO(rdevlin.cronin): This isn't really a controller.
20 class PageActionController : public LocationBarController::ActionProvider {
21 public:
22 explicit PageActionController(content::WebContents* web_contents);
23 virtual ~PageActionController();
25 // LocationBarController::Provider implementation.
26 virtual ExtensionAction* GetActionForExtension(const Extension* extension)
27 OVERRIDE;
28 virtual LocationBarController::Action OnClicked(
29 const Extension* extension) OVERRIDE;
30 virtual void OnNavigated() OVERRIDE;
32 private:
33 // Returns the associated Profile.
34 Profile* GetProfile();
36 // The associated WebContents.
37 content::WebContents* web_contents_;
39 DISALLOW_COPY_AND_ASSIGN(PageActionController);
42 } // namespace extensions
44 #endif // CHROME_BROWSER_EXTENSIONS_PAGE_ACTION_CONTROLLER_H_