| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 } | 133 } |
| 134 | 134 |
| 135 ChromeWebViewInternalShowContextMenuFunction:: | 135 ChromeWebViewInternalShowContextMenuFunction:: |
| 136 ChromeWebViewInternalShowContextMenuFunction() { | 136 ChromeWebViewInternalShowContextMenuFunction() { |
| 137 } | 137 } |
| 138 | 138 |
| 139 ChromeWebViewInternalShowContextMenuFunction:: | 139 ChromeWebViewInternalShowContextMenuFunction:: |
| 140 ~ChromeWebViewInternalShowContextMenuFunction() { | 140 ~ChromeWebViewInternalShowContextMenuFunction() { |
| 141 } | 141 } |
| 142 | 142 |
| 143 bool ChromeWebViewInternalShowContextMenuFunction::RunAsyncSafe( | 143 ExtensionFunction::ResponseAction |
| 144 WebViewGuest* guest) { | 144 ChromeWebViewInternalShowContextMenuFunction::Run() { |
| 145 std::unique_ptr<webview::ShowContextMenu::Params> params( | 145 std::unique_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. | 149 // TODO(lazyboy): Actually implement filtering menu items. |
| 150 guest->ShowContextMenu(params->request_id); | 150 guest_->ShowContextMenu(params->request_id); |
| 151 | 151 return RespondNow(NoArguments()); |
| 152 SendResponse(true); | |
| 153 return true; | |
| 154 } | 152 } |
| 155 | 153 |
| 156 } // namespace extensions | 154 } // namespace extensions |
| OLD | NEW |