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

Side by Side Diff: services/window_manager/main.cc

Issue 791493006: De-client tracing.TraceController interface (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "mojo/application/application_runner_chromium.h" 6 #include "mojo/application/application_runner_chromium.h"
7 #include "mojo/common/tracing_impl.h"
7 #include "mojo/public/c/system/main.h" 8 #include "mojo/public/c/system/main.h"
8 #include "mojo/public/cpp/application/application_delegate.h" 9 #include "mojo/public/cpp/application/application_delegate.h"
9 #include "mojo/public/cpp/application/service_provider_impl.h" 10 #include "mojo/public/cpp/application/service_provider_impl.h"
10 #include "mojo/services/view_manager/public/cpp/view_manager.h" 11 #include "mojo/services/view_manager/public/cpp/view_manager.h"
11 #include "mojo/services/view_manager/public/cpp/view_manager_delegate.h" 12 #include "mojo/services/view_manager/public/cpp/view_manager_delegate.h"
12 #include "services/window_manager/window_manager_app.h" 13 #include "services/window_manager/window_manager_app.h"
13 #include "services/window_manager/window_manager_delegate.h" 14 #include "services/window_manager/window_manager_delegate.h"
14 15
15 // ApplicationDelegate implementation file for WindowManager users (e.g. 16 // ApplicationDelegate implementation file for WindowManager users (e.g.
16 // core window manager tests) that do not want to provide their own 17 // core window manager tests) that do not want to provide their own
(...skipping 12 matching lines...) Expand all
29 : window_manager_app_(new WindowManagerApp(this, this)), 30 : window_manager_app_(new WindowManagerApp(this, this)),
30 root_(nullptr), 31 root_(nullptr),
31 window_offset_(10) { 32 window_offset_(10) {
32 } 33 }
33 ~DefaultWindowManager() override {} 34 ~DefaultWindowManager() override {}
34 35
35 private: 36 private:
36 // Overridden from mojo::ApplicationDelegate: 37 // Overridden from mojo::ApplicationDelegate:
37 void Initialize(mojo::ApplicationImpl* impl) override { 38 void Initialize(mojo::ApplicationImpl* impl) override {
38 window_manager_app_->Initialize(impl); 39 window_manager_app_->Initialize(impl);
40 tracing_.Initialize(impl);
39 } 41 }
40 bool ConfigureIncomingConnection( 42 bool ConfigureIncomingConnection(
41 mojo::ApplicationConnection* connection) override { 43 mojo::ApplicationConnection* connection) override {
42 window_manager_app_->ConfigureIncomingConnection(connection); 44 window_manager_app_->ConfigureIncomingConnection(connection);
43 return true; 45 return true;
44 } 46 }
45 47
46 // Overridden from ViewManagerDelegate: 48 // Overridden from ViewManagerDelegate:
47 void OnEmbed(View* root, 49 void OnEmbed(View* root,
48 mojo::InterfaceRequest<mojo::ServiceProvider> services, 50 mojo::InterfaceRequest<mojo::ServiceProvider> services,
(...skipping 17 matching lines...) Expand all
66 window_offset_ += 10; 68 window_offset_ += 10;
67 69
68 view->SetVisible(true); 70 view->SetVisible(true);
69 view->Embed(url, services.Pass(), exposed_services.Pass()); 71 view->Embed(url, services.Pass(), exposed_services.Pass());
70 } 72 }
71 73
72 scoped_ptr<WindowManagerApp> window_manager_app_; 74 scoped_ptr<WindowManagerApp> window_manager_app_;
73 75
74 View* root_; 76 View* root_;
75 int window_offset_; 77 int window_offset_;
78 mojo::TracingImpl tracing_;
76 79
77 MOJO_DISALLOW_COPY_AND_ASSIGN(DefaultWindowManager); 80 MOJO_DISALLOW_COPY_AND_ASSIGN(DefaultWindowManager);
78 }; 81 };
79 82
80 } // namespace window_manager 83 } // namespace window_manager
81 84
82 MojoResult MojoMain(MojoHandle shell_handle) { 85 MojoResult MojoMain(MojoHandle shell_handle) {
83 mojo::ApplicationRunnerChromium runner( 86 mojo::ApplicationRunnerChromium runner(
84 new window_manager::DefaultWindowManager); 87 new window_manager::DefaultWindowManager);
85 return runner.Run(shell_handle); 88 return runner.Run(shell_handle);
86 } 89 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698