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 "chrome/browser/plugin_process_host.h" | 5 #include "chrome/browser/plugin_process_host.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #elif defined(OS_POSIX) | 9 #elif defined(OS_POSIX) |
10 #include <utility> // for pair<> | 10 #include <utility> // for pair<> |
(...skipping 19 matching lines...) Expand all Loading... |
30 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" | 30 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" |
31 #include "chrome/browser/renderer_host/resource_message_filter.h" | 31 #include "chrome/browser/renderer_host/resource_message_filter.h" |
32 #include "chrome/common/chrome_paths.h" | 32 #include "chrome/common/chrome_paths.h" |
33 #include "chrome/common/chrome_plugin_lib.h" | 33 #include "chrome/common/chrome_plugin_lib.h" |
34 #include "chrome/common/chrome_switches.h" | 34 #include "chrome/common/chrome_switches.h" |
35 #include "chrome/common/logging_chrome.h" | 35 #include "chrome/common/logging_chrome.h" |
36 #include "chrome/common/net/url_request_context_getter.h" | 36 #include "chrome/common/net/url_request_context_getter.h" |
37 #include "chrome/common/plugin_messages.h" | 37 #include "chrome/common/plugin_messages.h" |
38 #include "chrome/common/render_messages.h" | 38 #include "chrome/common/render_messages.h" |
39 #include "chrome/common/render_messages_params.h" | 39 #include "chrome/common/render_messages_params.h" |
40 #include "gfx/native_widget_types.h" | |
41 #include "ipc/ipc_switches.h" | 40 #include "ipc/ipc_switches.h" |
42 #include "net/base/cookie_store.h" | 41 #include "net/base/cookie_store.h" |
43 #include "net/base/io_buffer.h" | 42 #include "net/base/io_buffer.h" |
44 #include "net/url_request/url_request.h" | 43 #include "net/url_request/url_request.h" |
45 #include "net/url_request/url_request_context.h" | 44 #include "net/url_request/url_request_context.h" |
46 #include "ui/base/ui_base_switches.h" | 45 #include "ui/base/ui_base_switches.h" |
| 46 #include "ui/gfx/native_widget_types.h" |
47 | 47 |
48 #if defined(USE_X11) | 48 #if defined(USE_X11) |
49 #include "gfx/gtk_native_view_id_manager.h" | 49 #include "ui/gfx/gtk_native_view_id_manager.h" |
50 #endif | 50 #endif |
51 | 51 |
52 #if defined(OS_MACOSX) | 52 #if defined(OS_MACOSX) |
53 #include "base/mac/mac_util.h" | 53 #include "base/mac/mac_util.h" |
54 #include "chrome/common/plugin_carbon_interpose_constants_mac.h" | 54 #include "chrome/common/plugin_carbon_interpose_constants_mac.h" |
55 #include "gfx/rect.h" | 55 #include "ui/gfx/rect.h" |
56 #endif | 56 #endif |
57 | 57 |
58 static const char kDefaultPluginFinderURL[] = | 58 static const char kDefaultPluginFinderURL[] = |
59 "https://dl-ssl.google.com/edgedl/chrome/plugins/plugins2.xml"; | 59 "https://dl-ssl.google.com/edgedl/chrome/plugins/plugins2.xml"; |
60 | 60 |
61 namespace { | 61 namespace { |
62 | 62 |
63 // Helper class that we pass to ResourceMessageFilter so that it can find the | 63 // Helper class that we pass to ResourceMessageFilter so that it can find the |
64 // right net::URLRequestContext for a request. | 64 // right net::URLRequestContext for a request. |
65 class PluginURLRequestContextOverride | 65 class PluginURLRequestContextOverride |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 const std::vector<uint8>& data) { | 469 const std::vector<uint8>& data) { |
470 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 470 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
471 | 471 |
472 ChromePluginLib *chrome_plugin = ChromePluginLib::Find(info_.path); | 472 ChromePluginLib *chrome_plugin = ChromePluginLib::Find(info_.path); |
473 if (chrome_plugin) { | 473 if (chrome_plugin) { |
474 void *data_ptr = const_cast<void*>(reinterpret_cast<const void*>(&data[0])); | 474 void *data_ptr = const_cast<void*>(reinterpret_cast<const void*>(&data[0])); |
475 uint32 data_len = static_cast<uint32>(data.size()); | 475 uint32 data_len = static_cast<uint32>(data.size()); |
476 chrome_plugin->functions().on_message(data_ptr, data_len); | 476 chrome_plugin->functions().on_message(data_ptr, data_len); |
477 } | 477 } |
478 } | 478 } |
OLD | NEW |