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

Side by Side Diff: chrome/browser/ui/views/toolbar/toolbar_action_view.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_action_view.h" 5 #include "chrome/browser/ui/views/toolbar/toolbar_action_view.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 void ToolbarActionView::GetAccessibleState(ui::AXViewState* state) { 104 void ToolbarActionView::GetAccessibleState(ui::AXViewState* state) {
105 views::MenuButton::GetAccessibleState(state); 105 views::MenuButton::GetAccessibleState(state);
106 state->role = ui::AX_ROLE_BUTTON; 106 state->role = ui::AX_ROLE_BUTTON;
107 } 107 }
108 108
109 scoped_ptr<LabelButtonBorder> ToolbarActionView::CreateDefaultBorder() const { 109 scoped_ptr<LabelButtonBorder> ToolbarActionView::CreateDefaultBorder() const {
110 scoped_ptr<LabelButtonBorder> border = LabelButton::CreateDefaultBorder(); 110 scoped_ptr<LabelButtonBorder> border = LabelButton::CreateDefaultBorder();
111 border->set_insets(gfx::Insets(kBorderInset, kBorderInset, 111 border->set_insets(gfx::Insets(kBorderInset, kBorderInset,
112 kBorderInset, kBorderInset)); 112 kBorderInset, kBorderInset));
113 return border.Pass(); 113 return border;
114 } 114 }
115 115
116 void ToolbarActionView::OnMouseEntered(const ui::MouseEvent& event) { 116 void ToolbarActionView::OnMouseEntered(const ui::MouseEvent& event) {
117 delegate_->OnMouseEnteredToolbarActionView(); 117 delegate_->OnMouseEnteredToolbarActionView();
118 views::MenuButton::OnMouseEntered(event); 118 views::MenuButton::OnMouseEntered(event);
119 } 119 }
120 120
121 bool ToolbarActionView::ShouldEnterPushedState(const ui::Event& event) { 121 bool ToolbarActionView::ShouldEnterPushedState(const ui::Event& event) {
122 return views::MenuButton::ShouldEnterPushedState(event) && 122 return views::MenuButton::ShouldEnterPushedState(event) &&
123 (base::TimeTicks::Now() - popup_closed_time_).InMilliseconds() > 123 (base::TimeTicks::Now() - popup_closed_time_).InMilliseconds() >
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 if (menu_controller->in_nested_run()) { 371 if (menu_controller->in_nested_run()) {
372 // There is another menu showing. Close the outermost menu (since we are 372 // There is another menu showing. Close the outermost menu (since we are
373 // shown in the same menu, we don't want to close the whole thing). 373 // shown in the same menu, we don't want to close the whole thing).
374 menu_controller->Cancel(views::MenuController::EXIT_OUTERMOST); 374 menu_controller->Cancel(views::MenuController::EXIT_OUTERMOST);
375 return true; 375 return true;
376 } 376 }
377 } 377 }
378 378
379 return false; 379 return false;
380 } 380 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/chevron_menu_button.cc ('k') | chrome/browser/ui/views/toolbar/toolbar_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698