OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ppapi/proxy/serialized_flash_menu.h" | 5 #include "ppapi/proxy/serialized_flash_menu.h" |
6 | 6 |
7 #include "ipc/ipc_message.h" | 7 #include "ipc/ipc_message.h" |
8 #include "ppapi/c/private/ppb_flash_menu.h" | 8 #include "ppapi/c/private/ppb_flash_menu.h" |
9 #include "ppapi/proxy/ppapi_param_traits.h" | 9 #include "ppapi/proxy/ppapi_param_traits.h" |
10 | 10 |
11 namespace pp { | 11 namespace ppapi { |
12 namespace proxy { | 12 namespace proxy { |
13 | 13 |
14 namespace { | 14 namespace { |
15 // Maximum depth of submenus allowed (e.g., 1 indicates that submenus are | 15 // Maximum depth of submenus allowed (e.g., 1 indicates that submenus are |
16 // allowed, but not sub-submenus). | 16 // allowed, but not sub-submenus). |
17 const int kMaxMenuDepth = 2; | 17 const int kMaxMenuDepth = 2; |
18 | 18 |
19 bool CheckMenu(int depth, const PP_Flash_Menu* menu); | 19 bool CheckMenu(int depth, const PP_Flash_Menu* menu); |
20 void FreeMenu(const PP_Flash_Menu* menu); | 20 void FreeMenu(const PP_Flash_Menu* menu); |
21 void WriteMenu(IPC::Message* m, const PP_Flash_Menu* menu); | 21 void WriteMenu(IPC::Message* m, const PP_Flash_Menu* menu); |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 DCHECK(!pp_menu_); | 162 DCHECK(!pp_menu_); |
163 pp_menu_ = ReadMenu(0, m, iter); | 163 pp_menu_ = ReadMenu(0, m, iter); |
164 if (!pp_menu_) | 164 if (!pp_menu_) |
165 return false; | 165 return false; |
166 | 166 |
167 own_menu_ = true; | 167 own_menu_ = true; |
168 return true; | 168 return true; |
169 } | 169 } |
170 | 170 |
171 } // namespace proxy | 171 } // namespace proxy |
172 } // namespace pp | 172 } // namespace ppapi |
OLD | NEW |