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

Side by Side Diff: chrome/browser/ui/views/toolbar/site_chip_view.h

Issue 62873007: [Toolbar] Base toolbar button class with background images for button states (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Graphics from UI. Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 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_TOOLBAR_SITE_CHIP_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_SITE_CHIP_VIEW_H_
7
8 #include "base/metrics/field_trial.h"
9 #include "chrome/browser/ui/toolbar/toolbar_model.h"
10 #include "chrome/browser/ui/views/toolbar/toolbar_button.h"
11 #include "ui/views/controls/button/button.h"
12 #include "ui/views/controls/button/label_button.h"
13 #include "ui/views/view.h"
14
15 class LocationIconView;
16 class ToolbarView;
17
18 namespace content {
19 class WebContents;
20 }
21
22 namespace views {
23 class Label;
24 }
25
26 class SiteChipView : public ToolbarButton {
Peter Kasting 2013/11/15 03:28:58 Is the site chip going to want a dropdown? If not
Greg Billock 2013/11/15 19:36:50 The problem is the diamond inheritance -- we have
Peter Kasting 2013/11/15 22:11:56 Could we make the toolbar button base class includ
Greg Billock 2013/11/19 00:07:59 The border stuff is pretty simple, so I think that
27 public:
28 explicit SiteChipView(ToolbarView* toolbar_view);
29 virtual ~SiteChipView();
30
31 void Init();
32
33 void Update(content::WebContents* tab);
34
35 void OnChanged();
36
37 views::ImageView* GetLocationIconView();
38 const views::ImageView* GetLocationIconView() const;
39
40 // views::ButtonListener
41 void ButtonPressed(views::Button* sender, const ui::Event& event) OVERRIDE;
42
43 // views::View
44 virtual gfx::Size GetPreferredSize() OVERRIDE;
45 virtual void Layout() OVERRIDE;
46
47 private:
48 ToolbarView* toolbar_view_;
49 views::Label* host_label_;
50 LocationIconView* location_icon_view_;
51
52 DISALLOW_COPY_AND_ASSIGN(SiteChipView);
53 };
54
55 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_SITE_CHIP_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698