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

Side by Side Diff: chrome/browser/ui/views/location_bar/origin_chip_view.h

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More compile fix for ToT Created 6 years, 7 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
OLDNEW
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_LOCATION_BAR_ORIGIN_CHIP_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ORIGIN_CHIP_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ORIGIN_CHIP_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // width, since the hostname will not be elided past the TLD+1. 58 // width, since the hostname will not be elided past the TLD+1.
59 int ElideDomainTarget(int target_max_width); 59 int ElideDomainTarget(int target_max_width);
60 60
61 // Starts an animation that fades in the border. 61 // Starts an animation that fades in the border.
62 void FadeIn(); 62 void FadeIn();
63 63
64 // Returns the current X position of the host label. 64 // Returns the current X position of the host label.
65 int host_label_x() const { return host_label_->x(); } 65 int host_label_x() const { return host_label_->x(); }
66 66
67 // views::LabelButton: 67 // views::LabelButton:
68 virtual gfx::Size GetPreferredSize() OVERRIDE; 68 virtual gfx::Size GetPreferredSize() const OVERRIDE;
69 69
70 private: 70 private:
71 // Sets an image grid to represent the current security state. 71 // Sets an image grid to represent the current security state.
72 void SetBorderImages(const int images[3][9]); 72 void SetBorderImages(const int images[3][9]);
73 73
74 // views::LabelButton: 74 // views::LabelButton:
75 virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE; 75 virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
76 virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE; 76 virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE;
77 virtual void Layout() OVERRIDE; 77 virtual void Layout() OVERRIDE;
78 virtual void OnPaintBorder(gfx::Canvas* canvas) OVERRIDE; 78 virtual void OnPaintBorder(gfx::Canvas* canvas) OVERRIDE;
(...skipping 16 matching lines...) Expand all
95 scoped_ptr<OriginChipExtensionIcon> extension_icon_; 95 scoped_ptr<OriginChipExtensionIcon> extension_icon_;
96 GURL url_displayed_; 96 GURL url_displayed_;
97 ToolbarModel::SecurityLevel security_level_; 97 ToolbarModel::SecurityLevel security_level_;
98 bool url_malware_; 98 bool url_malware_;
99 scoped_ptr<gfx::SlideAnimation> fade_in_animation_; 99 scoped_ptr<gfx::SlideAnimation> fade_in_animation_;
100 100
101 DISALLOW_COPY_AND_ASSIGN(OriginChipView); 101 DISALLOW_COPY_AND_ASSIGN(OriginChipView);
102 }; 102 };
103 103
104 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ORIGIN_CHIP_VIEW_H_ 104 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ORIGIN_CHIP_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.cc ('k') | chrome/browser/ui/views/location_bar/origin_chip_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698