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) | 349 #if defined(OS_WIN) |
oshima
2011/06/21 22:36:07
we can get rid of if/def?
| |
342 scoped_ptr<OmniboxViewWin> location_entry_; | 350 scoped_ptr<OmniboxView> location_entry_; |
343 #else | 351 #else |
344 scoped_ptr<OmniboxView> location_entry_; | 352 scoped_ptr<OmniboxView> location_entry_; |
345 #endif | 353 #endif |
346 | 354 |
347 // The Browser object that corresponds to this View. | 355 // The Browser object that corresponds to this View. |
348 Browser* browser_; | 356 Browser* browser_; |
349 | 357 |
350 // The model. | 358 // The model. |
351 ToolbarModel* model_; | 359 ToolbarModel* model_; |
352 | 360 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
425 // While animating, the host clips the widget and draws only the bottom | 433 // 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 | 434 // 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 | 435 // the widget so that we can draw the curved edges that attach to the toolbar |
428 // in the right location. | 436 // in the right location. |
429 int animation_offset_; | 437 int animation_offset_; |
430 | 438 |
431 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); | 439 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); |
432 }; | 440 }; |
433 | 441 |
434 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 442 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
OLD | NEW |