Check USB device path access when prompting users to select a device.
[chromium-blink-merge.git] / chrome / browser / ui / extensions / bookmark_app_browser_controller.h
blobe47aaf39af7457f57180d4b6ba4178a2db45438f
1 // Copyright 2015 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_UI_EXTENSIONS_BOOKMARK_APP_BROWSER_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_EXTENSIONS_BOOKMARK_APP_BROWSER_CONTROLLER_H_
8 #include <string>
10 #include "base/macros.h"
12 class Browser;
13 class Profile;
15 namespace extensions {
17 // Class to encapsulate logic to control the browser UI for bookmark apps.
18 class BookmarkAppBrowserController {
19 public:
20 // Indicates whether |browser| is a bookmark app browser.
21 static bool IsForBookmarkApp(Browser* browser);
23 explicit BookmarkAppBrowserController(Browser* browser);
24 ~BookmarkAppBrowserController();
26 // Whether the browser being controlled can ever show the location bar.
27 bool SupportsLocationBar();
29 // Whether the browser being controlled should be currently showing the
30 // location bar.
31 bool ShouldShowLocationBar();
33 // Updates the location bar visibility based on whether it should be
34 // currently visible or not. If |animate| is set, the change will be
35 // animated.
36 void UpdateLocationBarVisibility(bool animate);
38 // Whether the controlled browser should use the web app style frame.
39 bool should_use_web_app_frame() { return should_use_web_app_frame_; }
41 private:
42 Browser* browser_;
43 const std::string extension_id_;
44 const bool should_use_web_app_frame_;
46 DISALLOW_COPY_AND_ASSIGN(BookmarkAppBrowserController);
49 } // namespace extensions
51 #endif // CHROME_BROWSER_UI_EXTENSIONS_BOOKMARK_APP_BROWSER_CONTROLLER_H_