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 // TODO(viettrungluu): See the comment in corresponding .h file. | 5 // TODO(viettrungluu): See the comment in corresponding .h file. |
6 | 6 |
7 #include "ppapi/cpp/private/flash_menu.h" | 7 #include "ppapi/cpp/private/flash_menu.h" |
8 | 8 |
9 #include "ppapi/c/pp_errors.h" | 9 #include "ppapi/c/pp_errors.h" |
10 #include "ppapi/cpp/completion_callback.h" | 10 #include "ppapi/cpp/completion_callback.h" |
(...skipping 18 matching lines...) Expand all Loading... | |
29 if (has_interface<PPB_Flash_Menu>()) { | 29 if (has_interface<PPB_Flash_Menu>()) { |
30 PassRefFromConstructor(get_interface<PPB_Flash_Menu>()->Create( | 30 PassRefFromConstructor(get_interface<PPB_Flash_Menu>()->Create( |
31 instance.pp_instance(), menu_data)); | 31 instance.pp_instance(), menu_data)); |
32 } | 32 } |
33 } | 33 } |
34 | 34 |
35 int32_t Menu::Show(const Point& location, | 35 int32_t Menu::Show(const Point& location, |
36 int32_t* selected_id, | 36 int32_t* selected_id, |
37 const CompletionCallback& cc) { | 37 const CompletionCallback& cc) { |
38 if (!has_interface<PPB_Flash_Menu>()) | 38 if (!has_interface<PPB_Flash_Menu>()) |
39 return PP_ERROR_NOINTERFACE; | 39 return cc.MayForce(static_cast<int32_t>(PP_ERROR_NOINTERFACE)); |
piman
2011/06/07 17:32:14
no need for static_cast ?
polina
2011/06/09 23:53:51
Done.
| |
40 return get_interface<PPB_Flash_Menu>()->Show( | 40 return get_interface<PPB_Flash_Menu>()->Show( |
41 pp_resource(), | 41 pp_resource(), |
42 &location.pp_point(), | 42 &location.pp_point(), |
43 selected_id, | 43 selected_id, |
44 cc.pp_completion_callback()); | 44 cc.pp_completion_callback()); |
45 } | 45 } |
46 | 46 |
47 } // namespace flash | 47 } // namespace flash |
48 } // namespace pp | 48 } // namespace pp |
OLD | NEW |