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

Side by Side Diff: examples/trace_me/trace_me_app.cc

Issue 1979723002: ApplicationConnection devolution, part 3. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 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 2015 The Chromium Authors. All rights reserved. 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 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/bind.h" 5 #include "base/bind.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/threading/thread.h" 8 #include "base/threading/thread.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 tracing_.Initialize(app); 57 tracing_.Initialize(app);
58 58
59 TRACE_EVENT0("trace_me", "initialized"); 59 TRACE_EVENT0("trace_me", "initialized");
60 60
61 base::MessageLoop::current()->PostDelayedTask( 61 base::MessageLoop::current()->PostDelayedTask(
62 FROM_HERE, base::Bind(&DoWork), kDoWorkDelay); 62 FROM_HERE, base::Bind(&DoWork), kDoWorkDelay);
63 } 63 }
64 64
65 // mojo:ApplicationDelegate: 65 // mojo:ApplicationDelegate:
66 bool ConfigureIncomingConnection( 66 bool ConfigureIncomingConnection(
67 mojo::ApplicationConnection* connection) override { 67 mojo::ServiceProviderImpl* service_provider_impl) override {
68 TRACE_EVENT0("trace_me", "connected"); 68 TRACE_EVENT0("trace_me", "connected");
69 return true; 69 return true;
70 } 70 }
71 71
72 private: 72 private:
73 mojo::TracingImpl tracing_; 73 mojo::TracingImpl tracing_;
74 DISALLOW_COPY_AND_ASSIGN(TraceMeApp); 74 DISALLOW_COPY_AND_ASSIGN(TraceMeApp);
75 }; 75 };
76 76
77 } // namespace examples 77 } // namespace examples
78 78
79 MojoResult MojoMain(MojoHandle application_request) { 79 MojoResult MojoMain(MojoHandle application_request) {
80 mojo::ApplicationRunnerChromium runner(new examples::TraceMeApp); 80 mojo::ApplicationRunnerChromium runner(new examples::TraceMeApp);
81 return runner.Run(application_request); 81 return runner.Run(application_request);
82 } 82 }
OLDNEW
« no previous file with comments | « examples/recursive_content_handler/recursive_content_handler.cc ('k') | mojo/public/cpp/application/application_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698