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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
304 virtual void TestPageActionPressed(size_t index) OVERRIDE; | 304 virtual void TestPageActionPressed(size_t index) OVERRIDE; |
305 | 305 |
306 // Overridden from TemplateURLServiceObserver | 306 // Overridden from TemplateURLServiceObserver |
307 virtual void OnTemplateURLServiceChanged() OVERRIDE; | 307 virtual void OnTemplateURLServiceChanged() OVERRIDE; |
308 | 308 |
309 // Overridden from content::NotificationObserver | 309 // Overridden from content::NotificationObserver |
310 virtual void Observe(int type, | 310 virtual void Observe(int type, |
311 const content::NotificationSource& source, | 311 const content::NotificationSource& source, |
312 const content::NotificationDetails& details) OVERRIDE; | 312 const content::NotificationDetails& details) OVERRIDE; |
313 | 313 |
314 // Calculates the height of the view. | 314 // Calculates the preferred internal height of the view, i.e. the |
315 int GetHeight(); | 315 // height occupied by the edit control within it. |
316 int GetPreferredInternalHeight(); | |
Peter Kasting
2012/05/18 22:45:40
Nit: I still think this is preferable:
// Retur
| |
316 | 317 |
317 // Space between items in the location bar. | 318 // Space between items in the location bar. |
318 static int GetItemPadding(); | 319 static int GetItemPadding(); |
319 | 320 |
320 // Space between the edges and the items next to them. | 321 // Space between the edges and the items next to them. |
321 static int GetEdgeItemPadding(); | 322 static int GetEdgeItemPadding(); |
322 | 323 |
323 // Thickness of the left and right edges of the omnibox, in normal mode. | 324 // Thickness of the left and right edges of the omnibox, in normal mode. |
324 static const int kNormalHorizontalEdgeThickness; | 325 static const int kNormalHorizontalEdgeThickness; |
325 // Thickness of the top and bottom edges of the omnibox. | 326 // Thickness of the top and bottom edges of the omnibox. |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
381 #if !defined(USE_AURA) | 382 #if !defined(USE_AURA) |
382 // Returns |location_entry_| cast to OmniboxViewWin, or NULL if | 383 // Returns |location_entry_| cast to OmniboxViewWin, or NULL if |
383 // |location_entry_| is of a different type. | 384 // |location_entry_| is of a different type. |
384 OmniboxViewWin* GetOmniboxViewWin(); | 385 OmniboxViewWin* GetOmniboxViewWin(); |
385 #endif | 386 #endif |
386 #endif | 387 #endif |
387 | 388 |
388 // Helper to show the first run info bubble. | 389 // Helper to show the first run info bubble. |
389 void ShowFirstRunBubbleInternal(); | 390 void ShowFirstRunBubbleInternal(); |
390 | 391 |
392 // Returns the internal height of the view after insets. | |
393 int GetInternalHeightImpl(int full_height); | |
394 | |
391 // The Autocomplete Edit field. | 395 // The Autocomplete Edit field. |
392 scoped_ptr<OmniboxView> location_entry_; | 396 scoped_ptr<OmniboxView> location_entry_; |
393 | 397 |
394 // The profile which corresponds to this View. | 398 // The profile which corresponds to this View. |
395 Profile* profile_; | 399 Profile* profile_; |
396 | 400 |
397 // Command updater which corresponds to this View. | 401 // Command updater which corresponds to this View. |
398 CommandUpdater* command_updater_; | 402 CommandUpdater* command_updater_; |
399 | 403 |
400 // The model. | 404 // The model. |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
475 // While animating, the host clips the widget and draws only the bottom | 479 // While animating, the host clips the widget and draws only the bottom |
476 // part of it. The view needs to know the pixel offset at which we are drawing | 480 // part of it. The view needs to know the pixel offset at which we are drawing |
477 // the widget so that we can draw the curved edges that attach to the toolbar | 481 // the widget so that we can draw the curved edges that attach to the toolbar |
478 // in the right location. | 482 // in the right location. |
479 int animation_offset_; | 483 int animation_offset_; |
480 | 484 |
481 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); | 485 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); |
482 }; | 486 }; |
483 | 487 |
484 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 488 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
OLD | NEW |