| 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 #include "chrome/browser/extensions/api/web_view/chrome_web_view_internal_api.h" | 5 #include "chrome/browser/extensions/api/web_view/chrome_web_view_internal_api.h" |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/api/context_menus/context_menus_api.h" | 7 #include "chrome/browser/extensions/api/context_menus/context_menus_api.h" |
| 8 #include "chrome/browser/extensions/api/context_menus/context_menus_api_helpers.
h" | 8 #include "chrome/browser/extensions/api/context_menus/context_menus_api_helpers.
h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/common/extensions/api/chrome_web_view_internal.h" | 10 #include "chrome/common/extensions/api/chrome_web_view_internal.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 ChromeWebViewInternalShowContextMenuFunction:: | 139 ChromeWebViewInternalShowContextMenuFunction:: |
| 140 ~ChromeWebViewInternalShowContextMenuFunction() { | 140 ~ChromeWebViewInternalShowContextMenuFunction() { |
| 141 } | 141 } |
| 142 | 142 |
| 143 bool ChromeWebViewInternalShowContextMenuFunction::RunAsyncSafe( | 143 bool ChromeWebViewInternalShowContextMenuFunction::RunAsyncSafe( |
| 144 WebViewGuest* guest) { | 144 WebViewGuest* guest) { |
| 145 scoped_ptr<webview::ShowContextMenu::Params> params( | 145 scoped_ptr<webview::ShowContextMenu::Params> params( |
| 146 webview::ShowContextMenu::Params::Create(*args_)); | 146 webview::ShowContextMenu::Params::Create(*args_)); |
| 147 EXTENSION_FUNCTION_VALIDATE(params.get()); | 147 EXTENSION_FUNCTION_VALIDATE(params.get()); |
| 148 | 148 |
| 149 // TODO(lazyboy): Actually implement filtering menu items, we pass NULL for | 149 // TODO(lazyboy): Actually implement filtering menu items. |
| 150 // now. | 150 guest->ShowContextMenu(params->request_id); |
| 151 guest->ShowContextMenu(params->request_id, NULL); | |
| 152 | 151 |
| 153 SendResponse(true); | 152 SendResponse(true); |
| 154 return true; | 153 return true; |
| 155 } | 154 } |
| 156 | 155 |
| 157 } // namespace extensions | 156 } // namespace extensions |
| OLD | NEW |