| 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 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 int GetInternalHeight(bool use_preferred_size); | 252 int GetInternalHeight(bool use_preferred_size); |
| 253 | 253 |
| 254 // Returns the position and width that the popup should be, and also the left | 254 // Returns the position and width that the popup should be, and also the left |
| 255 // edge that the results should align themselves to (which will leave some | 255 // edge that the results should align themselves to (which will leave some |
| 256 // border on the left of the popup). | 256 // border on the left of the popup). |
| 257 void GetOmniboxPopupPositioningInfo(gfx::Point* top_left_screen_coord, | 257 void GetOmniboxPopupPositioningInfo(gfx::Point* top_left_screen_coord, |
| 258 int* popup_width, | 258 int* popup_width, |
| 259 int* left_margin, | 259 int* left_margin, |
| 260 int* right_margin); | 260 int* right_margin); |
| 261 | 261 |
| 262 // Space between items in the location bar, as well as between items and the | |
| 263 // edges. | |
| 264 static int GetItemPadding(); | |
| 265 | |
| 266 // LocationBar: | 262 // LocationBar: |
| 267 virtual void FocusLocation(bool select_all) OVERRIDE; | 263 virtual void FocusLocation(bool select_all) OVERRIDE; |
| 268 virtual void Revert() OVERRIDE; | 264 virtual void Revert() OVERRIDE; |
| 269 virtual OmniboxView* GetOmniboxView() OVERRIDE; | 265 virtual OmniboxView* GetOmniboxView() OVERRIDE; |
| 270 | 266 |
| 271 // views::View: | 267 // views::View: |
| 272 virtual bool HasFocus() const OVERRIDE; | 268 virtual bool HasFocus() const OVERRIDE; |
| 273 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; | 269 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; |
| 274 virtual gfx::Size GetPreferredSize() OVERRIDE; | 270 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 275 virtual void Layout() OVERRIDE; | 271 virtual void Layout() OVERRIDE; |
| 276 | 272 |
| 277 // OmniboxEditController: | 273 // OmniboxEditController: |
| 278 virtual void Update(const content::WebContents* contents) OVERRIDE; | 274 virtual void Update(const content::WebContents* contents) OVERRIDE; |
| 279 virtual void ShowURL() OVERRIDE; | 275 virtual void ShowURL() OVERRIDE; |
| 280 virtual ToolbarModel* GetToolbarModel() OVERRIDE; | 276 virtual ToolbarModel* GetToolbarModel() OVERRIDE; |
| 281 virtual content::WebContents* GetWebContents() OVERRIDE; | 277 virtual content::WebContents* GetWebContents() OVERRIDE; |
| 282 | 278 |
| 283 // Thickness of the edges of the omnibox background images, in normal mode. | 279 // Thickness of the edges of the omnibox background images, in normal mode. |
| 284 static const int kNormalEdgeThickness; | 280 static const int kNormalEdgeThickness; |
| 285 // The same, but for popup mode. | 281 // The same, but for popup mode. |
| 286 static const int kPopupEdgeThickness; | 282 static const int kPopupEdgeThickness; |
| 283 // Space between items in the location bar, as well as between items and the |
| 284 // edges. |
| 285 static const int kItemPadding; |
| 287 // Amount of padding built into the standard omnibox icons. | 286 // Amount of padding built into the standard omnibox icons. |
| 288 static const int kIconInternalPadding; | 287 static const int kIconInternalPadding; |
| 289 // Amount of padding to place between the origin chip and the leading edge of | 288 // Amount of padding to place between the origin chip and the leading edge of |
| 290 // the location bar. | 289 // the location bar. |
| 291 static const int kOriginChipEdgeItemPadding; | 290 static const int kOriginChipEdgeItemPadding; |
| 292 // Amount of padding built into the origin chip. | 291 // Amount of padding built into the origin chip. |
| 293 static const int kOriginChipBuiltinPadding; | 292 static const int kOriginChipBuiltinPadding; |
| 294 // Space between the edge and a bubble. | 293 // Space between the edge and a bubble. |
| 295 static const int kBubblePadding; | 294 static const int kBubblePadding; |
| 296 | 295 |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 // Used to register for notifications received by NotificationObserver. | 539 // Used to register for notifications received by NotificationObserver. |
| 541 content::NotificationRegistrar registrar_; | 540 content::NotificationRegistrar registrar_; |
| 542 | 541 |
| 543 // Used to bind callback functions to this object. | 542 // Used to bind callback functions to this object. |
| 544 base::WeakPtrFactory<LocationBarView> weak_ptr_factory_; | 543 base::WeakPtrFactory<LocationBarView> weak_ptr_factory_; |
| 545 | 544 |
| 546 DISALLOW_COPY_AND_ASSIGN(LocationBarView); | 545 DISALLOW_COPY_AND_ASSIGN(LocationBarView); |
| 547 }; | 546 }; |
| 548 | 547 |
| 549 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 548 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
| OLD | NEW |