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

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

Issue 880713003: Rename scheduleAnimation() to scheduleVisualUpdate(). (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebase. 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/document_view.h ('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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 void DocumentView::OnSurfaceIdAvailable(mojo::SurfaceIdPtr surface_id) { 184 void DocumentView::OnSurfaceIdAvailable(mojo::SurfaceIdPtr surface_id) {
185 if (root_) 185 if (root_)
186 root_->SetSurfaceId(surface_id.Pass()); 186 root_->SetSurfaceId(surface_id.Pass());
187 } 187 }
188 188
189 void DocumentView::PaintContents(SkCanvas* canvas, const gfx::Rect& clip) { 189 void DocumentView::PaintContents(SkCanvas* canvas, const gfx::Rect& clip) {
190 blink::WebRect rect(clip.x(), clip.y(), clip.width(), clip.height()); 190 blink::WebRect rect(clip.x(), clip.y(), clip.width(), clip.height());
191 web_view_->paint(canvas, rect); 191 web_view_->paint(canvas, rect);
192 } 192 }
193 193
194 void DocumentView::scheduleAnimation() { 194 void DocumentView::scheduleVisualUpdate() {
195 DCHECK(web_view_); 195 DCHECK(web_view_);
196 layer_host_->SetNeedsAnimate(); 196 layer_host_->SetNeedsAnimate();
197 } 197 }
198 198
199 blink::WebScreenInfo DocumentView::screenInfo() { 199 blink::WebScreenInfo DocumentView::screenInfo() {
200 DCHECK(root_); 200 DCHECK(root_);
201 auto& metrics = root_->viewport_metrics(); 201 auto& metrics = root_->viewport_metrics();
202 blink::WebScreenInfo screen; 202 blink::WebScreenInfo screen;
203 screen.rect = blink::WebRect(0, 0, metrics.size->width, metrics.size->height); 203 screen.rect = blink::WebRect(0, 0, metrics.size->width, metrics.size->height);
204 screen.availableRect = screen.rect; 204 screen.availableRect = screen.rect;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 void DocumentView::StartDebuggerInspectorBackend() { 319 void DocumentView::StartDebuggerInspectorBackend() {
320 if (!inspector_backend_) { 320 if (!inspector_backend_) {
321 inspector_host_.reset(new InspectorHostImpl(web_view_, shell_)); 321 inspector_host_.reset(new InspectorHostImpl(web_view_, shell_));
322 inspector_backend_.reset( 322 inspector_backend_.reset(
323 new inspector::InspectorBackendMojo(inspector_host_.get())); 323 new inspector::InspectorBackendMojo(inspector_host_.get()));
324 } 324 }
325 inspector_backend_->Connect(); 325 inspector_backend_->Connect();
326 } 326 }
327 327
328 } // namespace sky 328 } // namespace sky
OLDNEW
« no previous file with comments | « sky/viewer/document_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698