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

Side by Side Diff: chrome/browser/ui/views/toolbar/toolbar_action_view.h

Issue 1053143002: Make View::Paint use ui::PaintRecorder to access PaintContext's canvas (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: paintrecorder: . Created 5 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_TOOLBAR_TOOLBAR_ACTION_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTION_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTION_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTION_VIEW_H_
7 7
8 #include "chrome/browser/ui/views/toolbar/toolbar_action_view_delegate_views.h" 8 #include "chrome/browser/ui/views/toolbar/toolbar_action_view_delegate_views.h"
9 #include "content/public/browser/notification_observer.h" 9 #include "content/public/browser/notification_observer.h"
10 #include "content/public/browser/notification_registrar.h" 10 #include "content/public/browser/notification_registrar.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 bool wants_to_run_for_testing() const { return wants_to_run_; } 114 bool wants_to_run_for_testing() const { return wants_to_run_; }
115 115
116 private: 116 private:
117 // views::MenuButton: 117 // views::MenuButton:
118 gfx::Size GetPreferredSize() const override; 118 gfx::Size GetPreferredSize() const override;
119 const char* GetClassName() const override; 119 const char* GetClassName() const override;
120 void OnDragDone() override; 120 void OnDragDone() override;
121 void ViewHierarchyChanged( 121 void ViewHierarchyChanged(
122 const ViewHierarchyChangedDetails& details) override; 122 const ViewHierarchyChangedDetails& details) override;
123 void PaintChildren(const PaintContext& context) override; 123 void PaintChildren(const ui::PaintContext& context) override;
124 void OnPaintBorder(gfx::Canvas* canvas) override; 124 void OnPaintBorder(gfx::Canvas* canvas) override;
125 125
126 // ToolbarActionViewDelegateViews: 126 // ToolbarActionViewDelegateViews:
127 views::View* GetAsView() override; 127 views::View* GetAsView() override;
128 bool IsShownInMenu() override; 128 bool IsShownInMenu() override;
129 views::FocusManager* GetFocusManagerForAccelerator() override; 129 views::FocusManager* GetFocusManagerForAccelerator() override;
130 views::Widget* GetParentForContextMenu() override; 130 views::Widget* GetParentForContextMenu() override;
131 ToolbarActionViewController* GetPreferredPopupViewController() override; 131 ToolbarActionViewController* GetPreferredPopupViewController() override;
132 views::View* GetReferenceViewForPopup() override; 132 views::View* GetReferenceViewForPopup() override;
133 views::MenuButton* GetContextMenuButton() override; 133 views::MenuButton* GetContextMenuButton() override;
(...skipping 21 matching lines...) Expand all
155 155
156 // A special border to draw when the action wants to run. 156 // A special border to draw when the action wants to run.
157 scoped_ptr<views::LabelButtonBorder> wants_to_run_border_; 157 scoped_ptr<views::LabelButtonBorder> wants_to_run_border_;
158 158
159 content::NotificationRegistrar registrar_; 159 content::NotificationRegistrar registrar_;
160 160
161 DISALLOW_COPY_AND_ASSIGN(ToolbarActionView); 161 DISALLOW_COPY_AND_ASSIGN(ToolbarActionView);
162 }; 162 };
163 163
164 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTION_VIEW_H_ 164 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTION_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698