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

Side by Side Diff: content/browser/devtools/protocol/devtools_protocol_client.h

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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 CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_PROTOCOL_CLIENT_H_ 5 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_PROTOCOL_CLIENT_H_
6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_PROTOCOL_CLIENT_H_ 6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_PROTOCOL_CLIENT_H_
7 7
8 #include <memory>
9
8 #include "base/callback.h" 10 #include "base/callback.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "base/values.h" 12 #include "base/values.h"
12 13
13 namespace content { 14 namespace content {
14 15
15 struct DevToolsCommandId { 16 struct DevToolsCommandId {
16 static const int kNoId; 17 static const int kNoId;
17 18
18 DevToolsCommandId(int call_id, int session_id) 19 DevToolsCommandId(int call_id, int session_id)
19 : call_id(call_id), session_id(session_id) {} 20 : call_id(call_id), session_id(session_id) {}
20 21
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // format the message. Do not use unless you must. 59 // format the message. Do not use unless you must.
59 void SendRawNotification(const std::string& message); 60 void SendRawNotification(const std::string& message);
60 61
61 void SendMessage(int session_id, const base::DictionaryValue& message); 62 void SendMessage(int session_id, const base::DictionaryValue& message);
62 63
63 explicit DevToolsProtocolClient(DevToolsProtocolDelegate* notifier); 64 explicit DevToolsProtocolClient(DevToolsProtocolDelegate* notifier);
64 virtual ~DevToolsProtocolClient(); 65 virtual ~DevToolsProtocolClient();
65 66
66 protected: 67 protected:
67 void SendSuccess(DevToolsCommandId command_id, 68 void SendSuccess(DevToolsCommandId command_id,
68 scoped_ptr<base::DictionaryValue> params); 69 std::unique_ptr<base::DictionaryValue> params);
69 void SendNotification(const std::string& method, 70 void SendNotification(const std::string& method,
70 scoped_ptr<base::DictionaryValue> params); 71 std::unique_ptr<base::DictionaryValue> params);
71 72
72 private: 73 private:
73 friend class DevToolsProtocolDispatcher; 74 friend class DevToolsProtocolDispatcher;
74 75
75 DevToolsProtocolDelegate* notifier_; 76 DevToolsProtocolDelegate* notifier_;
76 DISALLOW_COPY_AND_ASSIGN(DevToolsProtocolClient); 77 DISALLOW_COPY_AND_ASSIGN(DevToolsProtocolClient);
77 }; 78 };
78 79
79 } // namespace content 80 } // namespace content
80 81
81 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_PROTOCOL_CLIENT_H_ 82 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_PROTOCOL_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698