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 "webkit/plugins/npapi/webplugin_delegate_impl.h" | 5 #include "content/child/npapi/webplugin_delegate_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "base/process_util.h" | 12 #include "base/process_util.h" |
13 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
| 14 #include "content/child/npapi/plugin_instance.h" |
| 15 #include "content/child/npapi/plugin_lib.h" |
| 16 #include "content/child/npapi/plugin_stream_url.h" |
14 #include "third_party/WebKit/public/web/WebInputEvent.h" | 17 #include "third_party/WebKit/public/web/WebInputEvent.h" |
15 #include "webkit/glue/webkit_glue.h" | 18 #include "webkit/glue/webkit_glue.h" |
16 #include "webkit/plugins/npapi/plugin_instance.h" | |
17 #include "webkit/plugins/npapi/plugin_lib.h" | |
18 #include "webkit/plugins/npapi/plugin_stream_url.h" | |
19 #include "webkit/plugins/npapi/plugin_utils.h" | 19 #include "webkit/plugins/npapi/plugin_utils.h" |
20 | 20 |
21 using WebKit::WebCursorInfo; | 21 using WebKit::WebCursorInfo; |
22 using WebKit::WebInputEvent; | 22 using WebKit::WebInputEvent; |
23 | 23 |
24 namespace webkit { | 24 namespace content { |
25 namespace npapi { | |
26 | 25 |
27 WebPluginDelegateImpl* WebPluginDelegateImpl::Create( | 26 WebPluginDelegateImpl* WebPluginDelegateImpl::Create( |
28 const base::FilePath& filename, | 27 const base::FilePath& filename, |
29 const std::string& mime_type) { | 28 const std::string& mime_type) { |
30 scoped_refptr<PluginLib> plugin_lib(PluginLib::CreatePluginLib(filename)); | 29 scoped_refptr<PluginLib> plugin_lib(PluginLib::CreatePluginLib(filename)); |
31 if (plugin_lib.get() == NULL) | 30 if (plugin_lib.get() == NULL) |
32 return NULL; | 31 return NULL; |
33 | 32 |
34 NPError err = plugin_lib->NP_Initialize(); | 33 NPError err = plugin_lib->NP_Initialize(); |
35 if (err != NPERR_NO_ERROR) | 34 if (err != NPERR_NO_ERROR) |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 | 298 |
300 WebPluginResourceClient* WebPluginDelegateImpl::CreateSeekableResourceClient( | 299 WebPluginResourceClient* WebPluginDelegateImpl::CreateSeekableResourceClient( |
301 unsigned long resource_id, int range_request_id) { | 300 unsigned long resource_id, int range_request_id) { |
302 WebPluginResourceClient* resource_client = instance()->GetRangeRequest( | 301 WebPluginResourceClient* resource_client = instance()->GetRangeRequest( |
303 range_request_id); | 302 range_request_id); |
304 if (resource_client) | 303 if (resource_client) |
305 resource_client->AddRangeRequestResourceId(resource_id); | 304 resource_client->AddRangeRequestResourceId(resource_id); |
306 return resource_client; | 305 return resource_client; |
307 } | 306 } |
308 | 307 |
309 } // namespace npapi | 308 } // namespace content |
310 } // namespace webkit | |
OLD | NEW |