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

Side by Side Diff: components/clipboard/clipboard_application_delegate.cc

Issue 1674903003: Extract shell methods from ApplicationImpl into a base class, and pass this to Initialize() instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojom
Patch Set: . Created 4 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 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 "components/clipboard/clipboard_application_delegate.h" 5 #include "components/clipboard/clipboard_application_delegate.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "components/clipboard/clipboard_standalone_impl.h" 9 #include "components/clipboard/clipboard_standalone_impl.h"
10 #include "mojo/shell/public/cpp/application_connection.h" 10 #include "mojo/shell/public/cpp/application_connection.h"
11 11
12 namespace clipboard { 12 namespace clipboard {
13 13
14 ClipboardApplicationDelegate::ClipboardApplicationDelegate() {} 14 ClipboardApplicationDelegate::ClipboardApplicationDelegate() {}
15 15
16 ClipboardApplicationDelegate::~ClipboardApplicationDelegate() {} 16 ClipboardApplicationDelegate::~ClipboardApplicationDelegate() {}
17 17
18 void ClipboardApplicationDelegate::Initialize(mojo::ApplicationImpl* app) { 18 void ClipboardApplicationDelegate::Initialize(mojo::Shell* shell,
19 tracing_.Initialize(app); 19 const std::string& url,
20 uint32_t id) {
21 tracing_.Initialize(shell, url);
20 } 22 }
21 23
22 bool ClipboardApplicationDelegate::AcceptConnection( 24 bool ClipboardApplicationDelegate::AcceptConnection(
23 mojo::ApplicationConnection* connection) { 25 mojo::ApplicationConnection* connection) {
24 connection->AddService(this); 26 connection->AddService(this);
25 return true; 27 return true;
26 } 28 }
27 29
28 void ClipboardApplicationDelegate::Create( 30 void ClipboardApplicationDelegate::Create(
29 mojo::ApplicationConnection* connection, 31 mojo::ApplicationConnection* connection,
30 mojo::InterfaceRequest<mojo::Clipboard> request) { 32 mojo::InterfaceRequest<mojo::Clipboard> request) {
31 // TODO(erg): Write native implementations of the clipboard. For now, we 33 // TODO(erg): Write native implementations of the clipboard. For now, we
32 // just build a clipboard which doesn't interact with the system. 34 // just build a clipboard which doesn't interact with the system.
33 new clipboard::ClipboardStandaloneImpl(std::move(request)); 35 new clipboard::ClipboardStandaloneImpl(std::move(request));
34 } 36 }
35 37
36 } // namespace clipboard 38 } // namespace clipboard
OLDNEW
« no previous file with comments | « components/clipboard/clipboard_application_delegate.h ('k') | components/clipboard/clipboard_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698