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

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

Issue 1145973011: mojo: Fix Blink's shutdown sequence in AxProviderImplTest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing shutdown call to html_viewer::Setup Created 5 years, 6 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
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/setup.h" 5 #include "components/html_viewer/setup.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/i18n/icu_util.h" 9 #include "base/i18n/icu_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 base::CommandLine::ForCurrentProcess()->HasSwitch(kIsHeadless)), 70 base::CommandLine::ForCurrentProcess()->HasSwitch(kIsHeadless)),
71 did_init_(false), 71 did_init_(false),
72 device_pixel_ratio_(1.f), 72 device_pixel_ratio_(1.f),
73 discardable_memory_allocator_(kDesiredMaxMemory), 73 discardable_memory_allocator_(kDesiredMaxMemory),
74 compositor_thread_("compositor thread") { 74 compositor_thread_("compositor thread") {
75 if (is_headless_) 75 if (is_headless_)
76 InitHeadless(); 76 InitHeadless();
77 } 77 }
78 78
79 Setup::~Setup() { 79 Setup::~Setup() {
80 if (blink_platform_) {
81 renderer_scheduler_->Shutdown();
82 blink::shutdown();
83 }
80 } 84 }
81 85
82 void Setup::InitHeadless() { 86 void Setup::InitHeadless() {
83 DCHECK(!did_init_); 87 DCHECK(!did_init_);
84 is_headless_ = true; 88 is_headless_ = true;
85 InitIfNecessary(gfx::Size(1024, 1024), 1.f); 89 InitIfNecessary(gfx::Size(1024, 1024), 1.f);
86 } 90 }
87 91
88 void Setup::InitIfNecessary(const gfx::Size& screen_size_in_pixels, 92 void Setup::InitIfNecessary(const gfx::Size& screen_size_in_pixels,
89 float device_pixel_ratio) { 93 float device_pixel_ratio) {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 #else 152 #else
149 bool enable_mojo_media_renderer = 153 bool enable_mojo_media_renderer =
150 command_line->HasSwitch(kEnableMojoMediaRenderer); 154 command_line->HasSwitch(kEnableMojoMediaRenderer);
151 155
152 web_media_player_factory_.reset(new WebMediaPlayerFactory( 156 web_media_player_factory_.reset(new WebMediaPlayerFactory(
153 compositor_thread_.message_loop_proxy(), enable_mojo_media_renderer)); 157 compositor_thread_.message_loop_proxy(), enable_mojo_media_renderer));
154 #endif 158 #endif
155 } 159 }
156 160
157 } // namespace html_viewer 161 } // namespace html_viewer
OLDNEW
« no previous file with comments | « components/html_viewer/html_viewer.cc ('k') | components/scheduler/renderer/renderer_scheduler_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698