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

Side by Side Diff: sky/viewer/runtime_flags.cc

Issue 1235093002: Move sky_viewer into services/sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: again Created 5 years, 5 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 | « sky/viewer/runtime_flags.h ('k') | sky/viewer/viewer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "sky/viewer/runtime_flags.h"
6
7 #include "base/logging.h"
8 #include "mojo/public/cpp/application/application_impl.h"
9
10 namespace sky {
11 namespace {
12
13 bool initialized = false;
14 RuntimeFlags flags;
15
16 // Load the viewer in testing mode so we can dump pixels.
17 const char kTesting[] = "--testing";
18
19 } // namespace
20
21 void RuntimeFlags::Initialize(mojo::ApplicationImpl* app) {
22 DCHECK(!initialized);
23 flags.testing_ = app->HasArg(kTesting);
24 initialized = true;
25 }
26
27 const RuntimeFlags& RuntimeFlags::Get() {
28 DCHECK(initialized);
29 return flags;
30 }
31
32 } // namespace sky
OLDNEW
« no previous file with comments | « sky/viewer/runtime_flags.h ('k') | sky/viewer/viewer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698