| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer/pepper/pepper_flash_menu_host.h" | 5 #include "chrome/renderer/pepper/pepper_flash_menu_host.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "content/public/common/context_menu_params.h" | 8 #include "content/public/common/context_menu_params.h" |
| 9 #include "content/public/renderer/render_view.h" | 9 #include "content/public/renderer/render_view.h" |
| 10 #include "content/public/renderer/renderer_ppapi_host.h" | 10 #include "content/public/renderer/renderer_ppapi_host.h" |
| 11 #include "ppapi/c/private/ppb_flash_menu.h" | 11 #include "ppapi/c/private/ppb_flash_menu.h" |
| 12 #include "ppapi/host/dispatch_host_message.h" | 12 #include "ppapi/host/dispatch_host_message.h" |
| 13 #include "ppapi/host/ppapi_host.h" | 13 #include "ppapi/host/ppapi_host.h" |
| 14 #include "ppapi/proxy/ppapi_messages.h" | 14 #include "ppapi/proxy/ppapi_messages.h" |
| 15 #include "ppapi/proxy/serialized_flash_menu.h" | 15 #include "ppapi/proxy/serialized_flash_menu.h" |
| 16 #include "ui/gfx/point.h" | 16 #include "ui/gfx/point.h" |
| 17 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | |
| 18 | 17 |
| 19 namespace chrome { | 18 namespace chrome { |
| 20 | 19 |
| 21 namespace { | 20 namespace { |
| 22 | 21 |
| 23 // Maximum depth of submenus allowed (e.g., 1 indicates that submenus are | 22 // Maximum depth of submenus allowed (e.g., 1 indicates that submenus are |
| 24 // allowed, but not sub-submenus). | 23 // allowed, but not sub-submenus). |
| 25 const size_t kMaxMenuDepth = 2; | 24 const size_t kMaxMenuDepth = 2; |
| 26 | 25 |
| 27 // Maximum number of entries in any single menu (including separators). | 26 // Maximum number of entries in any single menu (including separators). |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 ppapi::host::ReplyMessageContext reply_context( | 197 ppapi::host::ReplyMessageContext reply_context( |
| 199 ppapi::proxy::ResourceMessageReplyParams(pp_resource(), 0), | 198 ppapi::proxy::ResourceMessageReplyParams(pp_resource(), 0), |
| 200 NULL); | 199 NULL); |
| 201 reply_context.params.set_result(result); | 200 reply_context.params.set_result(result); |
| 202 host()->SendReply(reply_context, | 201 host()->SendReply(reply_context, |
| 203 PpapiPluginMsg_FlashMenu_ShowReply(action)); | 202 PpapiPluginMsg_FlashMenu_ShowReply(action)); |
| 204 | 203 |
| 205 } | 204 } |
| 206 | 205 |
| 207 } // namespace chrome | 206 } // namespace chrome |
| OLD | NEW |