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

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

Issue 2673503002: Slightly simplify location bar bg/border painting. (Closed)
Patch Set: pkasting review Created 3 years, 10 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 static const char kViewClassName[]; 120 static const char kViewClassName[];
121 121
122 LocationBarView(Browser* browser, 122 LocationBarView(Browser* browser,
123 Profile* profile, 123 Profile* profile,
124 CommandUpdater* command_updater, 124 CommandUpdater* command_updater,
125 Delegate* delegate, 125 Delegate* delegate,
126 bool is_popup_mode); 126 bool is_popup_mode);
127 127
128 ~LocationBarView() override; 128 ~LocationBarView() override;
129 129
130 // Returns the color for the location bar border given the window's 130 // Returns the location bar border color blended with the toolbar color.
131 // |incognito| state. 131 // It's guaranteed to be opaque.
132 static SkColor GetBorderColor(bool incognito); 132 static SkColor GetOpaqueBorderColor(bool incognito);
133 133
134 // Initializes the LocationBarView. 134 // Initializes the LocationBarView.
135 void Init(); 135 void Init();
136 136
137 // True if this instance has been initialized by calling Init, which can only 137 // True if this instance has been initialized by calling Init, which can only
138 // be called when the receiving instance is attached to a view container. 138 // be called when the receiving instance is attached to a view container.
139 bool IsInitialized() const; 139 bool IsInitialized() const;
140 140
141 // Returns the appropriate color for the desired kind, based on the user's 141 // Returns the appropriate color for the desired kind, based on the user's
142 // system theme. 142 // system theme.
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 ExtensionAction* GetPageAction(size_t index) override; 362 ExtensionAction* GetPageAction(size_t index) override;
363 ExtensionAction* GetVisiblePageAction(size_t index) override; 363 ExtensionAction* GetVisiblePageAction(size_t index) override;
364 void TestPageActionPressed(size_t index) override; 364 void TestPageActionPressed(size_t index) override;
365 bool GetBookmarkStarVisibility() override; 365 bool GetBookmarkStarVisibility() override;
366 366
367 // views::View: 367 // views::View:
368 const char* GetClassName() const override; 368 const char* GetClassName() const override;
369 void OnBoundsChanged(const gfx::Rect& previous_bounds) override; 369 void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
370 void OnFocus() override; 370 void OnFocus() override;
371 void OnPaint(gfx::Canvas* canvas) override; 371 void OnPaint(gfx::Canvas* canvas) override;
372 void OnPaintBorder(gfx::Canvas* canvas) override;
372 373
373 // views::DragController: 374 // views::DragController:
374 void WriteDragDataForView(View* sender, 375 void WriteDragDataForView(View* sender,
375 const gfx::Point& press_pt, 376 const gfx::Point& press_pt,
376 OSExchangeData* data) override; 377 OSExchangeData* data) override;
377 int GetDragOperationsForView(View* sender, const gfx::Point& p) override; 378 int GetDragOperationsForView(View* sender, const gfx::Point& p) override;
378 bool CanStartDragForView(View* sender, 379 bool CanStartDragForView(View* sender,
379 const gfx::Point& press_pt, 380 const gfx::Point& press_pt,
380 const gfx::Point& p) override; 381 const gfx::Point& p) override;
381 382
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 BooleanPrefMember edit_bookmarks_enabled_; 469 BooleanPrefMember edit_bookmarks_enabled_;
469 470
470 // This is a debug state variable that stores if the WebContents was null 471 // This is a debug state variable that stores if the WebContents was null
471 // during the last RefreshPageAction. 472 // during the last RefreshPageAction.
472 bool web_contents_null_at_last_refresh_; 473 bool web_contents_null_at_last_refresh_;
473 474
474 DISALLOW_COPY_AND_ASSIGN(LocationBarView); 475 DISALLOW_COPY_AND_ASSIGN(LocationBarView);
475 }; 476 };
476 477
477 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ 478 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/opaque_browser_frame_view.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