summaryrefslogtreecommitdiffstats
path: root/extensions/renderer/guest_view
diff options
context:
space:
mode:
authorfsamuel <fsamuel@chromium.org>2015-05-28 10:05:30 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-28 17:06:32 +0000
commit1f16a4aa1140d105430f5052412693360076d0a6 (patch)
treef974caf0d2916e55565351a1ea0009d00534c9cc /extensions/renderer/guest_view
parent9e646abedf24cf3f4659674c2d2b603dfaef42a7 (diff)
downloadchromium_src-1f16a4aa1140d105430f5052412693360076d0a6.zip
chromium_src-1f16a4aa1140d105430f5052412693360076d0a6.tar.gz
chromium_src-1f16a4aa1140d105430f5052412693360076d0a6.tar.bz2
<webview>: Remove Undocumented Resize DOM event
<webview> had an undocumented resize event that we added as an experiment but it seems to be causing more harm than good, so let's just remove it. BUG=492648 TBR=nasko@chromium.org for trivial browser_plugin_delegate.h change. Review URL: https://codereview.chromium.org/1155163009 Cr-Commit-Position: refs/heads/master@{#331803}
Diffstat (limited to 'extensions/renderer/guest_view')
-rw-r--r--extensions/renderer/guest_view/extensions_guest_view_container.cc10
-rw-r--r--extensions/renderer/guest_view/extensions_guest_view_container.h6
-rw-r--r--extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc3
-rw-r--r--extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.h3
4 files changed, 7 insertions, 15 deletions
diff --git a/extensions/renderer/guest_view/extensions_guest_view_container.cc b/extensions/renderer/guest_view/extensions_guest_view_container.cc
index 358f800..1bd8575 100644
--- a/extensions/renderer/guest_view/extensions_guest_view_container.cc
+++ b/extensions/renderer/guest_view/extensions_guest_view_container.cc
@@ -49,8 +49,7 @@ void ExtensionsGuestViewContainer::RegisterElementResizeCallback(
element_resize_isolate_ = isolate;
}
-void ExtensionsGuestViewContainer::DidResizeElement(const gfx::Size& old_size,
- const gfx::Size& new_size) {
+void ExtensionsGuestViewContainer::DidResizeElement(const gfx::Size& new_size) {
// Call the element resize callback, if one is registered.
if (element_resize_callback_.IsEmpty())
return;
@@ -58,11 +57,10 @@ void ExtensionsGuestViewContainer::DidResizeElement(const gfx::Size& old_size,
base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&ExtensionsGuestViewContainer::CallElementResizeCallback,
- weak_ptr_factory_.GetWeakPtr(), old_size, new_size));
+ weak_ptr_factory_.GetWeakPtr(), new_size));
}
void ExtensionsGuestViewContainer::CallElementResizeCallback(
- const gfx::Size& old_size,
const gfx::Size& new_size) {
v8::HandleScope handle_scope(element_resize_isolate_);
v8::Local<v8::Function> callback = v8::Local<v8::Function>::New(
@@ -71,10 +69,8 @@ void ExtensionsGuestViewContainer::CallElementResizeCallback(
if (context.IsEmpty())
return;
- const int argc = 4;
+ const int argc = 2;
v8::Local<v8::Value> argv[argc] = {
- v8::Integer::New(element_resize_isolate_, old_size.width()),
- v8::Integer::New(element_resize_isolate_, old_size.height()),
v8::Integer::New(element_resize_isolate_, new_size.width()),
v8::Integer::New(element_resize_isolate_, new_size.height())};
diff --git a/extensions/renderer/guest_view/extensions_guest_view_container.h b/extensions/renderer/guest_view/extensions_guest_view_container.h
index 0626da0..4e3f3e9 100644
--- a/extensions/renderer/guest_view/extensions_guest_view_container.h
+++ b/extensions/renderer/guest_view/extensions_guest_view_container.h
@@ -27,12 +27,10 @@ class ExtensionsGuestViewContainer : public guest_view::GuestViewContainer {
v8::Isolate* isolate);
// BrowserPluginDelegate implementation.
- void DidResizeElement(const gfx::Size& old_size,
- const gfx::Size& new_size) override;
+ void DidResizeElement(const gfx::Size& new_size) override;
private:
- void CallElementResizeCallback(const gfx::Size& old_size,
- const gfx::Size& new_size);
+ void CallElementResizeCallback(const gfx::Size& new_size);
v8::Global<v8::Function> destruction_callback_;
v8::Isolate* destruction_isolate_;
diff --git a/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc b/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc
index 812f381..fb95d21 100644
--- a/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc
+++ b/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc
@@ -177,8 +177,7 @@ void MimeHandlerViewContainer::DidReceiveData(const char* data,
}
-void MimeHandlerViewContainer::DidResizeElement(const gfx::Size& old_size,
- const gfx::Size& new_size) {
+void MimeHandlerViewContainer::DidResizeElement(const gfx::Size& new_size) {
element_size_ = new_size;
render_frame()->Send(new ExtensionsGuestViewHostMsg_ResizeGuest(
render_frame()->GetRoutingID(), element_instance_id(), new_size));
diff --git a/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.h b/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.h
index 8cc31a1..c39bf93 100644
--- a/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.h
+++ b/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.h
@@ -53,8 +53,7 @@ class MimeHandlerViewContainer : public guest_view::GuestViewContainer,
// BrowserPluginDelegate implementation.
void DidFinishLoading() override;
void DidReceiveData(const char* data, int data_length) override;
- void DidResizeElement(const gfx::Size& old_size,
- const gfx::Size& new_size) override;
+ void DidResizeElement(const gfx::Size& new_size) override;
v8::Local<v8::Object> V8ScriptableObject(v8::Isolate*) override;
// WebURLLoaderClient overrides.