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

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

Issue 141333004: [SiteChip] Remove 50% width cap for site chip (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 10 months 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/toolbar/site_chip_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_SITE_CHIP_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_SITE_CHIP_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_SITE_CHIP_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_SITE_CHIP_VIEW_H_
7 7
8 #include "chrome/browser/safe_browsing/ui_manager.h" 8 #include "chrome/browser/safe_browsing/ui_manager.h"
9 #include "chrome/browser/ui/toolbar/toolbar_model.h" 9 #include "chrome/browser/ui/toolbar/toolbar_model.h"
10 #include "chrome/browser/ui/views/location_bar/location_icon_view.h" 10 #include "chrome/browser/ui/views/location_bar/location_icon_view.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // the site chip needs to update itself to the new state. 49 // the site chip needs to update itself to the new state.
50 void OnChanged(); 50 void OnChanged();
51 51
52 views::ImageView* location_icon_view() { 52 views::ImageView* location_icon_view() {
53 return location_icon_view_; 53 return location_icon_view_;
54 } 54 }
55 const views::ImageView* location_icon_view() const { 55 const views::ImageView* location_icon_view() const {
56 return location_icon_view_; 56 return location_icon_view_;
57 } 57 }
58 58
59 // Elides the hostname shown to the indicated width, if needed. Returns the
60 // final width of the site chip. Note: this may be more than the target width,
61 // since the hostname will not be elided past the TLD+1.
62 int ElideDomainTarget(int target_max_width);
63
59 // ToolbarButton: 64 // ToolbarButton:
60 virtual gfx::Size GetPreferredSize() OVERRIDE; 65 virtual gfx::Size GetPreferredSize() OVERRIDE;
61 virtual void Layout() OVERRIDE; 66 virtual void Layout() OVERRIDE;
62 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 67 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
63 68
64 // views::ButtonListener: 69 // views::ButtonListener:
65 virtual void ButtonPressed(views::Button* sender, 70 virtual void ButtonPressed(views::Button* sender,
66 const ui::Event& event) OVERRIDE; 71 const ui::Event& event) OVERRIDE;
67 72
68 // views::DragController: 73 // views::DragController:
(...skipping 27 matching lines...) Expand all
96 bool showing_16x16_icon_; 101 bool showing_16x16_icon_;
97 scoped_ptr<SiteChipExtensionIcon> extension_icon_; 102 scoped_ptr<SiteChipExtensionIcon> extension_icon_;
98 GURL url_displayed_; 103 GURL url_displayed_;
99 ToolbarModel::SecurityLevel security_level_; 104 ToolbarModel::SecurityLevel security_level_;
100 bool url_malware_; 105 bool url_malware_;
101 106
102 DISALLOW_COPY_AND_ASSIGN(SiteChipView); 107 DISALLOW_COPY_AND_ASSIGN(SiteChipView);
103 }; 108 };
104 109
105 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_SITE_CHIP_VIEW_H_ 110 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_SITE_CHIP_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/toolbar/site_chip_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698