OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_TOOLBAR_ORIGIN_CHIP_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ORIGIN_CHIP_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ORIGIN_CHIP_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ORIGIN_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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 const views::ImageView* location_icon_view() const { | 57 const views::ImageView* location_icon_view() const { |
58 return location_icon_view_; | 58 return location_icon_view_; |
59 } | 59 } |
60 | 60 |
61 // Elides the hostname shown to the indicated width, if needed. Returns the | 61 // Elides the hostname shown to the indicated width, if needed. Returns the |
62 // final width of the origin chip. Note: this may be more than the target | 62 // final width of the origin chip. Note: this may be more than the target |
63 // width, since the hostname will not be elided past the TLD+1. | 63 // width, since the hostname will not be elided past the TLD+1. |
64 int ElideDomainTarget(int target_max_width); | 64 int ElideDomainTarget(int target_max_width); |
65 | 65 |
66 // ToolbarButton: | 66 // ToolbarButton: |
67 virtual gfx::Size GetPreferredSize() OVERRIDE; | 67 virtual gfx::Size GetPreferredSize() const OVERRIDE; |
68 virtual void Layout() OVERRIDE; | 68 virtual void Layout() OVERRIDE; |
69 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 69 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
70 | 70 |
71 // views::ButtonListener: | 71 // views::ButtonListener: |
72 virtual void ButtonPressed(views::Button* sender, | 72 virtual void ButtonPressed(views::Button* sender, |
73 const ui::Event& event) OVERRIDE; | 73 const ui::Event& event) OVERRIDE; |
74 | 74 |
75 // views::DragController: | 75 // views::DragController: |
76 virtual void WriteDragDataForView(View* sender, | 76 virtual void WriteDragDataForView(View* sender, |
77 const gfx::Point& press_pt, | 77 const gfx::Point& press_pt, |
(...skipping 23 matching lines...) Expand all Loading... |
101 bool showing_16x16_icon_; | 101 bool showing_16x16_icon_; |
102 scoped_ptr<ToolbarOriginChipExtensionIcon> extension_icon_; | 102 scoped_ptr<ToolbarOriginChipExtensionIcon> extension_icon_; |
103 GURL url_displayed_; | 103 GURL url_displayed_; |
104 ToolbarModel::SecurityLevel security_level_; | 104 ToolbarModel::SecurityLevel security_level_; |
105 bool url_malware_; | 105 bool url_malware_; |
106 | 106 |
107 DISALLOW_COPY_AND_ASSIGN(ToolbarOriginChipView); | 107 DISALLOW_COPY_AND_ASSIGN(ToolbarOriginChipView); |
108 }; | 108 }; |
109 | 109 |
110 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ORIGIN_CHIP_VIEW_H_ | 110 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ORIGIN_CHIP_VIEW_H_ |
OLD | NEW |