| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_GTK_LOCATION_BAR_VIEW_GTK_H_ | 5 #ifndef CHROME_BROWSER_GTK_LOCATION_BAR_VIEW_GTK_H_ |
| 6 #define CHROME_BROWSER_GTK_LOCATION_BAR_VIEW_GTK_H_ | 6 #define CHROME_BROWSER_GTK_LOCATION_BAR_VIEW_GTK_H_ |
| 7 | 7 |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/scoped_ptr.h" | 13 #include "base/scoped_ptr.h" |
| 14 #include "chrome/browser/autocomplete/autocomplete_edit.h" | 14 #include "chrome/browser/autocomplete/autocomplete_edit.h" |
| 15 #include "chrome/browser/autocomplete/autocomplete_edit_view_gtk.h" |
| 15 #include "chrome/browser/location_bar.h" | 16 #include "chrome/browser/location_bar.h" |
| 16 #include "chrome/common/owned_widget_gtk.h" | 17 #include "chrome/common/owned_widget_gtk.h" |
| 17 #include "chrome/common/page_transition_types.h" | 18 #include "chrome/common/page_transition_types.h" |
| 18 #include "webkit/glue/window_open_disposition.h" | 19 #include "webkit/glue/window_open_disposition.h" |
| 19 | 20 |
| 20 class AutocompleteEditViewGtk; | 21 class AutocompleteEditViewGtk; |
| 21 class CommandUpdater; | 22 class CommandUpdater; |
| 22 class Profile; | 23 class Profile; |
| 23 class SkBitmap; | 24 class SkBitmap; |
| 24 class TabContents; | 25 class TabContents; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 36 void SetProfile(Profile* profile); | 37 void SetProfile(Profile* profile); |
| 37 | 38 |
| 38 // Returns the widget the caller should host. You must call Init() first. | 39 // Returns the widget the caller should host. You must call Init() first. |
| 39 GtkWidget* widget() { return outer_bin_.get(); } | 40 GtkWidget* widget() { return outer_bin_.get(); } |
| 40 | 41 |
| 41 // Updates the location bar. We also reset the bar's permanent text and | 42 // Updates the location bar. We also reset the bar's permanent text and |
| 42 // security style, and, if |tab_for_state_restoring| is non-NULL, also | 43 // security style, and, if |tab_for_state_restoring| is non-NULL, also |
| 43 // restore saved state that the tab holds. | 44 // restore saved state that the tab holds. |
| 44 void Update(const TabContents* tab_for_state_restoring); | 45 void Update(const TabContents* tab_for_state_restoring); |
| 45 | 46 |
| 47 AutocompleteEditView* location_entry() { |
| 48 return location_entry_.get(); |
| 49 } |
| 50 |
| 46 // Implement the AutocompleteEditController interface. | 51 // Implement the AutocompleteEditController interface. |
| 47 virtual void OnAutocompleteAccept(const GURL& url, | 52 virtual void OnAutocompleteAccept(const GURL& url, |
| 48 WindowOpenDisposition disposition, | 53 WindowOpenDisposition disposition, |
| 49 PageTransition::Type transition, | 54 PageTransition::Type transition, |
| 50 const GURL& alternate_nav_url); | 55 const GURL& alternate_nav_url); |
| 51 virtual void OnChanged(); | 56 virtual void OnChanged(); |
| 52 virtual void OnInputInProgress(bool in_progress); | 57 virtual void OnInputInProgress(bool in_progress); |
| 53 virtual SkBitmap GetFavIcon() const; | 58 virtual SkBitmap GetFavIcon() const; |
| 54 virtual std::wstring GetTitle() const; | 59 virtual std::wstring GetTitle() const; |
| 55 | 60 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 // The user's desired disposition for how their input should be opened | 92 // The user's desired disposition for how their input should be opened |
| 88 WindowOpenDisposition disposition_; | 93 WindowOpenDisposition disposition_; |
| 89 | 94 |
| 90 // The transition type to use for the navigation | 95 // The transition type to use for the navigation |
| 91 PageTransition::Type transition_; | 96 PageTransition::Type transition_; |
| 92 | 97 |
| 93 DISALLOW_COPY_AND_ASSIGN(LocationBarViewGtk); | 98 DISALLOW_COPY_AND_ASSIGN(LocationBarViewGtk); |
| 94 }; | 99 }; |
| 95 | 100 |
| 96 #endif // CHROME_BROWSER_GTK_LOCATION_BAR_VIEW_GTK_H_ | 101 #endif // CHROME_BROWSER_GTK_LOCATION_BAR_VIEW_GTK_H_ |
| OLD | NEW |