| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 161 |
| 162 #if defined(OS_WIN) || defined(USE_AURA) | 162 #if defined(OS_WIN) || defined(USE_AURA) |
| 163 // Invoked from OmniboxViewWin to show the instant suggestion. | 163 // Invoked from OmniboxViewWin to show the instant suggestion. |
| 164 void SetInstantSuggestion(const string16& text, | 164 void SetInstantSuggestion(const string16& text, |
| 165 bool animate_to_complete); | 165 bool animate_to_complete); |
| 166 | 166 |
| 167 // Returns the current instant suggestion text. | 167 // Returns the current instant suggestion text. |
| 168 string16 GetInstantSuggestion() const; | 168 string16 GetInstantSuggestion() const; |
| 169 #endif | 169 #endif |
| 170 | 170 |
| 171 // Sets whether the location entry can accept focus. |
| 172 void SetLocationEntryFocusable(bool focusable); |
| 173 |
| 174 // Returns true if the location entry is focusable and visible in |
| 175 // the root view. |
| 176 bool IsLocationEntryFocusableInRootView() const; |
| 177 |
| 171 // Sizing functions | 178 // Sizing functions |
| 172 virtual gfx::Size GetPreferredSize() OVERRIDE; | 179 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 173 | 180 |
| 174 // Layout and Painting functions | 181 // Layout and Painting functions |
| 175 virtual void Layout() OVERRIDE; | 182 virtual void Layout() OVERRIDE; |
| 176 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 183 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
| 177 | 184 |
| 178 // No focus border for the location bar, the caret is enough. | 185 // No focus border for the location bar, the caret is enough. |
| 179 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE { } | 186 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE { } |
| 180 | 187 |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 // While animating, the host clips the widget and draws only the bottom | 432 // While animating, the host clips the widget and draws only the bottom |
| 426 // part of it. The view needs to know the pixel offset at which we are drawing | 433 // part of it. The view needs to know the pixel offset at which we are drawing |
| 427 // the widget so that we can draw the curved edges that attach to the toolbar | 434 // the widget so that we can draw the curved edges that attach to the toolbar |
| 428 // in the right location. | 435 // in the right location. |
| 429 int animation_offset_; | 436 int animation_offset_; |
| 430 | 437 |
| 431 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); | 438 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); |
| 432 }; | 439 }; |
| 433 | 440 |
| 434 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 441 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
| OLD | NEW |