Index: components/plugins/renderer/webview_plugin.cc |
diff --git a/chrome/renderer/plugins/webview_plugin.cc b/components/plugins/renderer/webview_plugin.cc |
similarity index 87% |
rename from chrome/renderer/plugins/webview_plugin.cc |
rename to components/plugins/renderer/webview_plugin.cc |
index 2853a3133eca5d6fe3f91798240c68a8a5e32cd2..fc334488a69b7aebb64386adb44a158610870d9e 100644 |
--- a/chrome/renderer/plugins/webview_plugin.cc |
+++ b/components/plugins/renderer/webview_plugin.cc |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "chrome/renderer/plugins/webview_plugin.h" |
+#include "components/plugins/renderer/webview_plugin.h" |
#include "base/message_loop/message_loop.h" |
#include "base/metrics/histogram.h" |
@@ -42,9 +42,7 @@ using WebKit::WebVector; |
using WebKit::WebView; |
WebViewPlugin::WebViewPlugin(WebViewPlugin::Delegate* delegate) |
- : delegate_(delegate), |
- container_(NULL), |
- finished_loading_(false) { |
+ : delegate_(delegate), container_(NULL), finished_loading_(false) { |
web_view_ = WebView::create(this); |
web_view_->initializeMainFrame(this); |
} |
@@ -61,16 +59,14 @@ WebViewPlugin* WebViewPlugin::Create(WebViewPlugin::Delegate* delegate, |
return plugin; |
} |
-WebViewPlugin::~WebViewPlugin() { |
- web_view_->close(); |
-} |
+WebViewPlugin::~WebViewPlugin() { web_view_->close(); } |
void WebViewPlugin::ReplayReceivedData(WebPlugin* plugin) { |
if (!response_.isNull()) { |
plugin->didReceiveResponse(response_); |
size_t total_bytes = 0; |
- for (std::list<std::string>::iterator it = data_.begin(); |
- it != data_.end(); ++it) { |
+ for (std::list<std::string>::iterator it = data_.begin(); it != data_.end(); |
+ ++it) { |
plugin->didReceiveData(it->c_str(), it->length()); |
total_bytes += it->length(); |
} |
@@ -90,9 +86,7 @@ void WebViewPlugin::RestoreTitleText() { |
container_->element().setAttribute("title", old_title_); |
} |
-WebPluginContainer* WebViewPlugin::container() const { |
- return container_; |
-} |
+WebPluginContainer* WebViewPlugin::container() const { return container_; } |
bool WebViewPlugin::initialize(WebPluginContainer* container) { |
container_ = container; |
@@ -110,17 +104,11 @@ void WebViewPlugin::destroy() { |
base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); |
} |
-NPObject* WebViewPlugin::scriptableObject() { |
- return NULL; |
-} |
+NPObject* WebViewPlugin::scriptableObject() { return NULL; } |
-struct _NPP* WebViewPlugin::pluginNPP() { |
- return NULL; |
-} |
+struct _NPP* WebViewPlugin::pluginNPP() { return NULL; } |
-bool WebViewPlugin::getFormValue(WebString& value) { |
- return false; |
-} |
+bool WebViewPlugin::getFormValue(WebString& value) { return false; } |
void WebViewPlugin::paint(WebCanvas* canvas, const WebRect& rect) { |
gfx::Rect paint_rect = gfx::IntersectRects(rect_, rect); |
@@ -139,18 +127,17 @@ void WebViewPlugin::paint(WebCanvas* canvas, const WebRect& rect) { |
} |
// Coordinates are relative to the containing window. |
-void WebViewPlugin::updateGeometry( |
- const WebRect& frame_rect, const WebRect& clip_rect, |
- const WebVector<WebRect>& cut_out_rects, bool is_visible) { |
+void WebViewPlugin::updateGeometry(const WebRect& frame_rect, |
+ const WebRect& clip_rect, |
+ const WebVector<WebRect>& cut_out_rects, |
+ bool is_visible) { |
if (static_cast<gfx::Rect>(frame_rect) != rect_) { |
rect_ = frame_rect; |
web_view_->resize(WebSize(frame_rect.width, frame_rect.height)); |
} |
} |
-bool WebViewPlugin::acceptsInputEvents() { |
- return true; |
-} |
+bool WebViewPlugin::acceptsInputEvents() { return true; } |
bool WebViewPlugin::handleInputEvent(const WebInputEvent& event, |
WebCursorInfo& cursor) { |
@@ -193,9 +180,7 @@ void WebViewPlugin::didFailLoading(const WebURLError& error) { |
error_.reset(new WebURLError(error)); |
} |
-bool WebViewPlugin::acceptsLoadDrops() { |
- return false; |
-} |
+bool WebViewPlugin::acceptsLoadDrops() { return false; } |
void WebViewPlugin::setToolTipText(const WebString& text, |
WebKit::WebTextDirection hint) { |