| 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 |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "chrome/browser/extensions/extension_context_menu_model.h" | 12 #include "chrome/browser/extensions/extension_context_menu_model.h" |
| 13 #include "chrome/browser/prefs/pref_member.h" | 13 #include "chrome/browser/prefs/pref_member.h" |
| 14 #include "chrome/browser/search_engines/template_url_service_observer.h" | 14 #include "chrome/browser/search_engines/template_url_service_observer.h" |
| 15 #include "chrome/browser/ui/omnibox/location_bar.h" | 15 #include "chrome/browser/ui/omnibox/location_bar.h" |
| 16 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h" | 16 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h" |
| 17 #include "chrome/browser/ui/search/search_model_observer.h" | 17 #include "chrome/browser/ui/search/search_model_observer.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 "chrome/browser/ui/views/location_bar/action_box_button_view.h" |
| 22 #include "chrome/browser/ui/zoom/zoom_controller.h" | 23 #include "chrome/browser/ui/zoom/zoom_controller.h" |
| 23 #include "content/public/browser/notification_observer.h" | 24 #include "content/public/browser/notification_observer.h" |
| 24 #include "content/public/browser/notification_registrar.h" | 25 #include "content/public/browser/notification_registrar.h" |
| 25 #include "ui/gfx/font.h" | 26 #include "ui/gfx/font.h" |
| 26 #include "ui/gfx/rect.h" | 27 #include "ui/gfx/rect.h" |
| 27 #include "ui/views/controls/native/native_view_host.h" | 28 #include "ui/views/controls/native/native_view_host.h" |
| 28 #include "ui/views/drag_controller.h" | 29 #include "ui/views/drag_controller.h" |
| 29 | 30 |
| 30 #if defined(USE_AURA) | 31 #if defined(USE_AURA) |
| 31 #include "ui/compositor/layer_animation_observer.h" | 32 #include "ui/compositor/layer_animation_observer.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // | 73 // |
| 73 ///////////////////////////////////////////////////////////////////////////// | 74 ///////////////////////////////////////////////////////////////////////////// |
| 74 class LocationBarView : public LocationBar, | 75 class LocationBarView : public LocationBar, |
| 75 public LocationBarTesting, | 76 public LocationBarTesting, |
| 76 public views::View, | 77 public views::View, |
| 77 public views::DragController, | 78 public views::DragController, |
| 78 public OmniboxEditController, | 79 public OmniboxEditController, |
| 79 public DropdownBarHostDelegate, | 80 public DropdownBarHostDelegate, |
| 80 public chrome::search::SearchModelObserver, | 81 public chrome::search::SearchModelObserver, |
| 81 public TemplateURLServiceObserver, | 82 public TemplateURLServiceObserver, |
| 82 public content::NotificationObserver { | 83 public content::NotificationObserver, |
| 84 public ActionBoxButtonView::Delegate { |
| 83 public: | 85 public: |
| 84 // The location bar view's class name. | 86 // The location bar view's class name. |
| 85 static const char kViewClassName[]; | 87 static const char kViewClassName[]; |
| 86 | 88 |
| 87 // DropdownBarHostDelegate | 89 // DropdownBarHostDelegate |
| 88 virtual void SetFocusAndSelection(bool select_all) OVERRIDE; | 90 virtual void SetFocusAndSelection(bool select_all) OVERRIDE; |
| 89 virtual void SetAnimationOffset(int offset) OVERRIDE; | 91 virtual void SetAnimationOffset(int offset) OVERRIDE; |
| 90 | 92 |
| 91 // chrome::search::SearchModelObserver: | 93 // chrome::search::SearchModelObserver: |
| 92 virtual void ModeChanged(const chrome::search::Mode& mode) OVERRIDE; | 94 virtual void ModeChanged(const chrome::search::Mode& mode) OVERRIDE; |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 protected: | 365 protected: |
| 364 virtual void OnFocus() OVERRIDE; | 366 virtual void OnFocus() OVERRIDE; |
| 365 | 367 |
| 366 private: | 368 private: |
| 367 typedef std::vector<ContentSettingImageView*> ContentSettingViews; | 369 typedef std::vector<ContentSettingImageView*> ContentSettingViews; |
| 368 | 370 |
| 369 friend class PageActionImageView; | 371 friend class PageActionImageView; |
| 370 friend class PageActionWithBadgeView; | 372 friend class PageActionWithBadgeView; |
| 371 typedef std::vector<PageActionWithBadgeView*> PageActionViews; | 373 typedef std::vector<PageActionWithBadgeView*> PageActionViews; |
| 372 | 374 |
| 375 // Overridden from ActionBoxButtonView::Delegate |
| 376 virtual Browser* GetBrowser() const; |
| 377 |
| 373 #if defined(USE_AURA) | 378 #if defined(USE_AURA) |
| 374 // Observer that informs the LocationBarView when the animation is done. | 379 // Observer that informs the LocationBarView when the animation is done. |
| 375 class FadeAnimationObserver : public ui::ImplicitAnimationObserver { | 380 class FadeAnimationObserver : public ui::ImplicitAnimationObserver { |
| 376 public: | 381 public: |
| 377 explicit FadeAnimationObserver(LocationBarView* location_bar_view); | 382 explicit FadeAnimationObserver(LocationBarView* location_bar_view); |
| 378 virtual ~FadeAnimationObserver(); | 383 virtual ~FadeAnimationObserver(); |
| 379 | 384 |
| 380 // ui::ImplicitAnimationObserver overrides: | 385 // ui::ImplicitAnimationObserver overrides: |
| 381 virtual void OnImplicitAnimationsCompleted() OVERRIDE; | 386 virtual void OnImplicitAnimationsCompleted() OVERRIDE; |
| 382 | 387 |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 | 559 |
| 555 #if defined(USE_AURA) | 560 #if defined(USE_AURA) |
| 556 // Observer for a fade-in animation. | 561 // Observer for a fade-in animation. |
| 557 scoped_ptr<FadeAnimationObserver> fade_animation_observer_; | 562 scoped_ptr<FadeAnimationObserver> fade_animation_observer_; |
| 558 #endif | 563 #endif |
| 559 | 564 |
| 560 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); | 565 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); |
| 561 }; | 566 }; |
| 562 | 567 |
| 563 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 568 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
| OLD | NEW |