Index: chrome/browser/ui/views/toolbar/site_chip_view.h |
diff --git a/chrome/browser/ui/views/toolbar/site_chip_view.h b/chrome/browser/ui/views/toolbar/site_chip_view.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3fcddaceba24006244c7f704c6b39a1563491790 |
--- /dev/null |
+++ b/chrome/browser/ui/views/toolbar/site_chip_view.h |
@@ -0,0 +1,64 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_SITE_CHIP_VIEW_H_ |
+#define CHROME_BROWSER_UI_VIEWS_TOOLBAR_SITE_CHIP_VIEW_H_ |
+ |
+#include "chrome/browser/ui/views/location_bar/location_icon_view.h" |
+#include "chrome/browser/ui/views/toolbar/toolbar_button.h" |
+#include "ui/views/controls/button/button.h" |
+ |
+class ToolbarView; |
+ |
+namespace content { |
+class WebContents; |
+} |
+ |
+namespace gfx { |
+class Canvas; |
+} |
+ |
+namespace views { |
+class Button; |
+class Label; |
+} |
+ |
+class SiteChipView : public ToolbarButton, |
+ public views::ButtonListener { |
+ public: |
+ explicit SiteChipView(ToolbarView* toolbar_view); |
+ virtual ~SiteChipView(); |
+ |
+ void Init(); |
+ |
+ bool ShouldShow(); |
Peter Kasting
2013/12/03 00:58:10
Nit: Comment?
Greg Billock
2013/12/03 17:35:08
Done.
|
+ |
+ void Update(content::WebContents* tab); |
+ |
+ views::ImageView* location_icon_view() { return location_icon_view_; } |
+ |
+ // ToolbarButton: |
+ virtual gfx::Size GetPreferredSize() OVERRIDE; |
+ virtual void Layout() OVERRIDE; |
+ virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
+ |
+ // views::ButtonListener: |
+ void ButtonPressed(views::Button* sender, const ui::Event& event) OVERRIDE; |
+ |
+ // Return true if we will draw an opaque background |
Peter Kasting
2013/12/03 00:58:10
Nit: Return -> Returns; wrap as close to 80 cols a
Greg Billock
2013/12/03 17:35:08
Not using this any more. Deleting.
|
+ // (i.e. for EV cert or malware state) |
+ bool DrawingBackground(); |
Peter Kasting
2013/12/03 00:58:10
Nit: Place all non-virtuals in a group
Greg Billock
2013/12/03 17:35:08
deleted
|
+ |
+ private: |
+ static const int kEdgeThickness; |
+ static const int kIconTextSpacing; |
+ static const int kTrailingLabelMargin; |
Peter Kasting
2013/12/03 00:58:10
Nit: I suggest a blank line below here
Really tho
Greg Billock
2013/12/03 17:35:08
Done.
|
+ ToolbarView* toolbar_view_; |
+ views::Label* host_label_; |
+ LocationIconView* location_icon_view_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(SiteChipView); |
+}; |
+ |
+#endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_SITE_CHIP_VIEW_H_ |