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

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_LOCATION_BAR_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 views::ImageView* GetLocationIconView(); 226 views::ImageView* GetLocationIconView();
227 const views::ImageView* GetLocationIconView() const; 227 const views::ImageView* GetLocationIconView() const;
228 228
229 // Return a view suitable for anchoring location-bar-anchored bubbles to. 229 // Return a view suitable for anchoring location-bar-anchored bubbles to.
230 views::View* GetLocationBarAnchor(); 230 views::View* GetLocationBarAnchor();
231 // Return the point suitable for anchoring location-bar-anchored bubbles at. 231 // Return the point suitable for anchoring location-bar-anchored bubbles at.
232 // The point will be returned in the coordinates of the LocationBarView. 232 // The point will be returned in the coordinates of the LocationBarView.
233 gfx::Point GetLocationBarAnchorPoint() const; 233 gfx::Point GetLocationBarAnchorPoint() const;
234 234
235 OmniboxViewViews* omnibox_view() { return omnibox_view_; } 235 OmniboxViewViews* omnibox_view() { return omnibox_view_; }
236 const OmniboxViewViews* omnibox_view() const { return omnibox_view_; }
236 237
237 views::View* generated_credit_card_view(); 238 views::View* generated_credit_card_view();
238 239
239 // Returns the height of the control without the top and bottom 240 // Returns the height of the control without the top and bottom
240 // edges(i.e. the height of the edit control inside). If 241 // edges(i.e. the height of the edit control inside). If
241 // |use_preferred_size| is true this will be the preferred height, 242 // |use_preferred_size| is true this will be the preferred height,
242 // otherwise it will be the current height. 243 // otherwise it will be the current height.
243 int GetInternalHeight(bool use_preferred_size); 244 int GetInternalHeight(bool use_preferred_size);
244 245
245 // Returns the position and width that the popup should be, and also the left 246 // Returns the position and width that the popup should be, and also the left
246 // edge that the results should align themselves to (which will leave some 247 // edge that the results should align themselves to (which will leave some
247 // border on the left of the popup). 248 // border on the left of the popup).
248 void GetOmniboxPopupPositioningInfo(gfx::Point* top_left_screen_coord, 249 void GetOmniboxPopupPositioningInfo(gfx::Point* top_left_screen_coord,
249 int* popup_width, 250 int* popup_width,
250 int* left_margin, 251 int* left_margin,
251 int* right_margin); 252 int* right_margin);
252 253
253 // LocationBar: 254 // LocationBar:
254 virtual void FocusLocation(bool select_all) OVERRIDE; 255 virtual void FocusLocation(bool select_all) OVERRIDE;
255 virtual void Revert() OVERRIDE; 256 virtual void Revert() OVERRIDE;
256 virtual OmniboxView* GetOmniboxView() OVERRIDE; 257 virtual OmniboxView* GetOmniboxView() OVERRIDE;
257 258
258 // views::View: 259 // views::View:
259 virtual bool HasFocus() const OVERRIDE; 260 virtual bool HasFocus() const OVERRIDE;
260 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; 261 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
261 virtual gfx::Size GetPreferredSize() OVERRIDE; 262 virtual gfx::Size GetPreferredSize() const OVERRIDE;
262 virtual void Layout() OVERRIDE; 263 virtual void Layout() OVERRIDE;
263 264
264 // OmniboxEditController: 265 // OmniboxEditController:
265 virtual void Update(const content::WebContents* contents) OVERRIDE; 266 virtual void Update(const content::WebContents* contents) OVERRIDE;
266 virtual void ShowURL() OVERRIDE; 267 virtual void ShowURL() OVERRIDE;
267 virtual ToolbarModel* GetToolbarModel() OVERRIDE; 268 virtual ToolbarModel* GetToolbarModel() OVERRIDE;
268 virtual content::WebContents* GetWebContents() OVERRIDE; 269 virtual content::WebContents* GetWebContents() OVERRIDE;
269 270
270 // Thickness of the edges of the omnibox background images, in normal mode. 271 // Thickness of the edges of the omnibox background images, in normal mode.
271 static const int kNormalEdgeThickness; 272 static const int kNormalEdgeThickness;
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 // Used to register for notifications received by NotificationObserver. 533 // Used to register for notifications received by NotificationObserver.
533 content::NotificationRegistrar registrar_; 534 content::NotificationRegistrar registrar_;
534 535
535 // Used to bind callback functions to this object. 536 // Used to bind callback functions to this object.
536 base::WeakPtrFactory<LocationBarView> weak_ptr_factory_; 537 base::WeakPtrFactory<LocationBarView> weak_ptr_factory_;
537 538
538 DISALLOW_COPY_AND_ASSIGN(LocationBarView); 539 DISALLOW_COPY_AND_ASSIGN(LocationBarView);
539 }; 540 };
540 541
541 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ 542 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/keyword_hint_view.cc ('k') | chrome/browser/ui/views/location_bar/location_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698