| 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_GTK_LOCATION_BAR_VIEW_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 | 10 |
| 11 #include <map> | 11 #include <map> |
| 12 #include <string> | 12 #include <string> |
| 13 | 13 |
| 14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
| 15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 17 #include "base/memory/scoped_vector.h" | 17 #include "base/memory/scoped_vector.h" |
| 18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
| 19 #include "chrome/browser/autocomplete/autocomplete_edit.h" | 19 #include "chrome/browser/autocomplete/autocomplete_edit.h" |
| 20 #include "chrome/browser/extensions/extension_context_menu_model.h" | 20 #include "chrome/browser/extensions/extension_context_menu_model.h" |
| 21 #include "chrome/browser/extensions/image_loading_tracker.h" | 21 #include "chrome/browser/extensions/image_loading_tracker.h" |
| 22 #include "chrome/browser/first_run/first_run.h" | 22 #include "chrome/browser/first_run/first_run.h" |
| 23 #include "chrome/browser/prefs/pref_member.h" | 23 #include "chrome/browser/prefs/pref_member.h" |
| 24 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" | 24 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" |
| 25 #include "chrome/browser/ui/gtk/menu_gtk.h" | 25 #include "chrome/browser/ui/gtk/menu_gtk.h" |
| 26 #include "chrome/browser/ui/omnibox/location_bar.h" | 26 #include "chrome/browser/ui/omnibox/location_bar.h" |
| 27 #include "chrome/common/content_settings_types.h" | 27 #include "chrome/common/content_settings_types.h" |
| 28 #include "content/common/notification_observer.h" | 28 #include "content/common/notification_observer.h" |
| 29 #include "content/common/notification_registrar.h" | 29 #include "content/common/notification_registrar.h" |
| 30 #include "content/common/page_transition_types.h" | 30 #include "content/public/common/page_transition_types.h" |
| 31 #include "third_party/skia/include/core/SkBitmap.h" | 31 #include "third_party/skia/include/core/SkBitmap.h" |
| 32 #include "ui/base/animation/animation_delegate.h" | 32 #include "ui/base/animation/animation_delegate.h" |
| 33 #include "ui/base/animation/slide_animation.h" | 33 #include "ui/base/animation/slide_animation.h" |
| 34 #include "ui/base/gtk/gtk_signal.h" | 34 #include "ui/base/gtk/gtk_signal.h" |
| 35 #include "ui/base/gtk/owned_widget_gtk.h" | 35 #include "ui/base/gtk/owned_widget_gtk.h" |
| 36 #include "webkit/glue/window_open_disposition.h" | 36 #include "webkit/glue/window_open_disposition.h" |
| 37 | 37 |
| 38 class OmniboxViewGtk; | 38 class OmniboxViewGtk; |
| 39 class Browser; | 39 class Browser; |
| 40 class CommandUpdater; | 40 class CommandUpdater; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 89 |
| 90 // Show the bookmark bubble. | 90 // Show the bookmark bubble. |
| 91 void ShowStarBubble(const GURL& url, bool newly_boomkarked); | 91 void ShowStarBubble(const GURL& url, bool newly_boomkarked); |
| 92 | 92 |
| 93 // Set the starred state of the bookmark star. | 93 // Set the starred state of the bookmark star. |
| 94 void SetStarred(bool starred); | 94 void SetStarred(bool starred); |
| 95 | 95 |
| 96 // Implement the AutocompleteEditController interface. | 96 // Implement the AutocompleteEditController interface. |
| 97 virtual void OnAutocompleteAccept(const GURL& url, | 97 virtual void OnAutocompleteAccept(const GURL& url, |
| 98 WindowOpenDisposition disposition, | 98 WindowOpenDisposition disposition, |
| 99 PageTransition::Type transition, | 99 content::PageTransition transition, |
| 100 const GURL& alternate_nav_url) OVERRIDE; | 100 const GURL& alternate_nav_url) OVERRIDE; |
| 101 virtual void OnChanged() OVERRIDE; | 101 virtual void OnChanged() OVERRIDE; |
| 102 virtual void OnSelectionBoundsChanged() OVERRIDE; | 102 virtual void OnSelectionBoundsChanged() OVERRIDE; |
| 103 virtual void OnKillFocus() OVERRIDE; | 103 virtual void OnKillFocus() OVERRIDE; |
| 104 virtual void OnSetFocus() OVERRIDE; | 104 virtual void OnSetFocus() OVERRIDE; |
| 105 virtual void OnInputInProgress(bool in_progress) OVERRIDE; | 105 virtual void OnInputInProgress(bool in_progress) OVERRIDE; |
| 106 virtual SkBitmap GetFavicon() const OVERRIDE; | 106 virtual SkBitmap GetFavicon() const OVERRIDE; |
| 107 virtual string16 GetTitle() const OVERRIDE; | 107 virtual string16 GetTitle() const OVERRIDE; |
| 108 virtual InstantController* GetInstant() OVERRIDE; | 108 virtual InstantController* GetInstant() OVERRIDE; |
| 109 virtual TabContentsWrapper* GetTabContentsWrapper() const OVERRIDE; | 109 virtual TabContentsWrapper* GetTabContentsWrapper() const OVERRIDE; |
| 110 | 110 |
| 111 // Implement the LocationBar interface. | 111 // Implement the LocationBar interface. |
| 112 virtual void ShowFirstRunBubble(FirstRun::BubbleType bubble_type) OVERRIDE; | 112 virtual void ShowFirstRunBubble(FirstRun::BubbleType bubble_type) OVERRIDE; |
| 113 virtual void SetSuggestedText(const string16& text, | 113 virtual void SetSuggestedText(const string16& text, |
| 114 InstantCompleteBehavior behavior) OVERRIDE; | 114 InstantCompleteBehavior behavior) OVERRIDE; |
| 115 virtual string16 GetInputString() const OVERRIDE; | 115 virtual string16 GetInputString() const OVERRIDE; |
| 116 virtual WindowOpenDisposition GetWindowOpenDisposition() const OVERRIDE; | 116 virtual WindowOpenDisposition GetWindowOpenDisposition() const OVERRIDE; |
| 117 virtual PageTransition::Type GetPageTransition() const OVERRIDE; | 117 virtual content::PageTransition GetPageTransition() const OVERRIDE; |
| 118 virtual void AcceptInput() OVERRIDE; | 118 virtual void AcceptInput() OVERRIDE; |
| 119 virtual void FocusLocation(bool select_all) OVERRIDE; | 119 virtual void FocusLocation(bool select_all) OVERRIDE; |
| 120 virtual void FocusSearch() OVERRIDE; | 120 virtual void FocusSearch() OVERRIDE; |
| 121 virtual void UpdateContentSettingsIcons() OVERRIDE; | 121 virtual void UpdateContentSettingsIcons() OVERRIDE; |
| 122 virtual void UpdatePageActions() OVERRIDE; | 122 virtual void UpdatePageActions() OVERRIDE; |
| 123 virtual void InvalidatePageActions() OVERRIDE; | 123 virtual void InvalidatePageActions() OVERRIDE; |
| 124 virtual void SaveStateToContents(TabContents* contents) OVERRIDE; | 124 virtual void SaveStateToContents(TabContents* contents) OVERRIDE; |
| 125 virtual void Revert() OVERRIDE; | 125 virtual void Revert() OVERRIDE; |
| 126 virtual const OmniboxView* location_entry() const OVERRIDE; | 126 virtual const OmniboxView* location_entry() const OVERRIDE; |
| 127 virtual OmniboxView* location_entry() OVERRIDE; | 127 virtual OmniboxView* location_entry() OVERRIDE; |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 | 403 |
| 404 // When we get an OnAutocompleteAccept notification from the autocomplete | 404 // When we get an OnAutocompleteAccept notification from the autocomplete |
| 405 // edit, we save the input string so we can give it back to the browser on | 405 // edit, we save the input string so we can give it back to the browser on |
| 406 // the LocationBar interface via GetInputString(). | 406 // the LocationBar interface via GetInputString(). |
| 407 string16 location_input_; | 407 string16 location_input_; |
| 408 | 408 |
| 409 // The user's desired disposition for how their input should be opened. | 409 // The user's desired disposition for how their input should be opened. |
| 410 WindowOpenDisposition disposition_; | 410 WindowOpenDisposition disposition_; |
| 411 | 411 |
| 412 // The transition type to use for the navigation. | 412 // The transition type to use for the navigation. |
| 413 PageTransition::Type transition_; | 413 content::PageTransition transition_; |
| 414 | 414 |
| 415 // Used to schedule a task for the first run bubble. | 415 // Used to schedule a task for the first run bubble. |
| 416 base::WeakPtrFactory<LocationBarViewGtk> first_run_bubble_; | 416 base::WeakPtrFactory<LocationBarViewGtk> first_run_bubble_; |
| 417 | 417 |
| 418 // When true, the location bar view is read only and also is has a slightly | 418 // When true, the location bar view is read only and also is has a slightly |
| 419 // different presentation (font size / color). This is used for popups. | 419 // different presentation (font size / color). This is used for popups. |
| 420 bool popup_window_mode_; | 420 bool popup_window_mode_; |
| 421 | 421 |
| 422 // Provides colors and rendering mode. | 422 // Provides colors and rendering mode. |
| 423 GtkThemeService* theme_service_; | 423 GtkThemeService* theme_service_; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 440 // The last search keyword that was shown via the |tab_to_search_box_|. | 440 // The last search keyword that was shown via the |tab_to_search_box_|. |
| 441 string16 last_keyword_; | 441 string16 last_keyword_; |
| 442 | 442 |
| 443 // Used to change the visibility of the star decoration. | 443 // Used to change the visibility of the star decoration. |
| 444 BooleanPrefMember edit_bookmarks_enabled_; | 444 BooleanPrefMember edit_bookmarks_enabled_; |
| 445 | 445 |
| 446 DISALLOW_COPY_AND_ASSIGN(LocationBarViewGtk); | 446 DISALLOW_COPY_AND_ASSIGN(LocationBarViewGtk); |
| 447 }; | 447 }; |
| 448 | 448 |
| 449 #endif // CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_ | 449 #endif // CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_ |
| OLD | NEW |