Chromium Code Reviews| 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 "chrome/browser/ui/views/toolbar/toolbar_button.h" | |
| 9 #include "ui/views/controls/button/button.h" | |
| 10 | |
| 11 class LocationIconView; | |
| 12 class ToolbarView; | |
| 13 | |
| 14 namespace content { | |
| 15 class WebContents; | |
| 16 } | |
| 17 | |
| 18 namespace views { | |
| 19 class Button; | |
| 20 class Label; | |
| 21 } | |
| 22 | |
| 23 class SiteChipView : public ToolbarButton, | |
| 24 public views::ButtonListener { | |
| 25 public: | |
| 26 explicit SiteChipView(ToolbarView* toolbar_view); | |
| 27 virtual ~SiteChipView(); | |
| 28 | |
| 29 void Init(); | |
| 30 | |
| 31 void Update(content::WebContents* tab); | |
| 32 | |
| 33 views::ImageView* GetLocationIconView(); | |
| 34 const views::ImageView* GetLocationIconView() const; | |
| 35 | |
| 36 // views::ButtonListener: | |
|
Peter Kasting
2013/11/20 01:49:13
Nit: Declare blocks of overrides in the same order
Greg Billock
2013/11/21 19:29:34
Done.
| |
| 37 void ButtonPressed(views::Button* sender, const ui::Event& event) OVERRIDE; | |
| 38 | |
| 39 // ToolbarButton: | |
| 40 virtual gfx::Size GetPreferredSize() OVERRIDE; | |
| 41 virtual void Layout() OVERRIDE; | |
| 42 | |
| 43 private: | |
| 44 ToolbarView* toolbar_view_; | |
| 45 views::Label* host_label_; | |
| 46 LocationIconView* location_icon_view_; | |
| 47 | |
| 48 DISALLOW_COPY_AND_ASSIGN(SiteChipView); | |
| 49 }; | |
| 50 | |
| 51 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_SITE_CHIP_VIEW_H_ | |
| OLD | NEW |