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 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 void ShowStarBubble(const GURL& url, bool newly_boomkarked); | 88 void ShowStarBubble(const GURL& url, bool newly_boomkarked); |
89 | 89 |
90 // Set the starred state of the bookmark star. | 90 // Set the starred state of the bookmark star. |
91 void SetStarred(bool starred); | 91 void SetStarred(bool starred); |
92 | 92 |
93 // Implement the AutocompleteEditController interface. | 93 // Implement the AutocompleteEditController interface. |
94 virtual void OnAutocompleteWillClosePopup(); | 94 virtual void OnAutocompleteWillClosePopup(); |
95 virtual void OnAutocompleteLosingFocus(gfx::NativeView view_gaining_focus); | 95 virtual void OnAutocompleteLosingFocus(gfx::NativeView view_gaining_focus); |
96 virtual void OnAutocompleteWillAccept(); | 96 virtual void OnAutocompleteWillAccept(); |
97 // For this implementation, the parameter is ignored. | 97 // For this implementation, the parameter is ignored. |
98 virtual bool OnCommitSuggestedText(const std::wstring& typed_text); | 98 virtual bool OnCommitSuggestedText(const string16& typed_text); |
99 virtual bool AcceptCurrentInstantPreview(); | 99 virtual bool AcceptCurrentInstantPreview(); |
100 virtual void OnPopupBoundsChanged(const gfx::Rect& bounds); | 100 virtual void OnPopupBoundsChanged(const gfx::Rect& bounds); |
101 virtual void OnAutocompleteAccept(const GURL& url, | 101 virtual void OnAutocompleteAccept(const GURL& url, |
102 WindowOpenDisposition disposition, | 102 WindowOpenDisposition disposition, |
103 PageTransition::Type transition, | 103 PageTransition::Type transition, |
104 const GURL& alternate_nav_url); | 104 const GURL& alternate_nav_url); |
105 virtual void OnChanged(); | 105 virtual void OnChanged(); |
106 virtual void OnSelectionBoundsChanged(); | 106 virtual void OnSelectionBoundsChanged(); |
107 virtual void OnKillFocus(); | 107 virtual void OnKillFocus(); |
108 virtual void OnSetFocus(); | 108 virtual void OnSetFocus(); |
109 virtual void OnInputInProgress(bool in_progress); | 109 virtual void OnInputInProgress(bool in_progress); |
110 virtual SkBitmap GetFavIcon() const; | 110 virtual SkBitmap GetFavIcon() const; |
111 virtual std::wstring GetTitle() const; | 111 virtual string16 GetTitle() const; |
112 | 112 |
113 // Implement the LocationBar interface. | 113 // Implement the LocationBar interface. |
114 virtual void ShowFirstRunBubble(FirstRun::BubbleType bubble_type); | 114 virtual void ShowFirstRunBubble(FirstRun::BubbleType bubble_type); |
115 virtual void SetSuggestedText(const string16& text); | 115 virtual void SetSuggestedText(const string16& text); |
116 virtual std::wstring GetInputString() const; | 116 virtual std::wstring GetInputString() const; |
117 virtual WindowOpenDisposition GetWindowOpenDisposition() const; | 117 virtual WindowOpenDisposition GetWindowOpenDisposition() const; |
118 virtual PageTransition::Type GetPageTransition() const; | 118 virtual PageTransition::Type GetPageTransition() const; |
119 virtual void AcceptInput(); | 119 virtual void AcceptInput(); |
120 virtual void FocusLocation(bool select_all); | 120 virtual void FocusLocation(bool select_all); |
121 virtual void FocusSearch(); | 121 virtual void FocusSearch(); |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 | 306 |
307 // Updates the maximum size of the EV certificate label. | 307 // Updates the maximum size of the EV certificate label. |
308 void UpdateEVCertificateLabelSize(); | 308 void UpdateEVCertificateLabelSize(); |
309 | 309 |
310 // Sets the text that should be displayed in the info label and its associated | 310 // Sets the text that should be displayed in the info label and its associated |
311 // tooltip text. Call with an empty string if the info label should be | 311 // tooltip text. Call with an empty string if the info label should be |
312 // hidden. | 312 // hidden. |
313 void SetInfoText(); | 313 void SetInfoText(); |
314 | 314 |
315 // Set the keyword text for the Search BLAH: keyword box. | 315 // Set the keyword text for the Search BLAH: keyword box. |
316 void SetKeywordLabel(const std::wstring& keyword); | 316 void SetKeywordLabel(const string16& keyword); |
317 | 317 |
318 // Set the keyword text for the "Press tab to search BLAH" hint box. | 318 // Set the keyword text for the "Press tab to search BLAH" hint box. |
319 void SetKeywordHintLabel(const std::wstring& keyword); | 319 void SetKeywordHintLabel(const string16& keyword); |
320 | 320 |
321 void ShowFirstRunBubbleInternal(FirstRun::BubbleType bubble_type); | 321 void ShowFirstRunBubbleInternal(FirstRun::BubbleType bubble_type); |
322 | 322 |
323 // Show or hide |tab_to_search_box_| and |tab_to_search_hint_| according to | 323 // Show or hide |tab_to_search_box_| and |tab_to_search_hint_| according to |
324 // the value of |show_selected_keyword_|, |show_keyword_hint_|, and the | 324 // the value of |show_selected_keyword_|, |show_keyword_hint_|, and the |
325 // available horizontal space in the location bar. | 325 // available horizontal space in the location bar. |
326 void AdjustChildrenVisibility(); | 326 void AdjustChildrenVisibility(); |
327 | 327 |
328 // Build the star icon. | 328 // Build the star icon. |
329 void CreateStarButton(); | 329 void CreateStarButton(); |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 // |tab_to_search_hint_|. | 416 // |tab_to_search_hint_|. |
417 int entry_box_width_; | 417 int entry_box_width_; |
418 | 418 |
419 // Indicate if |tab_to_search_box_| should be shown. | 419 // Indicate if |tab_to_search_box_| should be shown. |
420 bool show_selected_keyword_; | 420 bool show_selected_keyword_; |
421 | 421 |
422 // Indicate if |tab_to_search_hint_| should be shown. | 422 // Indicate if |tab_to_search_hint_| should be shown. |
423 bool show_keyword_hint_; | 423 bool show_keyword_hint_; |
424 | 424 |
425 // The last search keyword that was shown via the |tab_to_search_box_|. | 425 // The last search keyword that was shown via the |tab_to_search_box_|. |
426 std::wstring last_keyword_; | 426 string16 last_keyword_; |
427 | 427 |
428 // True if we should update the instant controller when the edit text changes. | 428 // True if we should update the instant controller when the edit text changes. |
429 bool update_instant_; | 429 bool update_instant_; |
430 | 430 |
431 DISALLOW_COPY_AND_ASSIGN(LocationBarViewGtk); | 431 DISALLOW_COPY_AND_ASSIGN(LocationBarViewGtk); |
432 }; | 432 }; |
433 | 433 |
434 #endif // CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_ | 434 #endif // CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_ |
OLD | NEW |