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

Side by Side Diff: sky/viewer/document_view.cc

Issue 854603004: Sky events should be in dips rather than ddpxs (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « sky/viewer/converters/input_event_types.cc ('k') | 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/viewer/document_view.h" 5 #include "sky/viewer/document_view.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 266
267 void DocumentView::OnViewDestroyed(mojo::View* view) { 267 void DocumentView::OnViewDestroyed(mojo::View* view) {
268 DCHECK_EQ(view, root_); 268 DCHECK_EQ(view, root_);
269 269
270 root_ = nullptr; 270 root_ = nullptr;
271 } 271 }
272 272
273 void DocumentView::OnViewInputEvent( 273 void DocumentView::OnViewInputEvent(
274 mojo::View* view, const mojo::EventPtr& event) { 274 mojo::View* view, const mojo::EventPtr& event) {
275 scoped_ptr<blink::WebInputEvent> web_event = 275 scoped_ptr<blink::WebInputEvent> web_event =
276 event.To<scoped_ptr<blink::WebInputEvent> >(); 276 ConvertEvent(event, GetDevicePixelRatio());
277 if (web_event) 277 if (web_event)
278 web_view_->handleInputEvent(*web_event); 278 web_view_->handleInputEvent(*web_event);
279 } 279 }
280 280
281 class InspectorHostImpl : public inspector::InspectorHost { 281 class InspectorHostImpl : public inspector::InspectorHost {
282 public: 282 public:
283 InspectorHostImpl(blink::WebView* web_view, mojo::Shell* shell) 283 InspectorHostImpl(blink::WebView* web_view, mojo::Shell* shell)
284 : web_view_(web_view), shell_(shell) {} 284 : web_view_(web_view), shell_(shell) {}
285 285
286 virtual ~InspectorHostImpl() {} 286 virtual ~InspectorHostImpl() {}
(...skipping 12 matching lines...) Expand all
299 void DocumentView::StartDebuggerInspectorBackend() { 299 void DocumentView::StartDebuggerInspectorBackend() {
300 if (!inspector_backend_) { 300 if (!inspector_backend_) {
301 inspector_host_.reset(new InspectorHostImpl(web_view_, shell_)); 301 inspector_host_.reset(new InspectorHostImpl(web_view_, shell_));
302 inspector_backend_.reset( 302 inspector_backend_.reset(
303 new inspector::InspectorBackendMojo(inspector_host_.get())); 303 new inspector::InspectorBackendMojo(inspector_host_.get()));
304 } 304 }
305 inspector_backend_->Connect(); 305 inspector_backend_->Connect();
306 } 306 }
307 307
308 } // namespace sky 308 } // namespace sky
OLDNEW
« no previous file with comments | « sky/viewer/converters/input_event_types.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698