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

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

Issue 1237973004: Port more String and HashMap usages (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 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 | « services/sky/dart_library_provider_impl.cc ('k') | sky/engine/core/script/dart_controller.cc » ('j') | 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 "services/sky/document_view.h" 5 #include "services/sky/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/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 pointer_event.pointer, 63 pointer_event.pointer,
64 base::TimeDelta::FromMillisecondsD(pointer_event.timeStampMS))); 64 base::TimeDelta::FromMillisecondsD(pointer_event.timeStampMS)));
65 } 65 }
66 66
67 scoped_ptr<DartLibraryProviderImpl::PrefetchedLibrary> 67 scoped_ptr<DartLibraryProviderImpl::PrefetchedLibrary>
68 CreatePrefetchedLibraryIfNeeded(const String& name, 68 CreatePrefetchedLibraryIfNeeded(const String& name,
69 mojo::URLResponsePtr response) { 69 mojo::URLResponsePtr response) {
70 scoped_ptr<DartLibraryProviderImpl::PrefetchedLibrary> prefetched; 70 scoped_ptr<DartLibraryProviderImpl::PrefetchedLibrary> prefetched;
71 if (response->status_code == 200) { 71 if (response->status_code == 200) {
72 prefetched.reset(new DartLibraryProviderImpl::PrefetchedLibrary()); 72 prefetched.reset(new DartLibraryProviderImpl::PrefetchedLibrary());
73 prefetched->name = name; 73 prefetched->name = name.toUTF8();
74 prefetched->pipe = response->body.Pass(); 74 prefetched->pipe = response->body.Pass();
75 } 75 }
76 return prefetched.Pass(); 76 return prefetched.Pass();
77 } 77 }
78 78
79 } // namespace 79 } // namespace
80 80
81 DocumentView::DocumentView( 81 DocumentView::DocumentView(
82 mojo::InterfaceRequest<mojo::ServiceProvider> services, 82 mojo::InterfaceRequest<mojo::ServiceProvider> services,
83 mojo::ServiceProviderPtr exported_services, 83 mojo::ServiceProviderPtr exported_services,
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 new mojo::StrongBinding<mojo::ServiceProvider>(sp_impl, &sp)); 308 new mojo::StrongBinding<mojo::ServiceProvider>(sp_impl, &sp));
309 service_registry_->AddServices(interface_names.Pass(), sp.Pass()); 309 service_registry_->AddServices(interface_names.Pass(), sp.Pass());
310 } 310 }
311 311
312 void DocumentView::ScheduleFrame() { 312 void DocumentView::ScheduleFrame() {
313 DCHECK(sky_view_); 313 DCHECK(sky_view_);
314 layer_host_->SetNeedsAnimate(); 314 layer_host_->SetNeedsAnimate();
315 } 315 }
316 316
317 } // namespace sky 317 } // namespace sky
OLDNEW
« no previous file with comments | « services/sky/dart_library_provider_impl.cc ('k') | sky/engine/core/script/dart_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698