Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: sky/engine/web/FrameLoaderClientImpl.cpp

Issue 708903002: Initial work on a new <view> element backed by a mojo::View. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sky/engine/web/FrameLoaderClientImpl.cpp
diff --git a/sky/engine/web/FrameLoaderClientImpl.cpp b/sky/engine/web/FrameLoaderClientImpl.cpp
index 06740dcdb2e03078aa9d0ebc500115485d37c425..a8edd08dc811bf34bfd8c1b58cb7dd373e4748fd 100644
--- a/sky/engine/web/FrameLoaderClientImpl.cpp
+++ b/sky/engine/web/FrameLoaderClientImpl.cpp
@@ -37,6 +37,7 @@
#include "core/events/MouseEvent.h"
#include "core/frame/FrameView.h"
#include "core/frame/Settings.h"
+#include "core/html/HTMLViewElement.h"
#include "core/page/Chrome.h"
#include "core/page/EventHandler.h"
#include "core/page/Page.h"
@@ -250,6 +251,17 @@ void FrameLoaderClientImpl::loadURLExternally(const ResourceRequest& request, Na
}
}
+void FrameLoaderClientImpl::createView(const KURL& url, HTMLViewElement* ownerElement)
+{
+ if (m_webFrame->client()) {
+ WebRect bounds(ownerElement->offsetLeft(),
+ ownerElement->offsetTop(),
+ ownerElement->offsetWidth(),
+ ownerElement->offsetHeight());
esprehn 2014/11/06 22:40:28 You want clientLeft etc. not offset, your size doe
abarth-chromium 2014/11/06 22:55:07 Don't we need to wait until layout happens before
Matt Perry 2014/11/06 23:38:50 Done.
+ m_webFrame->client()->createChildView(url, bounds);
+ }
+}
+
void FrameLoaderClientImpl::selectorMatchChanged(const Vector<String>& addedSelectors, const Vector<String>& removedSelectors)
{
if (WebFrameClient* client = m_webFrame->client())

Powered by Google App Engine
This is Rietveld 408576698