Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / ui / views / frame / web_app_left_header_view_ash.h
blobfbbf65ce9b2977d3e0e091a1072eb1d83de0ec49
1 // Copyright 2014 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_VIEWS_FRAME_WEB_APP_LEFT_HEADER_VIEW_ASH_H_
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_WEB_APP_LEFT_HEADER_VIEW_ASH_H_
8 #include "ui/views/controls/button/button.h"
10 class BrowserView;
12 namespace ash {
13 class FrameCaptionButton;
16 namespace views {
17 class ImageButton;
20 // WebAppLeftHeaderView is a container view for any icons on the left of the
21 // frame used for web app style windows. It contains a back button and a
22 // location icon.
23 class WebAppLeftHeaderView : public views::View,
24 public views::ButtonListener {
25 public:
26 static const char kViewClassName[];
28 explicit WebAppLeftHeaderView(BrowserView* browser_view);
29 ~WebAppLeftHeaderView() override;
31 // Updates the view.
32 void Update();
34 // Update whether to paint the header view as active or not.
35 void SetPaintAsActive(bool active);
37 views::View* GetLocationIconView() const;
39 private:
40 FRIEND_TEST_ALL_PREFIXES(WebAppLeftHeaderViewTest, BackButton);
41 FRIEND_TEST_ALL_PREFIXES(WebAppLeftHeaderViewTest, LocationIcon);
43 // views::View:
44 const char* GetClassName() const override;
46 // views::ButtonListener:
47 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
49 // Ask the browser to show the website settings dialog.
50 void ShowWebsiteSettings() const;
52 // Update the state of the back button.
53 void UpdateBackButtonState(bool enabled);
55 // The BrowserView for the frame.
56 BrowserView* browser_view_;
58 // The back button.
59 ash::FrameCaptionButton* back_button_;
61 // The location icon indicator. Shows the connection security status and
62 // allows the user to bring up the website settings dialog.
63 ash::FrameCaptionButton* location_icon_;
65 DISALLOW_COPY_AND_ASSIGN(WebAppLeftHeaderView);
68 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_WEB_APP_LEFT_HEADER_VIEW_ASH_H_