Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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> |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 35 class EVBubbleView; | 35 class EVBubbleView; |
| 36 class ExtensionAction; | 36 class ExtensionAction; |
| 37 class GURL; | 37 class GURL; |
| 38 class InstantController; | 38 class InstantController; |
| 39 class KeywordHintView; | 39 class KeywordHintView; |
| 40 class LocationIconView; | 40 class LocationIconView; |
| 41 class PageActionWithBadgeView; | 41 class PageActionWithBadgeView; |
| 42 class Profile; | 42 class Profile; |
| 43 class SelectedKeywordView; | 43 class SelectedKeywordView; |
| 44 class StarView; | 44 class StarView; |
| 45 #if defined(OS_WIN) | |
|
sky
2010/12/13 17:27:33
Move conditional forward declarations after non-co
| |
| 45 class SuggestedTextView; | 46 class SuggestedTextView; |
| 47 #endif | |
| 46 class TabContents; | 48 class TabContents; |
| 47 class TabContentsWrapper; | 49 class TabContentsWrapper; |
| 48 class TemplateURLModel; | 50 class TemplateURLModel; |
| 49 | 51 |
| 50 namespace views { | 52 namespace views { |
| 51 class HorizontalPainter; | 53 class HorizontalPainter; |
| 52 class Label; | 54 class Label; |
| 53 }; | 55 }; |
| 54 | 56 |
| 55 ///////////////////////////////////////////////////////////////////////////// | 57 ///////////////////////////////////////////////////////////////////////////// |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 147 // Toggles the star on or off. | 149 // Toggles the star on or off. |
| 148 void SetStarToggled(bool on); | 150 void SetStarToggled(bool on); |
| 149 | 151 |
| 150 // Shows the bookmark bubble. | 152 // Shows the bookmark bubble. |
| 151 void ShowStarBubble(const GURL& url, bool newly_bookmarked); | 153 void ShowStarBubble(const GURL& url, bool newly_bookmarked); |
| 152 | 154 |
| 153 // Returns the screen coordinates of the location entry (where the URL text | 155 // Returns the screen coordinates of the location entry (where the URL text |
| 154 // appears, not where the icons are shown). | 156 // appears, not where the icons are shown). |
| 155 gfx::Point GetLocationEntryOrigin() const; | 157 gfx::Point GetLocationEntryOrigin() const; |
| 156 | 158 |
| 159 #if defined(OS_WIN) | |
| 157 // Invoked from SuggestedTextView when the suggested text should be committed. | 160 // Invoked from SuggestedTextView when the suggested text should be committed. |
| 158 void OnCommitSuggestedText(); | 161 void OnCommitSuggestedText(); |
| 162 #endif | |
| 159 | 163 |
| 160 // Sizing functions | 164 // Sizing functions |
| 161 virtual gfx::Size GetPreferredSize(); | 165 virtual gfx::Size GetPreferredSize(); |
| 162 | 166 |
| 163 // Layout and Painting functions | 167 // Layout and Painting functions |
| 164 virtual void Layout(); | 168 virtual void Layout(); |
| 165 virtual void Paint(gfx::Canvas* canvas); | 169 virtual void Paint(gfx::Canvas* canvas); |
| 166 | 170 |
| 167 // No focus border for the location bar, the caret is enough. | 171 // No focus border for the location bar, the caret is enough. |
| 168 virtual void PaintFocusBorder(gfx::Canvas* canvas) { } | 172 virtual void PaintFocusBorder(gfx::Canvas* canvas) { } |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 307 void ToggleVisibility(bool new_vis, views::View* view); | 311 void ToggleVisibility(bool new_vis, views::View* view); |
| 308 | 312 |
| 309 #if defined(OS_WIN) | 313 #if defined(OS_WIN) |
| 310 // Helper for the Mouse event handlers that does all the real work. | 314 // Helper for the Mouse event handlers that does all the real work. |
| 311 void OnMouseEvent(const views::MouseEvent& event, UINT msg); | 315 void OnMouseEvent(const views::MouseEvent& event, UINT msg); |
| 312 #endif | 316 #endif |
| 313 | 317 |
| 314 // Helper to show the first run info bubble. | 318 // Helper to show the first run info bubble. |
| 315 void ShowFirstRunBubbleInternal(FirstRun::BubbleType bubble_type); | 319 void ShowFirstRunBubbleInternal(FirstRun::BubbleType bubble_type); |
| 316 | 320 |
| 321 #if defined(OS_WIN) | |
| 317 // Returns true if the suggest text is valid. | 322 // Returns true if the suggest text is valid. |
| 318 bool HasValidSuggestText(); | 323 bool HasValidSuggestText(); |
|
sky
2010/12/13 17:27:33
Move this to around line 315 so that you have one
| |
| 324 #endif | |
| 319 | 325 |
| 320 // Current profile. Not owned by us. | 326 // Current profile. Not owned by us. |
| 321 Profile* profile_; | 327 Profile* profile_; |
| 322 | 328 |
| 323 // The Autocomplete Edit field. | 329 // The Autocomplete Edit field. |
| 324 #if defined(OS_WIN) | 330 #if defined(OS_WIN) |
| 325 scoped_ptr<AutocompleteEditViewWin> location_entry_; | 331 scoped_ptr<AutocompleteEditViewWin> location_entry_; |
| 326 #else | 332 #else |
| 327 scoped_ptr<AutocompleteEditViewGtk> location_entry_; | 333 scoped_ptr<AutocompleteEditViewGtk> location_entry_; |
| 328 #endif | 334 #endif |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 363 | 369 |
| 364 // The following views are used to provide hints and remind the user as to | 370 // The following views are used to provide hints and remind the user as to |
| 365 // what is going in the edit. They are all added a children of the | 371 // what is going in the edit. They are all added a children of the |
| 366 // LocationBarView. At most one is visible at a time. Preference is | 372 // LocationBarView. At most one is visible at a time. Preference is |
| 367 // given to the keyword_view_, then hint_view_. | 373 // given to the keyword_view_, then hint_view_. |
| 368 // These autocollapse when the edit needs the room. | 374 // These autocollapse when the edit needs the room. |
| 369 | 375 |
| 370 // Shown if the user has selected a keyword. | 376 // Shown if the user has selected a keyword. |
| 371 SelectedKeywordView* selected_keyword_view_; | 377 SelectedKeywordView* selected_keyword_view_; |
| 372 | 378 |
| 379 #if defined(OS_WIN) | |
| 373 // View responsible for showing suggested text. This is NULL when there is no | 380 // View responsible for showing suggested text. This is NULL when there is no |
| 374 // suggested text. | 381 // suggested text. |
| 375 SuggestedTextView* suggested_text_view_; | 382 SuggestedTextView* suggested_text_view_; |
| 383 #endif | |
| 376 | 384 |
| 377 // Shown if the selected url has a corresponding keyword. | 385 // Shown if the selected url has a corresponding keyword. |
| 378 KeywordHintView* keyword_hint_view_; | 386 KeywordHintView* keyword_hint_view_; |
| 379 | 387 |
| 380 // The content setting views. | 388 // The content setting views. |
| 381 ContentSettingViews content_setting_views_; | 389 ContentSettingViews content_setting_views_; |
| 382 | 390 |
| 383 // The page action icon views. | 391 // The page action icon views. |
| 384 PageActionViews page_action_views_; | 392 PageActionViews page_action_views_; |
| 385 | 393 |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 408 // Should instant be updated? This is set to false in OnAutocompleteWillAccept | 416 // Should instant be updated? This is set to false in OnAutocompleteWillAccept |
| 409 // and true in OnAutocompleteAccept. This is needed as prior to accepting an | 417 // and true in OnAutocompleteAccept. This is needed as prior to accepting an |
| 410 // autocomplete suggestion the model is reverted which triggers resetting | 418 // autocomplete suggestion the model is reverted which triggers resetting |
| 411 // instant. | 419 // instant. |
| 412 bool update_instant_; | 420 bool update_instant_; |
| 413 | 421 |
| 414 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); | 422 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); |
| 415 }; | 423 }; |
| 416 | 424 |
| 417 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 425 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
| OLD | NEW |