OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/chrome_plugin_host.h" | 5 #include "chrome/browser/chrome_plugin_host.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "chrome/common/chrome_switches.h" | 34 #include "chrome/common/chrome_switches.h" |
35 #include "chrome/common/gears_api.h" | 35 #include "chrome/common/gears_api.h" |
36 #include "chrome/common/notification_service.h" | 36 #include "chrome/common/notification_service.h" |
37 #include "chrome/common/net/url_request_intercept_job.h" | 37 #include "chrome/common/net/url_request_intercept_job.h" |
38 #include "chrome/common/plugin_messages.h" | 38 #include "chrome/common/plugin_messages.h" |
39 #include "chrome/common/render_messages.h" | 39 #include "chrome/common/render_messages.h" |
40 #include "net/base/base64.h" | 40 #include "net/base/base64.h" |
41 #include "net/base/cookie_monster.h" | 41 #include "net/base/cookie_monster.h" |
42 #include "net/url_request/url_request_context.h" | 42 #include "net/url_request/url_request_context.h" |
43 #include "net/url_request/url_request_error_job.h" | 43 #include "net/url_request/url_request_error_job.h" |
44 #include "skia/include/SkBitmap.h" | 44 #include "third_party/skia/include/core/SkBitmap.h" |
45 | 45 |
46 | 46 |
47 using base::TimeDelta; | 47 using base::TimeDelta; |
48 | 48 |
49 // This class manages the interception of network requests. It queries the | 49 // This class manages the interception of network requests. It queries the |
50 // plugin on every request, and creates an intercept job if the plugin can | 50 // plugin on every request, and creates an intercept job if the plugin can |
51 // intercept the request. | 51 // intercept the request. |
52 // NOTE: All methods must be called on the IO thread. | 52 // NOTE: All methods must be called on the IO thread. |
53 class PluginRequestInterceptor | 53 class PluginRequestInterceptor |
54 : public PluginHelper, public URLRequest::Interceptor { | 54 : public PluginHelper, public URLRequest::Interceptor { |
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
792 void CPHandleCommand(int command, CPCommandInterface* data, | 792 void CPHandleCommand(int command, CPCommandInterface* data, |
793 CPBrowsingContext context) { | 793 CPBrowsingContext context) { |
794 // Sadly if we try and pass context through, we seem to break cl's little | 794 // Sadly if we try and pass context through, we seem to break cl's little |
795 // brain trying to compile the Tuple3 ctor. This cast works. | 795 // brain trying to compile the Tuple3 ctor. This cast works. |
796 int32 context_as_int32 = static_cast<int32>(context); | 796 int32 context_as_int32 = static_cast<int32>(context); |
797 // Plugins can only be accessed on the IO thread. | 797 // Plugins can only be accessed on the IO thread. |
798 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, | 798 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, |
799 NewRunnableFunction(PluginCommandHandler::HandleCommand, | 799 NewRunnableFunction(PluginCommandHandler::HandleCommand, |
800 command, data, context_as_int32)); | 800 command, data, context_as_int32)); |
801 } | 801 } |
OLD | NEW |