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

Side by Side Diff: services/native_viewport/app_delegate.cc

Issue 2014043002: Make TracingImpl take a Shell* and args, instead of an ApplicationImpl*. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 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
« no previous file with comments | « services/java_handler/java_handler.cc ('k') | services/ui/input_manager/input_manager_app.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "services/native_viewport/app_delegate.h" 5 #include "services/native_viewport/app_delegate.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "gpu/config/gpu_util.h" 9 #include "gpu/config/gpu_util.h"
10 10
(...skipping 15 matching lines...) Expand all
26 26
27 logging::LoggingSettings settings; 27 logging::LoggingSettings settings;
28 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; 28 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
29 logging::InitLogging(settings); 29 logging::InitLogging(settings);
30 } 30 }
31 31
32 void NativeViewportAppDelegate::Initialize(mojo::ApplicationImpl* application) { 32 void NativeViewportAppDelegate::Initialize(mojo::ApplicationImpl* application) {
33 application_ = application; 33 application_ = application;
34 34
35 InitLogging(application); 35 InitLogging(application);
36 tracing_.Initialize(application); 36 tracing_.Initialize(application->shell(), &application->args());
37 37
38 // Apply the switch for kTouchEvents to CommandLine (if set). This allows 38 // Apply the switch for kTouchEvents to CommandLine (if set). This allows
39 // redirecting the mouse to a touch device on X for testing. 39 // redirecting the mouse to a touch device on X for testing.
40 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 40 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
41 const std::string touch_event_string("--" + 41 const std::string touch_event_string("--" +
42 std::string(switches::kTouchDevices)); 42 std::string(switches::kTouchDevices));
43 auto touch_iter = std::find(application->args().begin(), 43 auto touch_iter = std::find(application->args().begin(),
44 application->args().end(), touch_event_string); 44 application->args().end(), touch_event_string);
45 if (touch_iter != application->args().end() && 45 if (touch_iter != application->args().end() &&
46 ++touch_iter != application->args().end()) { 46 ++touch_iter != application->args().end()) {
(...skipping 28 matching lines...) Expand all
75 mojo::InterfaceRequest<mojo::Gpu> gpu_request) { 75 mojo::InterfaceRequest<mojo::Gpu> gpu_request) {
76 if (!gpu_state_.get()) 76 if (!gpu_state_.get())
77 gpu_state_ = new gles2::GpuState(); 77 gpu_state_ = new gles2::GpuState();
78 new gles2::GpuImpl(gpu_request.Pass(), gpu_state_); 78 new gles2::GpuImpl(gpu_request.Pass(), gpu_state_);
79 }); 79 });
80 80
81 return true; 81 return true;
82 } 82 }
83 83
84 } // namespace native_viewport 84 } // namespace native_viewport
OLDNEW
« no previous file with comments | « services/java_handler/java_handler.cc ('k') | services/ui/input_manager/input_manager_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698