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

Unified Diff: mojo/services/html_viewer/html_document_view.cc

Issue 469803005: Mojo: simple iframe support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: darin Created 6 years, 4 months 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
« no previous file with comments | « mojo/services/html_viewer/html_document_view.h ('k') | mojo/services/html_viewer/html_viewer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/html_viewer/html_document_view.cc
diff --git a/mojo/services/html_viewer/html_document_view.cc b/mojo/services/html_viewer/html_document_view.cc
index 7751aa4e07dc74502b2cf07b10d5b40ee3ae7734..f7a08cb957799285f06d90b253102fc78b5bf8d0 100644
--- a/mojo/services/html_viewer/html_document_view.cc
+++ b/mojo/services/html_viewer/html_document_view.cc
@@ -81,10 +81,10 @@ bool CanNavigateLocally(blink::WebFrame* frame,
HTMLDocumentView::HTMLDocumentView(ServiceProvider* service_provider,
ViewManager* view_manager)
: view_manager_(view_manager),
+ navigator_host_(service_provider),
web_view_(NULL),
root_(NULL),
repaint_pending_(false),
- navigator_host_(service_provider),
weak_factory_(this) {
}
@@ -145,6 +145,22 @@ bool HTMLDocumentView::allowsBrokenNullLayerTreeView() const {
return true;
}
+blink::WebFrame* HTMLDocumentView::createChildFrame(
+ blink::WebLocalFrame* parent,
+ const blink::WebString& frameName) {
+ blink::WebLocalFrame* web_frame = blink::WebLocalFrame::create(this);
+ parent->appendChild(web_frame);
+ return web_frame;
+}
+
+void HTMLDocumentView::frameDetached(blink::WebFrame* frame) {
+ if (frame->parent())
+ frame->parent()->removeChild(frame);
+
+ // |frame| is invalid after here.
+ frame->close();
+}
+
blink::WebCookieJar* HTMLDocumentView::cookieJar(blink::WebLocalFrame* frame) {
// TODO(darin): Blink does not fallback to the Platform provided WebCookieJar.
// Either it should, as it once did, or we should find another solution here.
« no previous file with comments | « mojo/services/html_viewer/html_document_view.h ('k') | mojo/services/html_viewer/html_viewer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698