| 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/plugin/chrome_plugin_host.h" | 5 #include "chrome/plugin/chrome_plugin_host.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "chrome/common/child_process.h" | 10 #include "chrome/common/child_process.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 CPError Start() { | 140 CPError Start() { |
| 141 bridge_.reset( | 141 bridge_.reset( |
| 142 PluginThread::current()->resource_dispatcher()->CreateBridge( | 142 PluginThread::current()->resource_dispatcher()->CreateBridge( |
| 143 cprequest_->method, | 143 cprequest_->method, |
| 144 GURL(cprequest_->url), | 144 GURL(cprequest_->url), |
| 145 GURL(cprequest_->url), // TODO(jackson): policy url? | 145 GURL(cprequest_->url), // TODO(jackson): policy url? |
| 146 GURL(), // TODO(mpcomplete): referrer? | 146 GURL(), // TODO(mpcomplete): referrer? |
| 147 "null", // frame_origin | 147 "null", // frame_origin |
| 148 "null", // main_frame_origin | 148 "null", // main_frame_origin |
| 149 extra_headers_, | 149 extra_headers_, |
| 150 "", // default_mime_type |
| 150 load_flags_, | 151 load_flags_, |
| 151 GetCurrentProcessId(), | 152 GetCurrentProcessId(), |
| 152 ResourceType::OBJECT, | 153 ResourceType::OBJECT, |
| 153 cprequest_->context, | 154 cprequest_->context, |
| 154 MSG_ROUTING_CONTROL)); | 155 MSG_ROUTING_CONTROL)); |
| 155 if (!bridge_.get()) | 156 if (!bridge_.get()) |
| 156 return CPERR_FAILURE; | 157 return CPERR_FAILURE; |
| 157 | 158 |
| 158 for (size_t i = 0; i < upload_content_.size(); ++i) { | 159 for (size_t i = 0; i < upload_content_.size(); ++i) { |
| 159 switch (upload_content_[i].type()) { | 160 switch (upload_content_[i].type()) { |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 | 611 |
| 611 response_funcs.size = sizeof(response_funcs); | 612 response_funcs.size = sizeof(response_funcs); |
| 612 response_funcs.received_redirect = CPRR_ReceivedRedirect; | 613 response_funcs.received_redirect = CPRR_ReceivedRedirect; |
| 613 response_funcs.start_completed = CPRR_StartCompleted; | 614 response_funcs.start_completed = CPRR_StartCompleted; |
| 614 response_funcs.read_completed = CPRR_ReadCompleted; | 615 response_funcs.read_completed = CPRR_ReadCompleted; |
| 615 response_funcs.upload_progress = CPRR_UploadProgress; | 616 response_funcs.upload_progress = CPRR_UploadProgress; |
| 616 } | 617 } |
| 617 | 618 |
| 618 return &browser_funcs; | 619 return &browser_funcs; |
| 619 } | 620 } |
| OLD | NEW |