| 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/webview_plugin.h" | 5 #include "webkit/plugins/npapi/webview_plugin.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h" | 9 #include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h" |
| 10 #include "third_party/WebKit/WebKit/chromium/public/WebElement.h" | 10 #include "third_party/WebKit/WebKit/chromium/public/WebElement.h" |
| 11 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" | 11 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" |
| 12 #include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h" | 12 #include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h" |
| 13 #include "third_party/WebKit/WebKit/chromium/public/WebPluginContainer.h" | 13 #include "third_party/WebKit/WebKit/chromium/public/WebPluginContainer.h" |
| 14 #include "third_party/WebKit/WebKit/chromium/public/WebSize.h" | 14 #include "third_party/WebKit/WebKit/chromium/public/WebSize.h" |
| 15 #include "third_party/WebKit/WebKit/chromium/public/WebURL.h" | 15 #include "third_party/WebKit/WebKit/chromium/public/WebURL.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 36 using WebKit::WebPluginContainer; | 36 using WebKit::WebPluginContainer; |
| 37 using WebKit::WebPoint; | 37 using WebKit::WebPoint; |
| 38 using WebKit::WebRect; | 38 using WebKit::WebRect; |
| 39 using WebKit::WebSize; | 39 using WebKit::WebSize; |
| 40 using WebKit::WebURLError; | 40 using WebKit::WebURLError; |
| 41 using WebKit::WebURLRequest; | 41 using WebKit::WebURLRequest; |
| 42 using WebKit::WebURLResponse; | 42 using WebKit::WebURLResponse; |
| 43 using WebKit::WebVector; | 43 using WebKit::WebVector; |
| 44 using WebKit::WebView; | 44 using WebKit::WebView; |
| 45 | 45 |
| 46 namespace webkit { |
| 47 namespace npapi { |
| 48 |
| 46 WebViewPlugin::WebViewPlugin(WebViewPlugin::Delegate* delegate) | 49 WebViewPlugin::WebViewPlugin(WebViewPlugin::Delegate* delegate) |
| 47 : delegate_(delegate), | 50 : delegate_(delegate), |
| 48 container_(NULL), | 51 container_(NULL), |
| 49 finished_loading_(false) { | 52 finished_loading_(false) { |
| 50 web_view_ = WebView::create(this, NULL); | 53 web_view_ = WebView::create(this, NULL); |
| 51 web_view_->initializeMainFrame(this); | 54 web_view_->initializeMainFrame(this); |
| 52 } | 55 } |
| 53 | 56 |
| 54 // static | 57 // static |
| 55 WebViewPlugin* WebViewPlugin::Create(WebViewPlugin::Delegate* delegate, | 58 WebViewPlugin* WebViewPlugin::Create(WebViewPlugin::Delegate* delegate, |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 WebURLError WebViewPlugin::cancelledError(WebFrame* frame, | 217 WebURLError WebViewPlugin::cancelledError(WebFrame* frame, |
| 215 const WebURLRequest& request) { | 218 const WebURLRequest& request) { |
| 216 // Return an error with a non-zero reason so isNull() on the corresponding | 219 // Return an error with a non-zero reason so isNull() on the corresponding |
| 217 // ResourceError is false. | 220 // ResourceError is false. |
| 218 WebURLError error; | 221 WebURLError error; |
| 219 error.domain = "WebViewPlugin"; | 222 error.domain = "WebViewPlugin"; |
| 220 error.reason = -1; | 223 error.reason = -1; |
| 221 error.unreachableURL = request.url(); | 224 error.unreachableURL = request.url(); |
| 222 return error; | 225 return error; |
| 223 } | 226 } |
| 227 |
| 228 } // namespace npapi |
| 229 } // namespace webkit |
| OLD | NEW |