| 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 "base/logging.h" | 5 #include "base/logging.h" |
| 6 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
| 7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "gfx/rect.h" | 9 #include "gfx/rect.h" |
| 10 #include "net/base/escape.h" | 10 #include "net/base/escape.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 } | 102 } |
| 103 | 103 |
| 104 // Receives individual part data from a multipart response. | 104 // Receives individual part data from a multipart response. |
| 105 virtual void didReceiveData( | 105 virtual void didReceiveData( |
| 106 WebURLLoader*, const char* data, int data_size) { | 106 WebURLLoader*, const char* data, int data_size) { |
| 107 // TODO(ananta) | 107 // TODO(ananta) |
| 108 // We should defer further loads on multipart resources on the same lines | 108 // We should defer further loads on multipart resources on the same lines |
| 109 // as regular resources requested by plugins to prevent reentrancy. | 109 // as regular resources requested by plugins to prevent reentrancy. |
| 110 resource_client_->DidReceiveData( | 110 resource_client_->DidReceiveData( |
| 111 data, data_size, byte_range_lower_bound_); | 111 data, data_size, byte_range_lower_bound_); |
| 112 byte_range_lower_bound_ += data_size; |
| 112 } | 113 } |
| 113 | 114 |
| 114 virtual void didFinishLoading(WebURLLoader*) {} | 115 virtual void didFinishLoading(WebURLLoader*) {} |
| 115 virtual void didFail(WebURLLoader*, const WebURLError&) {} | 116 virtual void didFail(WebURLLoader*, const WebURLError&) {} |
| 116 | 117 |
| 117 void Clear() { | 118 void Clear() { |
| 118 resource_response_.reset(); | 119 resource_response_.reset(); |
| 119 byte_range_lower_bound_ = 0; | 120 byte_range_lower_bound_ = 0; |
| 120 byte_range_upper_bound_ = 0; | 121 byte_range_upper_bound_ = 0; |
| 121 } | 122 } |
| (...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1231 WebDevToolsAgent* WebPluginImpl::GetDevToolsAgent() { | 1232 WebDevToolsAgent* WebPluginImpl::GetDevToolsAgent() { |
| 1232 if (!webframe_) | 1233 if (!webframe_) |
| 1233 return NULL; | 1234 return NULL; |
| 1234 WebView* view = webframe_->view(); | 1235 WebView* view = webframe_->view(); |
| 1235 if (!view) | 1236 if (!view) |
| 1236 return NULL; | 1237 return NULL; |
| 1237 return view->devToolsAgent(); | 1238 return view->devToolsAgent(); |
| 1238 } | 1239 } |
| 1239 | 1240 |
| 1240 } // namespace webkit_glue | 1241 } // namespace webkit_glue |
| OLD | NEW |