| OLD | NEW |
| 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 #include "ui/views/controls/menu/menu_runner.h" | 5 #include "ui/views/controls/menu/menu_runner.h" |
| 6 | 6 |
| 7 #include <utility> |
| 8 |
| 7 #include "ui/views/controls/menu/menu_runner_handler.h" | 9 #include "ui/views/controls/menu/menu_runner_handler.h" |
| 8 #include "ui/views/controls/menu/menu_runner_impl.h" | 10 #include "ui/views/controls/menu/menu_runner_impl.h" |
| 9 | 11 |
| 10 namespace views { | 12 namespace views { |
| 11 | 13 |
| 12 MenuRunner::MenuRunner(ui::MenuModel* menu_model, int32 run_types) | 14 MenuRunner::MenuRunner(ui::MenuModel* menu_model, int32 run_types) |
| 13 : run_types_(run_types), | 15 : run_types_(run_types), |
| 14 impl_(internal::MenuRunnerImplInterface::Create(menu_model, run_types)) { | 16 impl_(internal::MenuRunnerImplInterface::Create(menu_model, run_types)) { |
| 15 } | 17 } |
| 16 | 18 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 void MenuRunner::Cancel() { | 68 void MenuRunner::Cancel() { |
| 67 impl_->Cancel(); | 69 impl_->Cancel(); |
| 68 } | 70 } |
| 69 | 71 |
| 70 base::TimeDelta MenuRunner::closing_event_time() const { | 72 base::TimeDelta MenuRunner::closing_event_time() const { |
| 71 return impl_->GetClosingEventTime(); | 73 return impl_->GetClosingEventTime(); |
| 72 } | 74 } |
| 73 | 75 |
| 74 void MenuRunner::SetRunnerHandler( | 76 void MenuRunner::SetRunnerHandler( |
| 75 scoped_ptr<MenuRunnerHandler> runner_handler) { | 77 scoped_ptr<MenuRunnerHandler> runner_handler) { |
| 76 runner_handler_ = runner_handler.Pass(); | 78 runner_handler_ = std::move(runner_handler); |
| 77 } | 79 } |
| 78 | 80 |
| 79 } // namespace views | 81 } // namespace views |
| OLD | NEW |