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

Side by Side Diff: components/html_viewer/global_state.cc

Issue 1257703003: Revert of ApplicationImpl cleanup, part 1: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 | « components/filesystem/file_system_app.cc ('k') | components/view_manager/view_manager_app.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 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 "components/html_viewer/global_state.h" 5 #include "components/html_viewer/global_state.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 return; 82 return;
83 83
84 DCHECK_NE(0.f, device_pixel_ratio); 84 DCHECK_NE(0.f, device_pixel_ratio);
85 85
86 did_init_ = true; 86 did_init_ = true;
87 device_pixel_ratio_ = device_pixel_ratio; 87 device_pixel_ratio_ = device_pixel_ratio;
88 screen_size_in_pixels_ = screen_size_in_pixels; 88 screen_size_in_pixels_ = screen_size_in_pixels;
89 89
90 if (!resource_loader_.BlockUntilLoaded()) { 90 if (!resource_loader_.BlockUntilLoaded()) {
91 // Assume on error we're being shut down. 91 // Assume on error we're being shut down.
92 app_->Quit(); 92 app_->Terminate();
93 return; 93 return;
94 } 94 }
95 95
96 ui_init_.reset( 96 ui_init_.reset(
97 new ui::mojo::UIInit(screen_size_in_pixels, device_pixel_ratio)); 97 new ui::mojo::UIInit(screen_size_in_pixels, device_pixel_ratio));
98 base::DiscardableMemoryAllocator::SetInstance(&discardable_memory_allocator_); 98 base::DiscardableMemoryAllocator::SetInstance(&discardable_memory_allocator_);
99 99
100 renderer_scheduler_ = scheduler::RendererScheduler::Create(); 100 renderer_scheduler_ = scheduler::RendererScheduler::Create();
101 blink_platform_.reset(new BlinkPlatformImpl(app_, renderer_scheduler_.get())); 101 blink_platform_.reset(new BlinkPlatformImpl(app_, renderer_scheduler_.get()));
102 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) 102 #if defined(V8_USE_EXTERNAL_STARTUP_DATA)
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 media_factory_.reset( 140 media_factory_.reset(
141 new MediaFactory(compositor_thread_.task_runner(), app_->shell())); 141 new MediaFactory(compositor_thread_.task_runner(), app_->shell()));
142 142
143 if (command_line->HasSwitch(kJavaScriptFlags)) { 143 if (command_line->HasSwitch(kJavaScriptFlags)) {
144 std::string flags(command_line->GetSwitchValueASCII(kJavaScriptFlags)); 144 std::string flags(command_line->GetSwitchValueASCII(kJavaScriptFlags));
145 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size())); 145 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size()));
146 } 146 }
147 } 147 }
148 148
149 } // namespace html_viewer 149 } // namespace html_viewer
OLDNEW
« no previous file with comments | « components/filesystem/file_system_app.cc ('k') | components/view_manager/view_manager_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698