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

Unified Diff: sky/engine/core/frame/LocalDOMWindow.cpp

Issue 963303004: Implement shake-to-reload (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | sky/examples/touch-demo.sky » ('j') | sky/framework/debug/shake-to-reload.sky » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/frame/LocalDOMWindow.cpp
diff --git a/sky/engine/core/frame/LocalDOMWindow.cpp b/sky/engine/core/frame/LocalDOMWindow.cpp
index 8960f7ba1bb724df6523e8d1b3a64a84e843e016..5d267952989b15efc908d6ce2fc76ef537cc2ad6 100644
--- a/sky/engine/core/frame/LocalDOMWindow.cpp
+++ b/sky/engine/core/frame/LocalDOMWindow.cpp
@@ -29,6 +29,7 @@
#include <algorithm>
#include "gen/sky/platform/RuntimeEnabledFeatures.h"
+#include "mojo/services/navigation/public/interfaces/navigation.mojom.h"
#include "sky/engine/bindings/exception_messages.h"
#include "sky/engine/bindings/exception_state.h"
#include "sky/engine/bindings/exception_state_placeholder.h"
@@ -69,6 +70,7 @@
#include "sky/engine/platform/weborigin/KURL.h"
#include "sky/engine/platform/weborigin/SecurityPolicy.h"
#include "sky/engine/public/platform/Platform.h"
+#include "sky/engine/public/platform/ServiceProvider.h"
#include "sky/engine/tonic/dart_gc_visitor.h"
#include "sky/engine/wtf/MainThread.h"
#include "sky/engine/wtf/MathExtras.h"
@@ -687,7 +689,15 @@ void LocalDOMWindow::removeAllEventListeners()
void LocalDOMWindow::setLocation(const String& urlString, SetLocationLocking locking)
{
- // FIXME(sky): remove.
+ if (!m_frame)
+ return;
+ FrameHost* host = m_frame->host();
+ if (!host)
+ return;
+ mojo::URLRequestPtr request = mojo::URLRequest::New();
+ request->url = urlString.toUTF8();
+ host->services()->NavigatorHost()->RequestNavigate(
+ mojo::TARGET_SOURCE_NODE, request.Pass());
}
void LocalDOMWindow::printErrorMessage(const String& message)
« no previous file with comments | « no previous file | sky/examples/touch-demo.sky » ('j') | sky/framework/debug/shake-to-reload.sky » ('J')

Powered by Google App Engine
This is Rietveld 408576698