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

Side by Side Diff: chrome/browser/ui/views/menu_test_base.h

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_MENU_TEST_BASE_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_MENU_TEST_BASE_H_
6 #define CHROME_BROWSER_UI_VIEWS_MENU_TEST_BASE_H_ 6 #define CHROME_BROWSER_UI_VIEWS_MENU_TEST_BASE_H_
7 7
8 #include <memory>
9
8 #include "base/callback.h" 10 #include "base/callback.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "chrome/test/base/view_event_test_base.h" 12 #include "chrome/test/base/view_event_test_base.h"
12 #include "ui/events/keycodes/keyboard_codes.h" 13 #include "ui/events/keycodes/keyboard_codes.h"
13 #include "ui/views/controls/button/menu_button_listener.h" 14 #include "ui/views/controls/button/menu_button_listener.h"
14 #include "ui/views/controls/menu/menu_delegate.h" 15 #include "ui/views/controls/menu/menu_delegate.h"
15 16
16 namespace views { 17 namespace views {
17 class MenuButton; 18 class MenuButton;
18 class MenuItemView; 19 class MenuItemView;
19 class MenuRunner; 20 class MenuRunner;
20 } 21 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 void OnMenuButtonClicked(views::MenuButton* source, 77 void OnMenuButtonClicked(views::MenuButton* source,
77 const gfx::Point& point, 78 const gfx::Point& point,
78 const ui::Event* event) override; 79 const ui::Event* event) override;
79 80
80 // views::MenuDelegate implementation 81 // views::MenuDelegate implementation
81 void ExecuteCommand(int id) override; 82 void ExecuteCommand(int id) override;
82 83
83 private: 84 private:
84 views::MenuButton* button_; 85 views::MenuButton* button_;
85 views::MenuItemView* menu_; 86 views::MenuItemView* menu_;
86 scoped_ptr<views::MenuRunner> menu_runner_; 87 std::unique_ptr<views::MenuRunner> menu_runner_;
87 88
88 // The command id of the last pressed menu item since the menu was opened. 89 // The command id of the last pressed menu item since the menu was opened.
89 int last_command_; 90 int last_command_;
90 91
91 DISALLOW_COPY_AND_ASSIGN(MenuTestBase); 92 DISALLOW_COPY_AND_ASSIGN(MenuTestBase);
92 }; 93 };
93 94
94 #endif // CHROME_BROWSER_UI_VIEWS_MENU_TEST_BASE_H_ 95 #endif // CHROME_BROWSER_UI_VIEWS_MENU_TEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698