Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(589)

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.h

Issue 5698006: Fix Instant suggest issues in Linux Views port. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update according to review feedback. Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 class SuggestedTextView;
46 class TabContents; 45 class TabContents;
47 class TabContentsWrapper; 46 class TabContentsWrapper;
48 class TemplateURLModel; 47 class TemplateURLModel;
49 48
50 namespace views { 49 namespace views {
51 class HorizontalPainter; 50 class HorizontalPainter;
52 class Label; 51 class Label;
53 }; 52 };
54 53
54 #if defined(OS_WIN)
55 class SuggestedTextView;
56 #endif
57
55 ///////////////////////////////////////////////////////////////////////////// 58 /////////////////////////////////////////////////////////////////////////////
56 // 59 //
57 // LocationBarView class 60 // LocationBarView class
58 // 61 //
59 // The LocationBarView class is a View subclass that paints the background 62 // The LocationBarView class is a View subclass that paints the background
60 // of the URL bar strip and contains its content. 63 // of the URL bar strip and contains its content.
61 // 64 //
62 ///////////////////////////////////////////////////////////////////////////// 65 /////////////////////////////////////////////////////////////////////////////
63 class LocationBarView : public LocationBar, 66 class LocationBarView : public LocationBar,
64 public LocationBarTesting, 67 public LocationBarTesting,
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 // Toggles the star on or off. 150 // Toggles the star on or off.
148 void SetStarToggled(bool on); 151 void SetStarToggled(bool on);
149 152
150 // Shows the bookmark bubble. 153 // Shows the bookmark bubble.
151 void ShowStarBubble(const GURL& url, bool newly_bookmarked); 154 void ShowStarBubble(const GURL& url, bool newly_bookmarked);
152 155
153 // Returns the screen coordinates of the location entry (where the URL text 156 // Returns the screen coordinates of the location entry (where the URL text
154 // appears, not where the icons are shown). 157 // appears, not where the icons are shown).
155 gfx::Point GetLocationEntryOrigin() const; 158 gfx::Point GetLocationEntryOrigin() const;
156 159
160 #if defined(OS_WIN)
157 // Invoked from SuggestedTextView when the suggested text should be committed. 161 // Invoked from SuggestedTextView when the suggested text should be committed.
158 void OnCommitSuggestedText(); 162 void OnCommitSuggestedText();
163 #endif
159 164
160 // Sizing functions 165 // Sizing functions
161 virtual gfx::Size GetPreferredSize(); 166 virtual gfx::Size GetPreferredSize();
162 167
163 // Layout and Painting functions 168 // Layout and Painting functions
164 virtual void Layout(); 169 virtual void Layout();
165 virtual void Paint(gfx::Canvas* canvas); 170 virtual void Paint(gfx::Canvas* canvas);
166 171
167 // No focus border for the location bar, the caret is enough. 172 // No focus border for the location bar, the caret is enough.
168 virtual void PaintFocusBorder(gfx::Canvas* canvas) { } 173 virtual void PaintFocusBorder(gfx::Canvas* canvas) { }
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 // Update the views for the Page Actions, to reflect state changes for 307 // Update the views for the Page Actions, to reflect state changes for
303 // PageActions. 308 // PageActions.
304 void RefreshPageActionViews(); 309 void RefreshPageActionViews();
305 310
306 // Sets the visibility of view to new_vis. 311 // Sets the visibility of view to new_vis.
307 void ToggleVisibility(bool new_vis, views::View* view); 312 void ToggleVisibility(bool new_vis, views::View* view);
308 313
309 #if defined(OS_WIN) 314 #if defined(OS_WIN)
310 // Helper for the Mouse event handlers that does all the real work. 315 // Helper for the Mouse event handlers that does all the real work.
311 void OnMouseEvent(const views::MouseEvent& event, UINT msg); 316 void OnMouseEvent(const views::MouseEvent& event, UINT msg);
317
318 // Returns true if the suggest text is valid.
319 bool HasValidSuggestText();
312 #endif 320 #endif
313 321
314 // Helper to show the first run info bubble. 322 // Helper to show the first run info bubble.
315 void ShowFirstRunBubbleInternal(FirstRun::BubbleType bubble_type); 323 void ShowFirstRunBubbleInternal(FirstRun::BubbleType bubble_type);
316 324
317 // Returns true if the suggest text is valid.
318 bool HasValidSuggestText();
319
320 // Current profile. Not owned by us. 325 // Current profile. Not owned by us.
321 Profile* profile_; 326 Profile* profile_;
322 327
323 // The Autocomplete Edit field. 328 // The Autocomplete Edit field.
324 #if defined(OS_WIN) 329 #if defined(OS_WIN)
325 scoped_ptr<AutocompleteEditViewWin> location_entry_; 330 scoped_ptr<AutocompleteEditViewWin> location_entry_;
326 #else 331 #else
327 scoped_ptr<AutocompleteEditViewGtk> location_entry_; 332 scoped_ptr<AutocompleteEditViewGtk> location_entry_;
328 #endif 333 #endif
329 334
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 368
364 // The following views are used to provide hints and remind the user as to 369 // 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 370 // 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 371 // LocationBarView. At most one is visible at a time. Preference is
367 // given to the keyword_view_, then hint_view_. 372 // given to the keyword_view_, then hint_view_.
368 // These autocollapse when the edit needs the room. 373 // These autocollapse when the edit needs the room.
369 374
370 // Shown if the user has selected a keyword. 375 // Shown if the user has selected a keyword.
371 SelectedKeywordView* selected_keyword_view_; 376 SelectedKeywordView* selected_keyword_view_;
372 377
378 #if defined(OS_WIN)
373 // View responsible for showing suggested text. This is NULL when there is no 379 // View responsible for showing suggested text. This is NULL when there is no
374 // suggested text. 380 // suggested text.
375 SuggestedTextView* suggested_text_view_; 381 SuggestedTextView* suggested_text_view_;
382 #endif
376 383
377 // Shown if the selected url has a corresponding keyword. 384 // Shown if the selected url has a corresponding keyword.
378 KeywordHintView* keyword_hint_view_; 385 KeywordHintView* keyword_hint_view_;
379 386
380 // The content setting views. 387 // The content setting views.
381 ContentSettingViews content_setting_views_; 388 ContentSettingViews content_setting_views_;
382 389
383 // The page action icon views. 390 // The page action icon views.
384 PageActionViews page_action_views_; 391 PageActionViews page_action_views_;
385 392
(...skipping 22 matching lines...) Expand all
408 // Should instant be updated? This is set to false in OnAutocompleteWillAccept 415 // Should instant be updated? This is set to false in OnAutocompleteWillAccept
409 // and true in OnAutocompleteAccept. This is needed as prior to accepting an 416 // and true in OnAutocompleteAccept. This is needed as prior to accepting an
410 // autocomplete suggestion the model is reverted which triggers resetting 417 // autocomplete suggestion the model is reverted which triggers resetting
411 // instant. 418 // instant.
412 bool update_instant_; 419 bool update_instant_;
413 420
414 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); 421 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView);
415 }; 422 };
416 423
417 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ 424 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc ('k') | chrome/browser/ui/views/location_bar/location_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698