OLD | NEW |
---|---|
(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" | |
Peter Kasting
2013/11/19 02:47:32
Nit: Almost none of these #includes seem necessary
Greg Billock
2013/11/20 01:27:35
Done.
| |
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 { | |
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(); | |
Peter Kasting
2013/11/19 02:47:32
This doesn't seem to be called, nor do the two fun
Greg Billock
2013/11/20 01:27:35
Yeah, I'll get rid of them here.
| |
36 | |
37 views::ImageView* GetLocationIconView(); | |
38 const views::ImageView* GetLocationIconView() const; | |
Peter Kasting
2013/11/19 02:47:32
It seems like these should be inlined unix_hacker(
Greg Billock
2013/11/20 01:27:35
They're the same names as the virtuals in the loca
Peter Kasting
2013/11/20 01:49:13
Sure, but why does that matter? It doesn't seem l
Greg Billock
2013/11/21 19:29:34
ok, I'll inline them
| |
39 | |
40 // views::ButtonListener | |
Peter Kasting
2013/11/19 02:47:32
Nit: You don't inherit directly from views::Button
Greg Billock
2013/11/20 01:27:35
Done.
| |
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_ | |
OLD | NEW |