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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 | 322 |
323 // Sets the visibility of view to new_vis. | 323 // Sets the visibility of view to new_vis. |
324 void ToggleVisibility(bool new_vis, views::View* view); | 324 void ToggleVisibility(bool new_vis, views::View* view); |
325 | 325 |
326 #if defined(OS_WIN) | 326 #if defined(OS_WIN) |
327 // Helper for the Mouse event handlers that does all the real work. | 327 // Helper for the Mouse event handlers that does all the real work. |
328 void OnMouseEvent(const views::MouseEvent& event, UINT msg); | 328 void OnMouseEvent(const views::MouseEvent& event, UINT msg); |
329 | 329 |
330 // Returns true if the suggest text is valid. | 330 // Returns true if the suggest text is valid. |
331 bool HasValidSuggestText() const; | 331 bool HasValidSuggestText() const; |
| 332 |
| 333 // Returns |location_entry_| cast to OmniboxViewWin, or NULL if |
| 334 // |location_entry_| is of a different type. |
| 335 OmniboxViewWin* GetOmniboxViewWin(); |
| 336 |
| 337 // Returns true if the views-based omnibox should be used. When false, |
| 338 // |location_entry_| can be cast to OmniboxViewWin. |
| 339 static bool UseViewsOmnibox(); |
332 #endif | 340 #endif |
333 | 341 |
334 // Helper to show the first run info bubble. | 342 // Helper to show the first run info bubble. |
335 void ShowFirstRunBubbleInternal(FirstRun::BubbleType bubble_type); | 343 void ShowFirstRunBubbleInternal(FirstRun::BubbleType bubble_type); |
336 | 344 |
337 // Current profile. Not owned by us. | 345 // Current profile. Not owned by us. |
338 Profile* profile_; | 346 Profile* profile_; |
339 | 347 |
340 // The Autocomplete Edit field. | 348 // The Autocomplete Edit field. |
341 #if defined(OS_WIN) | |
342 scoped_ptr<OmniboxViewWin> location_entry_; | |
343 #else | |
344 scoped_ptr<OmniboxView> location_entry_; | 349 scoped_ptr<OmniboxView> location_entry_; |
345 #endif | |
346 | 350 |
347 // The Browser object that corresponds to this View. | 351 // The Browser object that corresponds to this View. |
348 Browser* browser_; | 352 Browser* browser_; |
349 | 353 |
350 // The model. | 354 // The model. |
351 ToolbarModel* model_; | 355 ToolbarModel* model_; |
352 | 356 |
353 // Our delegate. | 357 // Our delegate. |
354 Delegate* delegate_; | 358 Delegate* delegate_; |
355 | 359 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 // While animating, the host clips the widget and draws only the bottom | 429 // 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 | 430 // 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 | 431 // the widget so that we can draw the curved edges that attach to the toolbar |
428 // in the right location. | 432 // in the right location. |
429 int animation_offset_; | 433 int animation_offset_; |
430 | 434 |
431 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); | 435 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); |
432 }; | 436 }; |
433 | 437 |
434 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 438 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
OLD | NEW |