| 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 "webkit/glue/plugins/webplugin_impl.h" | 5 #include "webkit/glue/plugins/webplugin_impl.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/stringprintf.h" |
| 10 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
| 11 #include "gfx/rect.h" | 12 #include "gfx/rect.h" |
| 12 #include "googleurl/src/gurl.h" | 13 #include "googleurl/src/gurl.h" |
| 13 #include "net/base/escape.h" | 14 #include "net/base/escape.h" |
| 14 #include "net/base/net_errors.h" | 15 #include "net/base/net_errors.h" |
| 15 #include "skia/ext/platform_canvas.h" | 16 #include "skia/ext/platform_canvas.h" |
| 16 #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h" | 17 #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h" |
| 17 #include "third_party/WebKit/WebKit/chromium/public/WebCookieJar.h" | 18 #include "third_party/WebKit/WebKit/chromium/public/WebCookieJar.h" |
| 18 #include "third_party/WebKit/WebKit/chromium/public/WebCString.h" | 19 #include "third_party/WebKit/WebKit/chromium/public/WebCString.h" |
| 19 #include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h" | 20 #include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 | 154 |
| 154 std::string GetAllHeaders(const WebURLResponse& response) { | 155 std::string GetAllHeaders(const WebURLResponse& response) { |
| 155 // TODO(darin): It is possible for httpStatusText to be empty and still have | 156 // TODO(darin): It is possible for httpStatusText to be empty and still have |
| 156 // an interesting response, so this check seems wrong. | 157 // an interesting response, so this check seems wrong. |
| 157 std::string result; | 158 std::string result; |
| 158 const WebString& status = response.httpStatusText(); | 159 const WebString& status = response.httpStatusText(); |
| 159 if (status.isEmpty()) | 160 if (status.isEmpty()) |
| 160 return result; | 161 return result; |
| 161 | 162 |
| 162 // TODO(darin): Shouldn't we also report HTTP version numbers? | 163 // TODO(darin): Shouldn't we also report HTTP version numbers? |
| 163 result = StringPrintf("HTTP %d ", response.httpStatusCode()); | 164 result = base::StringPrintf("HTTP %d ", response.httpStatusCode()); |
| 164 result.append(status.utf8()); | 165 result.append(status.utf8()); |
| 165 result.append("\n"); | 166 result.append("\n"); |
| 166 | 167 |
| 167 HeaderFlattener flattener(&result); | 168 HeaderFlattener flattener(&result); |
| 168 response.visitHTTPHeaderFields(&flattener); | 169 response.visitHTTPHeaderFields(&flattener); |
| 169 | 170 |
| 170 return result; | 171 return result; |
| 171 } | 172 } |
| 172 | 173 |
| 173 struct ResponseInfo { | 174 struct ResponseInfo { |
| (...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1300 WebDevToolsAgent* WebPluginImpl::GetDevToolsAgent() { | 1301 WebDevToolsAgent* WebPluginImpl::GetDevToolsAgent() { |
| 1301 if (!webframe_) | 1302 if (!webframe_) |
| 1302 return NULL; | 1303 return NULL; |
| 1303 WebView* view = webframe_->view(); | 1304 WebView* view = webframe_->view(); |
| 1304 if (!view) | 1305 if (!view) |
| 1305 return NULL; | 1306 return NULL; |
| 1306 return view->devToolsAgent(); | 1307 return view->devToolsAgent(); |
| 1307 } | 1308 } |
| 1308 | 1309 |
| 1309 } // namespace webkit_glue | 1310 } // namespace webkit_glue |
| OLD | NEW |