OLD | NEW |
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 COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_ | 5 #ifndef COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_ |
6 #define COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_ | 6 #define COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | |
10 #include <map> | 9 #include <map> |
11 #include <string> | 10 #include <string> |
| 11 #include <utility> |
12 | 12 |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/memory/scoped_vector.h" | 15 #include "base/memory/scoped_vector.h" |
16 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
17 #include "base/strings/string16.h" | 17 #include "base/strings/string16.h" |
18 #include "components/renderer_context_menu/context_menu_content_type.h" | 18 #include "components/renderer_context_menu/context_menu_content_type.h" |
19 #include "components/renderer_context_menu/render_view_context_menu_observer.h" | 19 #include "components/renderer_context_menu/render_view_context_menu_observer.h" |
20 #include "components/renderer_context_menu/render_view_context_menu_proxy.h" | 20 #include "components/renderer_context_menu/render_view_context_menu_proxy.h" |
21 #include "content/public/common/context_menu_params.h" | 21 #include "content/public/common/context_menu_params.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 114 |
115 protected: | 115 protected: |
116 friend class RenderViewContextMenuTest; | 116 friend class RenderViewContextMenuTest; |
117 friend class RenderViewContextMenuPrefsTest; | 117 friend class RenderViewContextMenuPrefsTest; |
118 | 118 |
119 void set_content_type(ContextMenuContentType* content_type) { | 119 void set_content_type(ContextMenuContentType* content_type) { |
120 content_type_.reset(content_type); | 120 content_type_.reset(content_type); |
121 } | 121 } |
122 | 122 |
123 void set_toolkit_delegate(scoped_ptr<ToolkitDelegate> delegate) { | 123 void set_toolkit_delegate(scoped_ptr<ToolkitDelegate> delegate) { |
124 toolkit_delegate_ = delegate.Pass(); | 124 toolkit_delegate_ = std::move(delegate); |
125 } | 125 } |
126 | 126 |
127 ToolkitDelegate* toolkit_delegate() { | 127 ToolkitDelegate* toolkit_delegate() { |
128 return toolkit_delegate_.get(); | 128 return toolkit_delegate_.get(); |
129 } | 129 } |
130 | 130 |
131 // TODO(oshima): Make these methods delegate. | 131 // TODO(oshima): Make these methods delegate. |
132 | 132 |
133 // Menu Construction. | 133 // Menu Construction. |
134 virtual void InitMenu(); | 134 virtual void InitMenu(); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 const int render_process_id_; | 197 const int render_process_id_; |
198 | 198 |
199 scoped_ptr<ToolkitDelegate> toolkit_delegate_; | 199 scoped_ptr<ToolkitDelegate> toolkit_delegate_; |
200 | 200 |
201 ScopedVector<ui::SimpleMenuModel> custom_submenus_; | 201 ScopedVector<ui::SimpleMenuModel> custom_submenus_; |
202 | 202 |
203 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuBase); | 203 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuBase); |
204 }; | 204 }; |
205 | 205 |
206 #endif // COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_ | 206 #endif // COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_ |
OLD | NEW |