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

Side by Side Diff: remoting/host/fake_host_extension.h

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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 | « remoting/host/fake_desktop_environment.cc ('k') | remoting/host/fake_host_extension.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 #ifndef REMOTING_HOST_FAKE_HOST_EXTENSION_H_ 5 #ifndef REMOTING_HOST_FAKE_HOST_EXTENSION_H_
6 #define REMOTING_HOST_FAKE_HOST_EXTENSION_H_ 6 #define REMOTING_HOST_FAKE_HOST_EXTENSION_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 11 matching lines...) Expand all
22 // |HostExtension| implementation that can report a specified capability, and 22 // |HostExtension| implementation that can report a specified capability, and
23 // reports messages matching a specified type as having been handled. 23 // reports messages matching a specified type as having been handled.
24 class FakeExtension : public HostExtension { 24 class FakeExtension : public HostExtension {
25 public: 25 public:
26 FakeExtension(const std::string& message_type, 26 FakeExtension(const std::string& message_type,
27 const std::string& capability); 27 const std::string& capability);
28 ~FakeExtension() override; 28 ~FakeExtension() override;
29 29
30 // HostExtension interface. 30 // HostExtension interface.
31 std::string capability() const override; 31 std::string capability() const override;
32 scoped_ptr<HostExtensionSession> CreateExtensionSession( 32 std::unique_ptr<HostExtensionSession> CreateExtensionSession(
33 ClientSessionControl* client_session_control, 33 ClientSessionControl* client_session_control,
34 protocol::ClientStub* client_stub) override; 34 protocol::ClientStub* client_stub) override;
35 35
36 // Accessors for testing. 36 // Accessors for testing.
37 bool has_handled_message() const { return has_handled_message_; } 37 bool has_handled_message() const { return has_handled_message_; }
38 bool was_instantiated() const { return was_instantiated_; } 38 bool was_instantiated() const { return was_instantiated_; }
39 39
40 private: 40 private:
41 class Session; 41 class Session;
42 friend class Session; 42 friend class Session;
43 43
44 // The type name of extension messages that this fake consumes. 44 // The type name of extension messages that this fake consumes.
45 std::string message_type_; 45 std::string message_type_;
46 46
47 // The capability this fake reports, and requires clients to support, if any. 47 // The capability this fake reports, and requires clients to support, if any.
48 std::string capability_; 48 std::string capability_;
49 49
50 // True if a message of |message_type_| has been processed by this extension. 50 // True if a message of |message_type_| has been processed by this extension.
51 bool has_handled_message_ = false; 51 bool has_handled_message_ = false;
52 52
53 // True if CreateExtensionSession() was called on this extension. 53 // True if CreateExtensionSession() was called on this extension.
54 bool was_instantiated_ = false; 54 bool was_instantiated_ = false;
55 55
56 DISALLOW_COPY_AND_ASSIGN(FakeExtension); 56 DISALLOW_COPY_AND_ASSIGN(FakeExtension);
57 }; 57 };
58 58
59 } // namespace remoting 59 } // namespace remoting
60 60
61 #endif // REMOTING_HOST_FAKE_HOST_EXTENSION_H_ 61 #endif // REMOTING_HOST_FAKE_HOST_EXTENSION_H_
OLDNEW
« no previous file with comments | « remoting/host/fake_desktop_environment.cc ('k') | remoting/host/fake_host_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698