| 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/browser/plugin_process_host.h" | 5 #include "content/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<> |
| 11 #endif | 11 #endif |
| 12 | 12 |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/base_switches.h" | 15 #include "base/base_switches.h" |
| 16 #include "base/bind.h" | 16 #include "base/bind.h" |
| 17 #include "base/command_line.h" | 17 #include "base/command_line.h" |
| 18 #include "base/files/file_path.h" | 18 #include "base/files/file_path.h" |
| 19 #include "base/lazy_instance.h" | 19 #include "base/lazy_instance.h" |
| 20 #include "base/logging.h" | 20 #include "base/logging.h" |
| 21 #include "base/metrics/histogram.h" | 21 #include "base/metrics/histogram.h" |
| 22 #include "base/strings/string_number_conversions.h" | 22 #include "base/strings/string_number_conversions.h" |
| 23 #include "base/strings/string_util.h" | 23 #include "base/strings/string_util.h" |
| 24 #include "base/strings/utf_string_conversions.h" | 24 #include "base/strings/utf_string_conversions.h" |
| 25 #include "base/synchronization/lock.h" | 25 #include "base/synchronization/lock.h" |
| 26 #include "content/browser/browser_child_process_host_impl.h" | 26 #include "content/browser/browser_child_process_host_impl.h" |
| 27 #include "content/browser/gpu/gpu_data_manager_impl.h" |
| 27 #include "content/browser/loader/resource_message_filter.h" | 28 #include "content/browser/loader/resource_message_filter.h" |
| 28 #include "content/browser/gpu/gpu_data_manager_impl.h" | |
| 29 #include "content/browser/plugin_service_impl.h" | 29 #include "content/browser/plugin_service_impl.h" |
| 30 #include "content/common/child_process_host_impl.h" | 30 #include "content/common/child_process_host_impl.h" |
| 31 #include "content/common/plugin_process_messages.h" | 31 #include "content/common/plugin_process_messages.h" |
| 32 #include "content/common/resource_messages.h" | 32 #include "content/common/resource_messages.h" |
| 33 #include "content/public/browser/browser_thread.h" | 33 #include "content/public/browser/browser_thread.h" |
| 34 #include "content/public/browser/content_browser_client.h" | 34 #include "content/public/browser/content_browser_client.h" |
| 35 #include "content/public/browser/notification_types.h" | 35 #include "content/public/browser/notification_types.h" |
| 36 #include "content/public/browser/plugin_service.h" | 36 #include "content/public/browser/plugin_service.h" |
| 37 #include "content/public/browser/resource_context.h" | 37 #include "content/public/browser/resource_context.h" |
| 38 #include "content/public/common/content_switches.h" | 38 #include "content/public/common/content_switches.h" |
| 39 #include "content/public/common/process_type.h" | 39 #include "content/public/common/process_type.h" |
| 40 #include "content/public/common/sandboxed_process_launcher_delegate.h" | 40 #include "content/public/common/sandboxed_process_launcher_delegate.h" |
| 41 #include "ipc/ipc_switches.h" | 41 #include "ipc/ipc_switches.h" |
| 42 #include "net/url_request/url_request_context_getter.h" | 42 #include "net/url_request/url_request_context_getter.h" |
| 43 #include "ui/base/ui_base_switches.h" | 43 #include "ui/base/ui_base_switches.h" |
| 44 #include "ui/gfx/native_widget_types.h" | 44 #include "ui/gfx/native_widget_types.h" |
| 45 #include "ui/gfx/switches.h" | 45 #include "ui/gfx/switches.h" |
| 46 #include "ui/gl/gl_switches.h" | 46 #include "ui/gl/gl_switches.h" |
| 47 | 47 |
| 48 #if defined(OS_MACOSX) | 48 #if defined(OS_MACOSX) |
| 49 #include "base/mac/mac_util.h" | 49 #include "base/mac/mac_util.h" |
| 50 #include "ui/gfx/rect.h" | 50 #include "ui/gfx/geometry/rect.h" |
| 51 #endif | 51 #endif |
| 52 | 52 |
| 53 #if defined(OS_WIN) | 53 #if defined(OS_WIN) |
| 54 #include "base/win/windows_version.h" | 54 #include "base/win/windows_version.h" |
| 55 #include "content/common/plugin_constants_win.h" | 55 #include "content/common/plugin_constants_win.h" |
| 56 #endif | 56 #endif |
| 57 | 57 |
| 58 namespace content { | 58 namespace content { |
| 59 | 59 |
| 60 namespace { | 60 namespace { |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 | 427 |
| 428 void PluginProcessHost::GetContexts(const ResourceHostMsg_Request& request, | 428 void PluginProcessHost::GetContexts(const ResourceHostMsg_Request& request, |
| 429 ResourceContext** resource_context, | 429 ResourceContext** resource_context, |
| 430 net::URLRequestContext** request_context) { | 430 net::URLRequestContext** request_context) { |
| 431 *resource_context = | 431 *resource_context = |
| 432 resource_context_map_[request.origin_pid].resource_context; | 432 resource_context_map_[request.origin_pid].resource_context; |
| 433 *request_context = (*resource_context)->GetRequestContext(); | 433 *request_context = (*resource_context)->GetRequestContext(); |
| 434 } | 434 } |
| 435 | 435 |
| 436 } // namespace content | 436 } // namespace content |
| OLD | NEW |