| 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> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "chrome/browser/autocomplete/autocomplete_edit.h" | 13 #include "chrome/browser/autocomplete/autocomplete_edit.h" |
| 14 #include "chrome/browser/extensions/extension_context_menu_model.h" | 14 #include "chrome/browser/extensions/extension_context_menu_model.h" |
| 15 #include "chrome/browser/prefs/pref_member.h" | 15 #include "chrome/browser/prefs/pref_member.h" |
| 16 #include "chrome/browser/search_engines/template_url_service_observer.h" | 16 #include "chrome/browser/search_engines/template_url_service_observer.h" |
| 17 #include "chrome/browser/ui/omnibox/location_bar.h" | 17 #include "chrome/browser/ui/omnibox/location_bar.h" |
| 18 #include "chrome/browser/ui/toolbar/toolbar_model.h" | 18 #include "chrome/browser/ui/toolbar/toolbar_model.h" |
| 19 #include "chrome/browser/ui/views/dropdown_bar_host.h" | 19 #include "chrome/browser/ui/views/dropdown_bar_host.h" |
| 20 #include "chrome/browser/ui/views/dropdown_bar_host_delegate.h" | 20 #include "chrome/browser/ui/views/dropdown_bar_host_delegate.h" |
| 21 #include "chrome/browser/ui/views/extensions/extension_popup.h" | 21 #include "chrome/browser/ui/views/extensions/extension_popup.h" |
| 22 #include "content/public/browser/notification_observer.h" | 22 #include "content/public/browser/notification_observer.h" |
| 23 #include "content/public/browser/notification_registrar.h" | 23 #include "content/public/browser/notification_registrar.h" |
| 24 #include "ui/gfx/font.h" | 24 #include "ui/gfx/font.h" |
| 25 #include "ui/gfx/rect.h" | 25 #include "ui/gfx/rect.h" |
| 26 #include "ui/views/controls/native/native_view_host.h" | 26 #include "ui/views/controls/native/native_view_host.h" |
| 27 #include "ui/views/drag_controller.h" | 27 #include "ui/views/drag_controller.h" |
| 28 | 28 |
| 29 #if defined(USE_AURA) | |
| 30 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h" | |
| 31 #elif defined(OS_WIN) | |
| 32 #include "chrome/browser/ui/views/omnibox/omnibox_view_win.h" | |
| 33 #endif | |
| 34 | |
| 35 class ActionBoxButtonView; | 29 class ActionBoxButtonView; |
| 36 class ChromeToMobileView; | 30 class ChromeToMobileView; |
| 37 class CommandUpdater; | 31 class CommandUpdater; |
| 38 class ContentSettingBubbleModelDelegate; | 32 class ContentSettingBubbleModelDelegate; |
| 39 class ContentSettingImageView; | 33 class ContentSettingImageView; |
| 40 class EVBubbleView; | 34 class EVBubbleView; |
| 41 class ExtensionAction; | 35 class ExtensionAction; |
| 42 class GURL; | 36 class GURL; |
| 43 class InstantController; | 37 class InstantController; |
| 44 class KeywordHintView; | 38 class KeywordHintView; |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 void ToggleVisibility(bool new_vis, views::View* view); | 365 void ToggleVisibility(bool new_vis, views::View* view); |
| 372 | 366 |
| 373 #if !defined(USE_AURA) | 367 #if !defined(USE_AURA) |
| 374 // Helper for the Mouse event handlers that does all the real work. | 368 // Helper for the Mouse event handlers that does all the real work. |
| 375 void OnMouseEvent(const views::MouseEvent& event, UINT msg); | 369 void OnMouseEvent(const views::MouseEvent& event, UINT msg); |
| 376 #endif | 370 #endif |
| 377 | 371 |
| 378 // Returns true if the suggest text is valid. | 372 // Returns true if the suggest text is valid. |
| 379 bool HasValidSuggestText() const; | 373 bool HasValidSuggestText() const; |
| 380 | 374 |
| 381 #if !defined(USE_AURA) | |
| 382 // Returns |location_entry_| cast to OmniboxViewWin, or NULL if | |
| 383 // |location_entry_| is of a different type. | |
| 384 OmniboxViewWin* GetOmniboxViewWin(); | |
| 385 #endif | |
| 386 | |
| 387 // Helper to show the first run info bubble. | 375 // Helper to show the first run info bubble. |
| 388 void ShowFirstRunBubbleInternal(); | 376 void ShowFirstRunBubbleInternal(); |
| 389 | 377 |
| 390 // Draw the background and the left border. | 378 // Draw the background and the left border. |
| 391 void PaintActionBoxBackground(gfx::Canvas* canvas, | 379 void PaintActionBoxBackground(gfx::Canvas* canvas, |
| 392 const gfx::Rect& content_rect); | 380 const gfx::Rect& content_rect); |
| 393 | 381 |
| 394 // The Autocomplete Edit field. | 382 // The Autocomplete Edit field. |
| 395 scoped_ptr<OmniboxView> location_entry_; | 383 scoped_ptr<OmniboxView> location_entry_; |
| 396 | 384 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 // in the right location. | 470 // in the right location. |
| 483 int animation_offset_; | 471 int animation_offset_; |
| 484 | 472 |
| 485 // Used to register for notifications received by NotificationObserver. | 473 // Used to register for notifications received by NotificationObserver. |
| 486 content::NotificationRegistrar registrar_; | 474 content::NotificationRegistrar registrar_; |
| 487 | 475 |
| 488 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); | 476 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); |
| 489 }; | 477 }; |
| 490 | 478 |
| 491 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 479 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
| OLD | NEW |