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

Side by Side Diff: mojo/services/clipboard/main.cc

Issue 668663006: Standardize usage of virtual/override/final in mojo/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/base_paths.h" 6 #include "base/base_paths.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
11 #include "mojo/application/application_runner_chromium.h" 11 #include "mojo/application/application_runner_chromium.h"
12 #include "mojo/public/c/system/main.h" 12 #include "mojo/public/c/system/main.h"
13 #include "mojo/public/cpp/application/application_connection.h" 13 #include "mojo/public/cpp/application/application_connection.h"
14 #include "mojo/public/cpp/application/application_delegate.h" 14 #include "mojo/public/cpp/application/application_delegate.h"
15 #include "mojo/public/cpp/application/interface_factory.h" 15 #include "mojo/public/cpp/application/interface_factory.h"
16 #include "mojo/public/cpp/bindings/interface_ptr.h" 16 #include "mojo/public/cpp/bindings/interface_ptr.h"
17 #include "mojo/services/clipboard/clipboard_standalone_impl.h" 17 #include "mojo/services/clipboard/clipboard_standalone_impl.h"
18 18
19 class Delegate : public mojo::ApplicationDelegate, 19 class Delegate : public mojo::ApplicationDelegate,
20 public mojo::InterfaceFactory<mojo::Clipboard> { 20 public mojo::InterfaceFactory<mojo::Clipboard> {
21 public: 21 public:
22 Delegate() {} 22 Delegate() {}
23 virtual ~Delegate() {} 23 ~Delegate() override {}
24 24
25 // mojo::ApplicationDelegate implementation. 25 // mojo::ApplicationDelegate implementation.
26 virtual bool ConfigureIncomingConnection( 26 bool ConfigureIncomingConnection(
27 mojo::ApplicationConnection* connection) override { 27 mojo::ApplicationConnection* connection) override {
28 connection->AddService(this); 28 connection->AddService(this);
29 return true; 29 return true;
30 } 30 }
31 31
32 // mojo::InterfaceFactory<mojo::Clipboard> implementation. 32 // mojo::InterfaceFactory<mojo::Clipboard> implementation.
33 virtual void Create( 33 void Create(mojo::ApplicationConnection* connection,
34 mojo::ApplicationConnection* connection, 34 mojo::InterfaceRequest<mojo::Clipboard> request) override {
35 mojo::InterfaceRequest<mojo::Clipboard> request) override {
36 // TODO(erg): Write native implementations of the clipboard. For now, we 35 // TODO(erg): Write native implementations of the clipboard. For now, we
37 // just build a clipboard which doesn't interact with the system. 36 // just build a clipboard which doesn't interact with the system.
38 mojo::BindToRequest(new mojo::ClipboardStandaloneImpl(), &request); 37 mojo::BindToRequest(new mojo::ClipboardStandaloneImpl(), &request);
39 } 38 }
40 }; 39 };
41 40
42 MojoResult MojoMain(MojoHandle shell_handle) { 41 MojoResult MojoMain(MojoHandle shell_handle) {
43 mojo::ApplicationRunnerChromium runner(new Delegate); 42 mojo::ApplicationRunnerChromium runner(new Delegate);
44 return runner.Run(shell_handle); 43 return runner.Run(shell_handle);
45 } 44 }
OLDNEW
« no previous file with comments | « mojo/services/clipboard/clipboard_standalone_impl.h ('k') | mojo/services/gles2/command_buffer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698