| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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/gfx/rect.h" | 5 #include "base/gfx/rect.h" |
| 6 #include "base/logging.h" | 6 #include "base/logging.h" |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "net/base/escape.h" | 10 #include "net/base/escape.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 67 |
| 68 namespace webkit_glue { | 68 namespace webkit_glue { |
| 69 namespace { | 69 namespace { |
| 70 | 70 |
| 71 // This class handles individual multipart responses. It is instantiated when | 71 // This class handles individual multipart responses. It is instantiated when |
| 72 // we receive HTTP status code 206 in the HTTP response. This indicates | 72 // we receive HTTP status code 206 in the HTTP response. This indicates |
| 73 // that the response could have multiple parts each separated by a boundary | 73 // that the response could have multiple parts each separated by a boundary |
| 74 // specified in the response header. | 74 // specified in the response header. |
| 75 class MultiPartResponseClient : public WebURLLoaderClient { | 75 class MultiPartResponseClient : public WebURLLoaderClient { |
| 76 public: | 76 public: |
| 77 MultiPartResponseClient(WebPluginResourceClient* resource_client) | 77 explicit MultiPartResponseClient(WebPluginResourceClient* resource_client) |
| 78 : resource_client_(resource_client) { | 78 : resource_client_(resource_client) { |
| 79 Clear(); | 79 Clear(); |
| 80 } | 80 } |
| 81 | 81 |
| 82 virtual void willSendRequest( | 82 virtual void willSendRequest( |
| 83 WebURLLoader*, WebURLRequest&, const WebURLResponse&) {} | 83 WebURLLoader*, WebURLRequest&, const WebURLResponse&) {} |
| 84 virtual void didSendData( | 84 virtual void didSendData( |
| 85 WebURLLoader*, unsigned long long, unsigned long long) {} | 85 WebURLLoader*, unsigned long long, unsigned long long) {} |
| 86 | 86 |
| 87 // Called when the multipart parser encounters an embedded multipart | 87 // Called when the multipart parser encounters an embedded multipart |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 arg_names_.push_back(params.attributeNames[i].utf8()); | 391 arg_names_.push_back(params.attributeNames[i].utf8()); |
| 392 arg_values_.push_back(params.attributeValues[i].utf8()); | 392 arg_values_.push_back(params.attributeValues[i].utf8()); |
| 393 } | 393 } |
| 394 } | 394 } |
| 395 | 395 |
| 396 WebPluginImpl::~WebPluginImpl() { | 396 WebPluginImpl::~WebPluginImpl() { |
| 397 } | 397 } |
| 398 | 398 |
| 399 void WebPluginImpl::SetWindow(gfx::PluginWindowHandle window) { | 399 void WebPluginImpl::SetWindow(gfx::PluginWindowHandle window) { |
| 400 if (window) { | 400 if (window) { |
| 401 DCHECK(!windowless_); // Make sure not called twice. | 401 DCHECK(!windowless_); |
| 402 window_ = window; | 402 window_ = window; |
| 403 if (page_delegate_) { | 403 if (page_delegate_) { |
| 404 // Tell the view delegate that the plugin window was created, so that it | 404 // Tell the view delegate that the plugin window was created, so that it |
| 405 // can create necessary container widgets. | 405 // can create necessary container widgets. |
| 406 page_delegate_->CreatedPluginWindow(window); | 406 page_delegate_->CreatedPluginWindow(window); |
| 407 } | 407 } |
| 408 } else { | 408 } else { |
| 409 DCHECK(!window_); // Make sure not called twice. | 409 DCHECK(!window_); // Make sure not called twice. |
| 410 windowless_ = true; | 410 windowless_ = true; |
| 411 } | 411 } |
| (...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1125 WebDevToolsAgent* WebPluginImpl::GetDevToolsAgent() { | 1125 WebDevToolsAgent* WebPluginImpl::GetDevToolsAgent() { |
| 1126 if (!webframe_) | 1126 if (!webframe_) |
| 1127 return NULL; | 1127 return NULL; |
| 1128 WebView* view = webframe_->view(); | 1128 WebView* view = webframe_->view(); |
| 1129 if (!view) | 1129 if (!view) |
| 1130 return NULL; | 1130 return NULL; |
| 1131 return view->devToolsAgent(); | 1131 return view->devToolsAgent(); |
| 1132 } | 1132 } |
| 1133 | 1133 |
| 1134 } // namespace webkit_glue | 1134 } // namespace webkit_glue |
| OLD | NEW |