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 "ppapi/cpp/private/flash.h" | 5 #include "ppapi/cpp/private/flash.h" |
6 | 6 |
7 #include "ppapi/c/pp_bool.h" | 7 #include "ppapi/c/pp_bool.h" |
8 #include "ppapi/c/pp_errors.h" | 8 #include "ppapi/c/pp_errors.h" |
9 #include "ppapi/cpp/dev/font_dev.h" | 9 #include "ppapi/cpp/dev/font_dev.h" |
10 #include "ppapi/cpp/image_data.h" | 10 #include "ppapi/cpp/image_data.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 return PPB_FLASH_INTERFACE_11_0; | 33 return PPB_FLASH_INTERFACE_11_0; |
34 } | 34 } |
35 | 35 |
36 } // namespace | 36 } // namespace |
37 | 37 |
38 namespace flash { | 38 namespace flash { |
39 | 39 |
40 // static | 40 // static |
41 bool Flash::IsAvailable() { | 41 bool Flash::IsAvailable() { |
42 return has_interface<PPB_Flash>() || | 42 return has_interface<PPB_Flash>() || |
43 has_interface<PPB_Flash_12_0>(); | 43 has_interface<PPB_Flash_12_0>() || |
44 has_interface<PPB_Flash_11>(); | 44 has_interface<PPB_Flash_11>(); |
45 } | 45 } |
46 | 46 |
47 // static | 47 // static |
48 void Flash::SetInstanceAlwaysOnTop(Instance* instance, bool on_top) { | 48 void Flash::SetInstanceAlwaysOnTop(Instance* instance, bool on_top) { |
49 if (has_interface<PPB_Flash>()) { | 49 if (has_interface<PPB_Flash>()) { |
50 get_interface<PPB_Flash>()->SetInstanceAlwaysOnTop(instance->pp_instance(), | 50 get_interface<PPB_Flash>()->SetInstanceAlwaysOnTop(instance->pp_instance(), |
51 PP_FromBool(on_top)); | 51 PP_FromBool(on_top)); |
52 } else if (has_interface<PPB_Flash_12_0>()) { | 52 } else if (has_interface<PPB_Flash_12_0>()) { |
53 get_interface<PPB_Flash_12_0>()->SetInstanceAlwaysOnTop( | 53 get_interface<PPB_Flash_12_0>()->SetInstanceAlwaysOnTop( |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 } | 236 } |
237 | 237 |
238 // static | 238 // static |
239 void Flash::UpdateActivity(Instance* instance) { | 239 void Flash::UpdateActivity(Instance* instance) { |
240 if (has_interface<PPB_Flash>()) | 240 if (has_interface<PPB_Flash>()) |
241 get_interface<PPB_Flash>()->UpdateActivity(instance->pp_instance()); | 241 get_interface<PPB_Flash>()->UpdateActivity(instance->pp_instance()); |
242 } | 242 } |
243 | 243 |
244 } // namespace flash | 244 } // namespace flash |
245 } // namespace pp | 245 } // namespace pp |
OLD | NEW |