| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/test/combobox_test_api.h" | 5 #include "ui/views/test/combobox_test_api.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 void ComboboxTestApi::PerformActionAt(int index) { | 45 void ComboboxTestApi::PerformActionAt(int index) { |
| 46 menu_model()->ActivatedAt(index); | 46 menu_model()->ActivatedAt(index); |
| 47 } | 47 } |
| 48 | 48 |
| 49 void ComboboxTestApi::InstallTestMenuRunner(int* menu_show_count) { | 49 void ComboboxTestApi::InstallTestMenuRunner(int* menu_show_count) { |
| 50 combobox_->menu_runner_.reset( | 50 combobox_->menu_runner_.reset( |
| 51 new MenuRunner(menu_model(), MenuRunner::COMBOBOX)); | 51 new MenuRunner(menu_model(), MenuRunner::COMBOBOX)); |
| 52 test::MenuRunnerTestAPI test_api(combobox_->menu_runner_.get()); | 52 test::MenuRunnerTestAPI test_api(combobox_->menu_runner_.get()); |
| 53 test_api.SetMenuRunnerHandler( | 53 test_api.SetMenuRunnerHandler( |
| 54 base::WrapUnique(new TestMenuRunnerHandler(menu_show_count))); | 54 base::MakeUnique<TestMenuRunnerHandler>(menu_show_count)); |
| 55 } | 55 } |
| 56 | 56 |
| 57 gfx::Size ComboboxTestApi::content_size() { | 57 gfx::Size ComboboxTestApi::content_size() { |
| 58 return combobox_->content_size_; | 58 return combobox_->content_size_; |
| 59 } | 59 } |
| 60 | 60 |
| 61 ui::MenuModel* ComboboxTestApi::menu_model() { | 61 ui::MenuModel* ComboboxTestApi::menu_model() { |
| 62 return combobox_->menu_model_adapter_.get(); | 62 return combobox_->menu_model_adapter_.get(); |
| 63 } | 63 } |
| 64 | 64 |
| 65 } // test | 65 } // test |
| 66 } // views | 66 } // views |
| OLD | NEW |