OLD | NEW |
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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 virtual void TestPageActionPressed(size_t index) OVERRIDE; | 305 virtual void TestPageActionPressed(size_t index) OVERRIDE; |
306 | 306 |
307 // Overridden from TemplateURLServiceObserver | 307 // Overridden from TemplateURLServiceObserver |
308 virtual void OnTemplateURLServiceChanged() OVERRIDE; | 308 virtual void OnTemplateURLServiceChanged() OVERRIDE; |
309 | 309 |
310 // Overridden from content::NotificationObserver | 310 // Overridden from content::NotificationObserver |
311 virtual void Observe(int type, | 311 virtual void Observe(int type, |
312 const content::NotificationSource& source, | 312 const content::NotificationSource& source, |
313 const content::NotificationDetails& details) OVERRIDE; | 313 const content::NotificationDetails& details) OVERRIDE; |
314 | 314 |
315 // Calculates the height of the view. | 315 // Returns the height of the control without the top and bottom |
316 int GetHeight(); | 316 // edges(i.e. the height of the edit control inside). If |
| 317 // |use_preferred_size| is true this will be the preferred height, |
| 318 // otherwise it will be the current height. |
| 319 int GetInternalHeight(bool use_preferred_size); |
317 | 320 |
318 // Space between items in the location bar. | 321 // Space between items in the location bar. |
319 static int GetItemPadding(); | 322 static int GetItemPadding(); |
320 | 323 |
321 // Space between the edges and the items next to them. | 324 // Space between the edges and the items next to them. |
322 static int GetEdgeItemPadding(); | 325 static int GetEdgeItemPadding(); |
323 | 326 |
324 // Thickness of the left and right edges of the omnibox, in normal mode. | 327 // Thickness of the left and right edges of the omnibox, in normal mode. |
325 static const int kNormalHorizontalEdgeThickness; | 328 static const int kNormalHorizontalEdgeThickness; |
326 // Thickness of the top and bottom edges of the omnibox. | 329 // Thickness of the top and bottom edges of the omnibox. |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 // While animating, the host clips the widget and draws only the bottom | 482 // While animating, the host clips the widget and draws only the bottom |
480 // part of it. The view needs to know the pixel offset at which we are drawing | 483 // part of it. The view needs to know the pixel offset at which we are drawing |
481 // the widget so that we can draw the curved edges that attach to the toolbar | 484 // the widget so that we can draw the curved edges that attach to the toolbar |
482 // in the right location. | 485 // in the right location. |
483 int animation_offset_; | 486 int animation_offset_; |
484 | 487 |
485 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); | 488 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); |
486 }; | 489 }; |
487 | 490 |
488 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 491 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
OLD | NEW |