OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 24 matching lines...) Expand all Loading... |
35 #include "chrome/common/gears_api.h" | 35 #include "chrome/common/gears_api.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/net/url_request_intercept_job.h" | 37 #include "chrome/common/net/url_request_intercept_job.h" |
38 #include "chrome/common/notification_service.h" | 38 #include "chrome/common/notification_service.h" |
39 #include "chrome/common/plugin_messages.h" | 39 #include "chrome/common/plugin_messages.h" |
40 #include "chrome/common/render_messages.h" | 40 #include "chrome/common/render_messages.h" |
41 #include "net/base/cookie_monster.h" | 41 #include "net/base/cookie_monster.h" |
42 #include "net/base/io_buffer.h" | 42 #include "net/base/io_buffer.h" |
43 #include "net/base/net_errors.h" | 43 #include "net/base/net_errors.h" |
44 #include "net/http/http_request_headers.h" | 44 #include "net/http/http_request_headers.h" |
| 45 #include "net/url_request/url_request.h" |
45 #include "net/url_request/url_request_context.h" | 46 #include "net/url_request/url_request_context.h" |
46 #include "net/url_request/url_request_error_job.h" | 47 #include "net/url_request/url_request_error_job.h" |
47 #include "third_party/skia/include/core/SkBitmap.h" | 48 #include "third_party/skia/include/core/SkBitmap.h" |
48 | 49 |
49 | 50 |
50 using base::TimeDelta; | 51 using base::TimeDelta; |
51 | 52 |
52 // This class manages the interception of network requests. It queries the | 53 // This class manages the interception of network requests. It queries the |
53 // plugin on every request, and creates an intercept job if the plugin can | 54 // plugin on every request, and creates an intercept job if the plugin can |
54 // intercept the request. | 55 // intercept the request. |
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
825 CPBrowsingContext context) { | 826 CPBrowsingContext context) { |
826 // Sadly if we try and pass context through, we seem to break cl's little | 827 // Sadly if we try and pass context through, we seem to break cl's little |
827 // brain trying to compile the Tuple3 ctor. This cast works. | 828 // brain trying to compile the Tuple3 ctor. This cast works. |
828 int32 context_as_int32 = static_cast<int32>(context); | 829 int32 context_as_int32 = static_cast<int32>(context); |
829 // Plugins can only be accessed on the IO thread. | 830 // Plugins can only be accessed on the IO thread. |
830 BrowserThread::PostTask( | 831 BrowserThread::PostTask( |
831 BrowserThread::IO, FROM_HERE, | 832 BrowserThread::IO, FROM_HERE, |
832 NewRunnableFunction(PluginCommandHandler::HandleCommand, | 833 NewRunnableFunction(PluginCommandHandler::HandleCommand, |
833 command, data, context_as_int32)); | 834 command, data, context_as_int32)); |
834 } | 835 } |
OLD | NEW |