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

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

Issue 287543002: Remove origin chip v1 and "hide on input" v2 behavior. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test compile Created 6 years, 7 months 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 class LocationIconView; 42 class LocationIconView;
43 class OpenPDFInReaderView; 43 class OpenPDFInReaderView;
44 class ManagePasswordsIconView; 44 class ManagePasswordsIconView;
45 class OriginChipView; 45 class OriginChipView;
46 class PageActionWithBadgeView; 46 class PageActionWithBadgeView;
47 class PageActionImageView; 47 class PageActionImageView;
48 class Profile; 48 class Profile;
49 class SelectedKeywordView; 49 class SelectedKeywordView;
50 class StarView; 50 class StarView;
51 class TemplateURLService; 51 class TemplateURLService;
52 class ToolbarOriginChipView;
53 class TranslateIconView; 52 class TranslateIconView;
54 class ZoomView; 53 class ZoomView;
55 54
56 namespace content { 55 namespace content {
57 struct SSLStatus; 56 struct SSLStatus;
58 } 57 }
59 58
60 namespace gfx { 59 namespace gfx {
61 class SlideAnimation; 60 class SlideAnimation;
62 } 61 }
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 186
188 // The star. It may not be visible. 187 // The star. It may not be visible.
189 StarView* star_view() { return star_view_; } 188 StarView* star_view() { return star_view_; }
190 189
191 // Toggles the translate icon on or off. 190 // Toggles the translate icon on or off.
192 void SetTranslateIconToggled(bool on); 191 void SetTranslateIconToggled(bool on);
193 192
194 // The translate icon. It may not be visible. 193 // The translate icon. It may not be visible.
195 TranslateIconView* translate_icon_view() { return translate_icon_view_; } 194 TranslateIconView* translate_icon_view() { return translate_icon_view_; }
196 195
197 void set_toolbar_origin_chip_view(
198 ToolbarOriginChipView* toolbar_origin_chip_view) {
199 toolbar_origin_chip_view_ = toolbar_origin_chip_view;
200 }
201
202 // Returns the screen coordinates of the omnibox (where the URL text appears, 196 // Returns the screen coordinates of the omnibox (where the URL text appears,
203 // not where the icons are shown). 197 // not where the icons are shown).
204 gfx::Point GetOmniboxViewOrigin() const; 198 gfx::Point GetOmniboxViewOrigin() const;
205 199
206 // Shows |text| as an inline autocompletion. This is useful for IMEs, where 200 // Shows |text| as an inline autocompletion. This is useful for IMEs, where
207 // we can't show the autocompletion inside the actual OmniboxView. See 201 // we can't show the autocompletion inside the actual OmniboxView. See
208 // comments on |ime_inline_autocomplete_view_|. 202 // comments on |ime_inline_autocomplete_view_|.
209 void SetImeInlineAutocompletion(const base::string16& text); 203 void SetImeInlineAutocompletion(const base::string16& text);
210 204
211 // Invoked from OmniboxViewWin to show gray text autocompletion. 205 // Invoked from OmniboxViewWin to show gray text autocompletion.
212 void SetGrayTextAutocompletion(const base::string16& text); 206 void SetGrayTextAutocompletion(const base::string16& text);
213 207
214 // Returns the current gray text autocompletion. 208 // Returns the current gray text autocompletion.
215 base::string16 GetGrayTextAutocompletion() const; 209 base::string16 GetGrayTextAutocompletion() const;
216 210
217 // Set if we should show a focus rect while the location entry field is 211 // Set if we should show a focus rect while the location entry field is
218 // focused. Used when the toolbar is in full keyboard accessibility mode. 212 // focused. Used when the toolbar is in full keyboard accessibility mode.
219 // Repaints if necessary. 213 // Repaints if necessary.
220 virtual void SetShowFocusRect(bool show); 214 virtual void SetShowFocusRect(bool show);
221 215
222 // Select all of the text. Needed when the user tabs through controls 216 // Select all of the text. Needed when the user tabs through controls
223 // in the toolbar in full keyboard accessibility mode. 217 // in the toolbar in full keyboard accessibility mode.
224 virtual void SelectAll(); 218 virtual void SelectAll();
225 219
226 views::ImageView* GetLocationIconView(); 220 LocationIconView* location_icon_view() { return location_icon_view_; }
Justin Donnelly 2014/05/13 22:19:33 We should also have a const version of this, no?
Peter Kasting 2014/05/14 00:28:11 No. No one calls the const version, so we shouldn
227 const views::ImageView* GetLocationIconView() const;
228 221
229 // Return a view suitable for anchoring location-bar-anchored bubbles to.
230 views::View* GetLocationBarAnchor();
231 // Return the point suitable for anchoring location-bar-anchored bubbles at. 222 // Return the point suitable for anchoring location-bar-anchored bubbles at.
232 // The point will be returned in the coordinates of the LocationBarView. 223 // The point will be returned in the coordinates of the LocationBarView.
233 gfx::Point GetLocationBarAnchorPoint() const; 224 gfx::Point GetLocationBarAnchorPoint() const;
234 225
235 OmniboxViewViews* omnibox_view() { return omnibox_view_; } 226 OmniboxViewViews* omnibox_view() { return omnibox_view_; }
236 227
237 views::View* generated_credit_card_view(); 228 views::View* generated_credit_card_view();
238 229
239 // Returns the height of the control without the top and bottom 230 // Returns the height of the control without the top and bottom
240 // edges(i.e. the height of the edit control inside). If 231 // edges(i.e. the height of the edit control inside). If
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 Browser* browser_; 411 Browser* browser_;
421 412
422 OmniboxViewViews* omnibox_view_; 413 OmniboxViewViews* omnibox_view_;
423 414
424 // Our delegate. 415 // Our delegate.
425 Delegate* delegate_; 416 Delegate* delegate_;
426 417
427 // Object used to paint the border. 418 // Object used to paint the border.
428 scoped_ptr<views::Painter> border_painter_; 419 scoped_ptr<views::Painter> border_painter_;
429 420
430 // The version of the origin chip that appears in the location bar. 421 // The origin chip that may appear in the location bar.
431 OriginChipView* origin_chip_view_; 422 OriginChipView* origin_chip_view_;
432 423
433 // The version of the origin chip that appears in the toolbar.
434 ToolbarOriginChipView* toolbar_origin_chip_view_;
435
436 // An icon to the left of the edit field. 424 // An icon to the left of the edit field.
437 LocationIconView* location_icon_view_; 425 LocationIconView* location_icon_view_;
438 426
439 // A bubble displayed for EV HTTPS sites. 427 // A bubble displayed for EV HTTPS sites.
440 EVBubbleView* ev_bubble_view_; 428 EVBubbleView* ev_bubble_view_;
441 429
442 // A view to show inline autocompletion when an IME is active. In this case, 430 // A view to show inline autocompletion when an IME is active. In this case,
443 // we shouldn't change the text or selection inside the OmniboxView itself, 431 // we shouldn't change the text or selection inside the OmniboxView itself,
444 // since this will conflict with the IME's control over the text. So instead 432 // since this will conflict with the IME's control over the text. So instead
445 // we show any autocompletion in a separate field after the OmniboxView. 433 // we show any autocompletion in a separate field after the OmniboxView.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 // Used to register for notifications received by NotificationObserver. 513 // Used to register for notifications received by NotificationObserver.
526 content::NotificationRegistrar registrar_; 514 content::NotificationRegistrar registrar_;
527 515
528 // Used to bind callback functions to this object. 516 // Used to bind callback functions to this object.
529 base::WeakPtrFactory<LocationBarView> weak_ptr_factory_; 517 base::WeakPtrFactory<LocationBarView> weak_ptr_factory_;
530 518
531 DISALLOW_COPY_AND_ASSIGN(LocationBarView); 519 DISALLOW_COPY_AND_ASSIGN(LocationBarView);
532 }; 520 };
533 521
534 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ 522 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698