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

Side by Side Diff: remoting/signaling/signal_strategy.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/signaling/server_log_entry.cc ('k') | remoting/signaling/xmpp_login_handler.h » ('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_SIGNALING_SIGNAL_STRATEGY_H_ 5 #ifndef REMOTING_SIGNALING_SIGNAL_STRATEGY_H_
6 #define REMOTING_SIGNALING_SIGNAL_STRATEGY_H_ 6 #define REMOTING_SIGNALING_SIGNAL_STRATEGY_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 12
13 namespace buzz { 13 namespace buzz {
14 class XmlElement; 14 class XmlElement;
15 } // namespace buzz 15 } // namespace buzz
16 16
17 namespace remoting { 17 namespace remoting {
18 18
19 class SignalStrategy { 19 class SignalStrategy {
20 public: 20 public:
21 enum State { 21 enum State {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 // Add a |listener| that can listen to all incoming 81 // Add a |listener| that can listen to all incoming
82 // messages. Doesn't take ownership of the |listener|. All listeners 82 // messages. Doesn't take ownership of the |listener|. All listeners
83 // must be removed before this object is destroyed. 83 // must be removed before this object is destroyed.
84 virtual void AddListener(Listener* listener) = 0; 84 virtual void AddListener(Listener* listener) = 0;
85 85
86 // Remove a |listener| previously added with AddListener(). 86 // Remove a |listener| previously added with AddListener().
87 virtual void RemoveListener(Listener* listener) = 0; 87 virtual void RemoveListener(Listener* listener) = 0;
88 88
89 // Sends a raw XMPP stanza. Returns false if the stanza couldn't be send. 89 // Sends a raw XMPP stanza. Returns false if the stanza couldn't be send.
90 virtual bool SendStanza(scoped_ptr<buzz::XmlElement> stanza) = 0; 90 virtual bool SendStanza(std::unique_ptr<buzz::XmlElement> stanza) = 0;
91 91
92 // Returns new ID that should be used for the next outgoing IQ 92 // Returns new ID that should be used for the next outgoing IQ
93 // request. 93 // request.
94 virtual std::string GetNextId() = 0; 94 virtual std::string GetNextId() = 0;
95 95
96 private: 96 private:
97 DISALLOW_COPY_AND_ASSIGN(SignalStrategy); 97 DISALLOW_COPY_AND_ASSIGN(SignalStrategy);
98 }; 98 };
99 99
100 } // namespace remoting 100 } // namespace remoting
101 101
102 #endif // REMOTING_SIGNALING_SIGNAL_STRATEGY_H_ 102 #endif // REMOTING_SIGNALING_SIGNAL_STRATEGY_H_
OLDNEW
« no previous file with comments | « remoting/signaling/server_log_entry.cc ('k') | remoting/signaling/xmpp_login_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698