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

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 1674903003: Extract shell methods from ApplicationImpl into a base class, and pass this to Initialize() instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojom
Patch Set: . Created 4 years, 10 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/web_view/web_view_impl.cc ('k') | content/browser/mojo/mojo_shell_client_host.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/browser_main_loop.h" 5 #include "content/browser/browser_main_loop.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 #include "ui/gfx/x/x11_types.h" 172 #include "ui/gfx/x/x11_types.h"
173 #endif 173 #endif
174 174
175 #if defined(USE_NSS_CERTS) || !defined(USE_OPENSSL) 175 #if defined(USE_NSS_CERTS) || !defined(USE_OPENSSL)
176 #include "crypto/nss_util.h" 176 #include "crypto/nss_util.h"
177 #endif 177 #endif
178 178
179 #if defined(MOJO_SHELL_CLIENT) 179 #if defined(MOJO_SHELL_CLIENT)
180 #include "content/common/mojo/mojo_shell_connection_impl.h" 180 #include "content/common/mojo/mojo_shell_connection_impl.h"
181 #include "mojo/converters/network/network_type_converters.h" 181 #include "mojo/converters/network/network_type_converters.h"
182 #include "mojo/shell/public/cpp/application_impl.h" 182 #include "mojo/shell/public/cpp/shell.h"
183 #include "third_party/mojo/src/mojo/edk/embedder/embedder.h" 183 #include "third_party/mojo/src/mojo/edk/embedder/embedder.h"
184 #include "ui/views/mus/window_manager_connection.h" 184 #include "ui/views/mus/window_manager_connection.h"
185 #endif 185 #endif
186 186
187 // One of the linux specific headers defines this as a macro. 187 // One of the linux specific headers defines this as a macro.
188 #ifdef DestroyAll 188 #ifdef DestroyAll
189 #undef DestroyAll 189 #undef DestroyAll
190 #endif 190 #endif
191 191
192 namespace content { 192 namespace content {
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 } 914 }
915 915
916 int BrowserMainLoop::PreMainMessageLoopRun() { 916 int BrowserMainLoop::PreMainMessageLoopRun() {
917 #if defined(MOJO_SHELL_CLIENT) 917 #if defined(MOJO_SHELL_CLIENT)
918 if (IsRunningInMojoShell()) { 918 if (IsRunningInMojoShell()) {
919 mojo::embedder::PreInitializeChildProcess(); 919 mojo::embedder::PreInitializeChildProcess();
920 MojoShellConnectionImpl::Create(); 920 MojoShellConnectionImpl::Create();
921 MojoShellConnectionImpl::Get()->BindToCommandLinePlatformChannel(); 921 MojoShellConnectionImpl::Get()->BindToCommandLinePlatformChannel();
922 #if defined(USE_AURA) 922 #if defined(USE_AURA)
923 views::WindowManagerConnection::Create( 923 views::WindowManagerConnection::Create(
924 MojoShellConnection::Get()->GetApplication()); 924 MojoShellConnection::Get()->GetShell());
925 #endif 925 #endif
926 } 926 }
927 #endif 927 #endif
928 928
929 if (parts_) { 929 if (parts_) {
930 TRACE_EVENT0("startup", 930 TRACE_EVENT0("startup",
931 "BrowserMainLoop::CreateThreads:PreMainMessageLoopRun"); 931 "BrowserMainLoop::CreateThreads:PreMainMessageLoopRun");
932 TRACK_SCOPED_REGION( 932 TRACK_SCOPED_REGION(
933 "Startup", "BrowserMainLoop::PreMainMessageLoopRun"); 933 "Startup", "BrowserMainLoop::PreMainMessageLoopRun");
934 934
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
1462 DCHECK(is_tracing_startup_for_duration_); 1462 DCHECK(is_tracing_startup_for_duration_);
1463 1463
1464 is_tracing_startup_for_duration_ = false; 1464 is_tracing_startup_for_duration_ = false;
1465 TracingController::GetInstance()->StopTracing( 1465 TracingController::GetInstance()->StopTracing(
1466 TracingController::CreateFileSink( 1466 TracingController::CreateFileSink(
1467 startup_trace_file_, 1467 startup_trace_file_,
1468 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); 1468 base::Bind(OnStoppedStartupTracing, startup_trace_file_)));
1469 } 1469 }
1470 1470
1471 } // namespace content 1471 } // namespace content
OLDNEW
« no previous file with comments | « components/web_view/web_view_impl.cc ('k') | content/browser/mojo/mojo_shell_client_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698