Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(774)

Side by Side Diff: chrome/browser/ui/views/frame/web_app_left_header_view_ash.h

Issue 2552903003: Remove unreleased web app frame code from ChromeOS (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
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_
7
8 #include "base/gtest_prod_util.h"
9 #include "base/macros.h"
10 #include "ui/views/controls/button/button.h"
11
12 class BrowserView;
13
14 namespace ash {
15 class FrameCaptionButton;
16 }
17
18 // WebAppLeftHeaderView is a container view for any icons on the left of the
19 // frame used for web app style windows. It contains a back button and a
20 // location icon.
21 class WebAppLeftHeaderView : public views::View,
22 public views::ButtonListener {
23 public:
24 static const char kViewClassName[];
25
26 explicit WebAppLeftHeaderView(BrowserView* browser_view);
27 ~WebAppLeftHeaderView() override;
28
29 // Updates the view.
30 void Update();
31
32 // Update whether to paint the header view as active or not.
33 void SetPaintAsActive(bool active);
34
35 views::View* GetLocationIconView() const;
36
37 private:
38 FRIEND_TEST_ALL_PREFIXES(WebAppLeftHeaderViewTest, BackButton);
39 FRIEND_TEST_ALL_PREFIXES(WebAppLeftHeaderViewTest, LocationIcon);
40
41 // views::View:
42 const char* GetClassName() const override;
43
44 // views::ButtonListener:
45 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
46
47 // Ask the browser to show the website settings dialog.
48 void ShowWebsiteSettings() const;
49
50 // Update the state of the back button.
51 void UpdateBackButtonState(bool enabled);
52
53 // The BrowserView for the frame.
54 BrowserView* browser_view_;
55
56 // The back button.
57 ash::FrameCaptionButton* back_button_;
58
59 // The location icon indicator. Shows the connection security status and
60 // allows the user to bring up the website settings dialog.
61 ash::FrameCaptionButton* location_icon_;
62
63 DISALLOW_COPY_AND_ASSIGN(WebAppLeftHeaderView);
64 };
65
66 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_WEB_APP_LEFT_HEADER_VIEW_ASH_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698