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

Side by Side Diff: src/platform/window_manager/main.cc

Issue 501116: wm: Update namespace and header define guards. (Closed)
Patch Set: move using directive inside of namespace for consistency Created 11 years 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 (c) 2009 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium OS 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 <cmath> 5 #include <cmath>
6 #include <cstdlib> 6 #include <cstdlib>
7 #include <ctime> 7 #include <ctime>
8 8
9 extern "C" { 9 extern "C" {
10 #include <clutter/clutter.h> 10 #include <clutter/clutter.h>
(...skipping 18 matching lines...) Expand all
29 29
30 DEFINE_string(log_dir, ".", 30 DEFINE_string(log_dir, ".",
31 "Directory where logs should be written; created if it doesn't " 31 "Directory where logs should be written; created if it doesn't "
32 "exist."); 32 "exist.");
33 DEFINE_bool(logtostderr, false, 33 DEFINE_bool(logtostderr, false,
34 "Should logs be written to stderr instead of to a file in " 34 "Should logs be written to stderr instead of to a file in "
35 "--log_dir?"); 35 "--log_dir?");
36 DEFINE_string(minidump_dir, ".", 36 DEFINE_string(minidump_dir, ".",
37 "Directory where crash minidumps should be written"); 37 "Directory where crash minidumps should be written");
38 38
39 using chromeos::ClutterInterface; 39 using window_manager::ClutterInterface;
40 using chromeos::MockClutterInterface; 40 using window_manager::MockClutterInterface;
41 using chromeos::RealClutterInterface; 41 using window_manager::RealClutterInterface;
42 using chromeos::RealXConnection; 42 using window_manager::RealXConnection;
43 using chromeos::WindowManager; 43 using window_manager::WindowManager;
44 44
45 // Get the current time in the local time zone as "YYYYMMDD-HHMMSS". 45 // Get the current time in the local time zone as "YYYYMMDD-HHMMSS".
46 std::string GetCurrentTimeAsString() { 46 std::string GetCurrentTimeAsString() {
47 time_t now = time(NULL); 47 time_t now = time(NULL);
48 CHECK(now >= 0); 48 CHECK(now >= 0);
49 struct tm now_tm; 49 struct tm now_tm;
50 CHECK(localtime_r(&now, &now_tm) == &now_tm); 50 CHECK(localtime_r(&now, &now_tm) == &now_tm);
51 char now_str[16]; 51 char now_str[16];
52 CHECK(strftime(now_str, sizeof(now_str), "%Y%m%d-%H%M%S", &now_tm) == 15); 52 CHECK(strftime(now_str, sizeof(now_str), "%Y%m%d-%H%M%S", &now_tm) == 15);
53 return std::string(now_str); 53 return std::string(now_str);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 clutter.reset(new RealClutterInterface); 90 clutter.reset(new RealClutterInterface);
91 } else { 91 } else {
92 clutter.reset(new MockClutterInterface); 92 clutter.reset(new MockClutterInterface);
93 } 93 }
94 WindowManager wm(&xconn, clutter.get()); 94 WindowManager wm(&xconn, clutter.get());
95 wm.Init(); 95 wm.Init();
96 96
97 clutter_main(); 97 clutter_main();
98 return 0; 98 return 0;
99 } 99 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698