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

Unified Diff: ui/viewer/viewer_main.cc

Issue 10872002: beginnings of metro viewer process (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: . Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/viewer/viewer_ipc_server.cc ('k') | ui/viewer/viewer_message_generator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/viewer/viewer_main.cc
diff --git a/ui/viewer/viewer_main.cc b/ui/viewer/viewer_main.cc
new file mode 100644
index 0000000000000000000000000000000000000000..e49dcc088abe0d2f0e9126d05a4f7b5de1e83e60
--- /dev/null
+++ b/ui/viewer/viewer_main.cc
@@ -0,0 +1,34 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/command_line.h"
+#include "base/debug/debugger.h"
+#include "base/message_loop.h"
+#include "ui/compositor/test/compositor_test_support.h"
+#include "ui/viewer/viewer_process.h"
+
+// Mainline routine for running as the viewer process.
+int ViewerProcessMain() {
+ MessageLoop main_message_loop(MessageLoop::TYPE_UI);
+ ui::CompositorTestSupport::Initialize();
+
+ main_message_loop.set_thread_name("MainThread");
+ CommandLine* command_line = CommandLine::ForCurrentProcess();
+
+ VLOG(1) << "Viewer process launched: "
+ << CommandLine::ForCurrentProcess()->GetCommandLineString();
+
+ base::PlatformThread::SetName("CrViewerMain");
+
+ // TODO(scottmg): Uniquize this process?
+
+ ViewerProcess viewer_process;
+ if (viewer_process.Initialize(&main_message_loop, *command_line)) {
+ MessageLoopForUI::current()->Run();
+ } else {
+ LOG(ERROR) << "Viewer process failed to initialize";
+ }
+ viewer_process.Teardown();
+ return 0;
+}
« no previous file with comments | « ui/viewer/viewer_ipc_server.cc ('k') | ui/viewer/viewer_message_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698