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

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

Issue 2348853004: Remove non-md code in location bar (Views). (Closed)
Patch Set: images Created 4 years, 3 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
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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 static const char kViewClassName[]; 116 static const char kViewClassName[];
117 117
118 LocationBarView(Browser* browser, 118 LocationBarView(Browser* browser,
119 Profile* profile, 119 Profile* profile,
120 CommandUpdater* command_updater, 120 CommandUpdater* command_updater,
121 Delegate* delegate, 121 Delegate* delegate,
122 bool is_popup_mode); 122 bool is_popup_mode);
123 123
124 ~LocationBarView() override; 124 ~LocationBarView() override;
125 125
126 // Returns the color for the location bar border in MD windows and non-MD 126 // Returns the color for the location bar border in Windows, given the
Peter Kasting 2016/09/19 23:46:46 Nit: Should have been "windows" rather than "Windo
Evan Stade 2016/09/20 17:37:04 Done.
127 // popup windows, given the window's |incognito| state. 127 // window's |incognito| state.
128 static SkColor GetBorderColor(bool incognito); 128 static SkColor GetBorderColor(bool incognito);
129 129
130 // Initializes the LocationBarView. 130 // Initializes the LocationBarView.
131 void Init(); 131 void Init();
132 132
133 // True if this instance has been initialized by calling Init, which can only 133 // True if this instance has been initialized by calling Init, which can only
134 // be called when the receiving instance is attached to a view container. 134 // be called when the receiving instance is attached to a view container.
135 bool IsInitialized() const; 135 bool IsInitialized() const;
136 136
137 // Returns the appropriate color for the desired kind, based on the user's 137 // Returns the appropriate color for the desired kind, based on the user's
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 ExtensionAction* GetPageAction(size_t index) override; 364 ExtensionAction* GetPageAction(size_t index) override;
365 ExtensionAction* GetVisiblePageAction(size_t index) override; 365 ExtensionAction* GetVisiblePageAction(size_t index) override;
366 void TestPageActionPressed(size_t index) override; 366 void TestPageActionPressed(size_t index) override;
367 bool GetBookmarkStarVisibility() override; 367 bool GetBookmarkStarVisibility() override;
368 368
369 // views::View: 369 // views::View:
370 const char* GetClassName() const override; 370 const char* GetClassName() const override;
371 void OnBoundsChanged(const gfx::Rect& previous_bounds) override; 371 void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
372 void OnFocus() override; 372 void OnFocus() override;
373 void OnPaint(gfx::Canvas* canvas) override; 373 void OnPaint(gfx::Canvas* canvas) override;
374 void PaintChildren(const ui::PaintContext& context) override;
375 374
376 // views::DragController: 375 // views::DragController:
377 void WriteDragDataForView(View* sender, 376 void WriteDragDataForView(View* sender,
378 const gfx::Point& press_pt, 377 const gfx::Point& press_pt,
379 OSExchangeData* data) override; 378 OSExchangeData* data) override;
380 int GetDragOperationsForView(View* sender, const gfx::Point& p) override; 379 int GetDragOperationsForView(View* sender, const gfx::Point& p) override;
381 bool CanStartDragForView(View* sender, 380 bool CanStartDragForView(View* sender,
382 const gfx::Point& press_pt, 381 const gfx::Point& press_pt,
383 const gfx::Point& p) override; 382 const gfx::Point& p) override;
384 383
(...skipping 14 matching lines...) Expand all
399 // The Browser this LocationBarView is in. Note that at least 398 // The Browser this LocationBarView is in. Note that at least
400 // chromeos::SimpleWebViewDialog uses a LocationBarView outside any browser 399 // chromeos::SimpleWebViewDialog uses a LocationBarView outside any browser
401 // window, so this may be NULL. 400 // window, so this may be NULL.
402 Browser* browser_; 401 Browser* browser_;
403 402
404 OmniboxViewViews* omnibox_view_; 403 OmniboxViewViews* omnibox_view_;
405 404
406 // Our delegate. 405 // Our delegate.
407 Delegate* delegate_; 406 Delegate* delegate_;
408 407
409 // Object used to paint the border. Not used for material design.
410 std::unique_ptr<views::Painter> border_painter_;
411
412 // An icon to the left of the edit field: the HTTPS lock, blank page icon, 408 // An icon to the left of the edit field: the HTTPS lock, blank page icon,
413 // search icon, EV HTTPS bubble, etc. 409 // search icon, EV HTTPS bubble, etc.
414 LocationIconView* location_icon_view_; 410 LocationIconView* location_icon_view_;
415 411
416 // A view to show inline autocompletion when an IME is active. In this case, 412 // A view to show inline autocompletion when an IME is active. In this case,
417 // we shouldn't change the text or selection inside the OmniboxView itself, 413 // we shouldn't change the text or selection inside the OmniboxView itself,
418 // since this will conflict with the IME's control over the text. So instead 414 // since this will conflict with the IME's control over the text. So instead
419 // we show any autocompletion in a separate field after the OmniboxView. 415 // we show any autocompletion in a separate field after the OmniboxView.
420 views::Label* ime_inline_autocomplete_view_; 416 views::Label* ime_inline_autocomplete_view_;
421 417
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 BooleanPrefMember edit_bookmarks_enabled_; 474 BooleanPrefMember edit_bookmarks_enabled_;
479 475
480 // This is a debug state variable that stores if the WebContents was null 476 // This is a debug state variable that stores if the WebContents was null
481 // during the last RefreshPageAction. 477 // during the last RefreshPageAction.
482 bool web_contents_null_at_last_refresh_; 478 bool web_contents_null_at_last_refresh_;
483 479
484 DISALLOW_COPY_AND_ASSIGN(LocationBarView); 480 DISALLOW_COPY_AND_ASSIGN(LocationBarView);
485 }; 481 };
486 482
487 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ 483 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698