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

Side by Side Diff: chrome/browser/ui/views/toolbar/toolbar_button.cc

Issue 1550053002: Convert Pass()→std::move() in //chrome/browser/ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 #include "chrome/browser/ui/views/toolbar/toolbar_button.h" 5 #include "chrome/browser/ui/views/toolbar/toolbar_button.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 } 164 }
165 165
166 scoped_ptr<views::LabelButtonBorder> 166 scoped_ptr<views::LabelButtonBorder>
167 ToolbarButton::CreateDefaultBorder() const { 167 ToolbarButton::CreateDefaultBorder() const {
168 scoped_ptr<views::LabelButtonBorder> border = 168 scoped_ptr<views::LabelButtonBorder> border =
169 views::LabelButton::CreateDefaultBorder(); 169 views::LabelButton::CreateDefaultBorder();
170 170
171 if (ThemeServiceFactory::GetForProfile(profile_)->UsingSystemTheme()) 171 if (ThemeServiceFactory::GetForProfile(profile_)->UsingSystemTheme())
172 border->set_insets(GetLayoutInsets(TOOLBAR_BUTTON)); 172 border->set_insets(GetLayoutInsets(TOOLBAR_BUTTON));
173 173
174 return border.Pass(); 174 return border;
175 } 175 }
176 176
177 void ToolbarButton::ShowContextMenuForView(View* source, 177 void ToolbarButton::ShowContextMenuForView(View* source,
178 const gfx::Point& point, 178 const gfx::Point& point,
179 ui::MenuSourceType source_type) { 179 ui::MenuSourceType source_type) {
180 if (!enabled()) 180 if (!enabled())
181 return; 181 return;
182 182
183 show_menu_factory_.InvalidateWeakPtrs(); 183 show_menu_factory_.InvalidateWeakPtrs();
184 ShowDropDownMenu(source_type); 184 ShowDropDownMenu(source_type);
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 SetState(STATE_NORMAL); 299 SetState(STATE_NORMAL);
300 } 300 }
301 301
302 const char* ToolbarButton::GetClassName() const { 302 const char* ToolbarButton::GetClassName() const {
303 return "ToolbarButton"; 303 return "ToolbarButton";
304 } 304 }
305 305
306 gfx::Point ToolbarButton::CalculateInkDropCenter() const { 306 gfx::Point ToolbarButton::CalculateInkDropCenter() const {
307 return GetLocalBounds().CenterPoint(); 307 return GetLocalBounds().CenterPoint();
308 } 308 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/toolbar_action_view.cc ('k') | chrome/browser/ui/views/translate/translate_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698