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 "content/ppapi_plugin/broker_process_dispatcher.h" | 5 #include "content/ppapi_plugin/broker_process_dispatcher.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
11 #include "content/child/child_process.h" | 11 #include "content/child/child_process.h" |
12 #include "ppapi/c/pp_bool.h" | 12 #include "ppapi/c/pp_bool.h" |
13 #include "ppapi/c/private/ppp_flash_browser_operations.h" | 13 #include "ppapi/c/private/ppp_flash_browser_operations.h" |
14 #include "ppapi/proxy/ppapi_messages.h" | 14 #include "ppapi/proxy/ppapi_messages.h" |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 namespace { | 17 namespace { |
18 | 18 |
19 // How long we wait before releasing the broker process. | 19 // How long we wait before releasing the broker process. |
20 const int kBrokerReleaseTimeSeconds = 30; | 20 const int kBrokerReleaseTimeSeconds = 30; |
21 | 21 |
22 std::string ConvertPluginDataPath(const base::FilePath& plugin_data_path) { | 22 std::string ConvertPluginDataPath(const base::FilePath& plugin_data_path) { |
23 // The string is always 8-bit, convert on Windows. | 23 // The string is always 8-bit, convert on Windows. |
24 #if defined(OS_WIN) | 24 #if defined(OS_WIN) |
25 return WideToUTF8(plugin_data_path.value()); | 25 return base::WideToUTF8(plugin_data_path.value()); |
26 #else | 26 #else |
27 return plugin_data_path.value(); | 27 return plugin_data_path.value(); |
28 #endif | 28 #endif |
29 } | 29 } |
30 | 30 |
31 struct GetPermissionSettingsContext { | 31 struct GetPermissionSettingsContext { |
32 GetPermissionSettingsContext( | 32 GetPermissionSettingsContext( |
33 const base::WeakPtr<BrokerProcessDispatcher> in_dispatcher, | 33 const base::WeakPtr<BrokerProcessDispatcher> in_dispatcher, |
34 uint32 in_request_id) | 34 uint32 in_request_id) |
35 : dispatcher(in_dispatcher), | 35 : dispatcher(in_dispatcher), |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 PP_Bool result = flash_browser_operations_1_2_->SetSitePermission( | 318 PP_Bool result = flash_browser_operations_1_2_->SetSitePermission( |
319 data_str.c_str(), setting_type, sites.size(), site_array.get()); | 319 data_str.c_str(), setting_type, sites.size(), site_array.get()); |
320 | 320 |
321 return PP_ToBool(result); | 321 return PP_ToBool(result); |
322 } | 322 } |
323 | 323 |
324 return false; | 324 return false; |
325 } | 325 } |
326 | 326 |
327 } // namespace content | 327 } // namespace content |
OLD | NEW |