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

Unified Diff: chrome/browser/ui/views/toolbar/site_chip_view.h

Issue 75873002: [SiteChip] Add the basic painting of the site chip button (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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 side-by-side diff with in-line comments
Download patch
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..1d500e59fb898b553b8ca03096b9f39bc9ebc6b7
--- /dev/null
+++ b/chrome/browser/ui/views/toolbar/site_chip_view.h
@@ -0,0 +1,51 @@
+// 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/toolbar/toolbar_button.h"
+#include "ui/views/controls/button/button.h"
+
+class LocationIconView;
+class ToolbarView;
+
+namespace content {
+class WebContents;
+}
+
+namespace views {
+class Button;
+class Label;
+}
+
+class SiteChipView : public ToolbarButton,
+ public views::ButtonListener {
+ public:
+ explicit SiteChipView(ToolbarView* toolbar_view);
+ virtual ~SiteChipView();
+
+ void Init();
+
+ void Update(content::WebContents* tab);
+
+ views::ImageView* GetLocationIconView();
+ const views::ImageView* GetLocationIconView() const;
+
+ // 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.
+ void ButtonPressed(views::Button* sender, const ui::Event& event) OVERRIDE;
+
+ // ToolbarButton:
+ virtual gfx::Size GetPreferredSize() OVERRIDE;
+ virtual void Layout() OVERRIDE;
+
+ private:
+ 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_
« no previous file with comments | « no previous file | chrome/browser/ui/views/toolbar/site_chip_view.cc » ('j') | chrome/browser/ui/views/toolbar/site_chip_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698