summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/webui/chrome_web_ui.h
blob: 765fe0300f72614010e90eaeab0368657964fcd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_UI_WEBUI_CHROME_WEB_UI_H_
#define CHROME_BROWSER_UI_WEBUI_CHROME_WEB_UI_H_
#pragma once

#include "content/browser/webui/web_ui.h"

class Profile;

class ChromeWebUI : public WebUI {
 public:
  explicit ChromeWebUI(TabContents* contents);
  virtual ~ChromeWebUI();

  // Returns the profile for this WebUI.
  Profile* GetProfile() const;

  // Returns true if the bookmark bar should be forced to being visible,
  // overriding the user's preference.
  bool force_bookmark_bar_visible() const {
    return force_bookmark_bar_visible_;
  }

  // IsMoreWebUI returns a command line flag that tracks whether to use
  // available WebUI implementations of native dialogs.
  static bool IsMoreWebUI();

  // Override the argument setting for more WebUI. If true this enables more
  // WebUI.
  static void OverrideMoreWebUI(bool use_more_webui);

 protected:
  void set_force_bookmark_bar_visible(bool value) {
    force_bookmark_bar_visible_ = value;
  }

 private:
  bool force_bookmark_bar_visible_;

  DISALLOW_COPY_AND_ASSIGN(ChromeWebUI);
};

#endif  // CHROME_BROWSER_UI_WEBUI_CHROME_WEB_UI_H_