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

Side by Side Diff: sky/shell/ui/engine.cc

Issue 1147153005: Fix android build (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sky/shell/ui/engine.h" 5 #include "sky/shell/ui/engine.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "mojo/public/cpp/application/connect.h" 9 #include "mojo/public/cpp/application/connect.h"
10 #include "sky/engine/public/platform/WebInputEvent.h" 10 #include "sky/engine/public/platform/WebInputEvent.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 scoped_ptr<blink::WebInputEvent> web_event = 163 scoped_ptr<blink::WebInputEvent> web_event =
164 ConvertEvent(event, device_pixel_ratio_); 164 ConvertEvent(event, device_pixel_ratio_);
165 if (!web_event) 165 if (!web_event)
166 return; 166 return;
167 if (sky_view_) 167 if (sky_view_)
168 sky_view_->HandleInputEvent(*web_event); 168 sky_view_->HandleInputEvent(*web_event);
169 if (web_view_) 169 if (web_view_)
170 web_view_->handleInputEvent(*web_event); 170 web_view_->handleInputEvent(*web_event);
171 } 171 }
172 172
173 void Engine::LoadURL(const mojo::String& url) { 173 void Engine::LoadURL(const mojo::String& mojo_url) {
174 if (!WebView::shouldUseWebView(responseURL)) { 174 GURL url(mojo_url);
175 if (!blink::WebView::shouldUseWebView(url)) {
175 sky_view_ = blink::SkyView::Create(this); 176 sky_view_ = blink::SkyView::Create(this);
176 sky_view_->Load(GURL(url)); 177 sky_view_->Load(url);
177 return; 178 return;
178 } 179 }
179 180
180 LOG(WARNING) << ".sky support is deprecated, please use .dart for main()"; 181 LOG(WARNING) << ".sky support is deprecated, please use .dart for main()";
181 182
182 // Something bad happens if you try to call WebView::close and replace 183 // Something bad happens if you try to call WebView::close and replace
183 // the webview. So for now we just load into the existing one. :/ 184 // the webview. So for now we just load into the existing one. :/
184 if (!web_view_) 185 if (!web_view_)
185 web_view_ = blink::WebView::create(this); 186 web_view_ = blink::WebView::create(this);
186 ConfigureSettings(web_view_->settings()); 187 ConfigureSettings(web_view_->settings());
187 web_view_->setMainFrame(blink::WebLocalFrame::create(this)); 188 web_view_->setMainFrame(blink::WebLocalFrame::create(this));
188 UpdateWebViewSize(); 189 UpdateWebViewSize();
189 web_view_->mainFrame()->load(GURL(url)); 190 web_view_->mainFrame()->load(url);
190 } 191 }
191 192
192 void Engine::frameDetached(blink::WebFrame* frame) { 193 void Engine::frameDetached(blink::WebFrame* frame) {
193 // |frame| is invalid after here. 194 // |frame| is invalid after here.
194 frame->close(); 195 frame->close();
195 } 196 }
196 197
197 void Engine::initializeLayerTreeView() { 198 void Engine::initializeLayerTreeView() {
198 } 199 }
199 200
(...skipping 28 matching lines...) Expand all
228 229
229 void Engine::DidNavigateLocally(const mojo::String& url) { 230 void Engine::DidNavigateLocally(const mojo::String& url) {
230 } 231 }
231 232
232 void Engine::RequestNavigateHistory(int32_t delta) { 233 void Engine::RequestNavigateHistory(int32_t delta) {
233 NOTIMPLEMENTED(); 234 NOTIMPLEMENTED();
234 } 235 }
235 236
236 } // namespace shell 237 } // namespace shell
237 } // namespace sky 238 } // namespace sky
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698