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

Side by Side Diff: content/browser/devtools/protocol/inspector_handler.cc

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 #include "content/browser/devtools/protocol/inspector_handler.h" 5 #include "content/browser/devtools/protocol/inspector_handler.h"
6 6
7 #include "content/browser/frame_host/render_frame_host_impl.h" 7 #include "content/browser/frame_host/render_frame_host_impl.h"
8 8
9 namespace content { 9 namespace content {
10 namespace devtools { 10 namespace devtools {
11 namespace inspector { 11 namespace inspector {
12 12
13 using Response = DevToolsProtocolClient::Response; 13 using Response = DevToolsProtocolClient::Response;
14 14
15 InspectorHandler::InspectorHandler() 15 InspectorHandler::InspectorHandler()
16 : host_(nullptr) { 16 : host_(nullptr) {
17 } 17 }
18 18
19 InspectorHandler::~InspectorHandler() { 19 InspectorHandler::~InspectorHandler() {
20 } 20 }
21 21
22 void InspectorHandler::SetClient(scoped_ptr<Client> client) { 22 void InspectorHandler::SetClient(std::unique_ptr<Client> client) {
23 client_.swap(client); 23 client_.swap(client);
24 } 24 }
25 25
26 void InspectorHandler::SetRenderFrameHost(RenderFrameHostImpl* host) { 26 void InspectorHandler::SetRenderFrameHost(RenderFrameHostImpl* host) {
27 host_ = host; 27 host_ = host;
28 } 28 }
29 29
30 void InspectorHandler::TargetCrashed() { 30 void InspectorHandler::TargetCrashed() {
31 client_->TargetCrashed(TargetCrashedParams::Create()); 31 client_->TargetCrashed(TargetCrashedParams::Create());
32 } 32 }
33 33
34 void InspectorHandler::TargetDetached(const std::string& reason) { 34 void InspectorHandler::TargetDetached(const std::string& reason) {
35 client_->Detached(DetachedParams::Create()->set_reason(reason)); 35 client_->Detached(DetachedParams::Create()->set_reason(reason));
36 } 36 }
37 37
38 Response InspectorHandler::Enable() { 38 Response InspectorHandler::Enable() {
39 if (host_ && !host_->IsRenderFrameLive()) 39 if (host_ && !host_->IsRenderFrameLive())
40 client_->TargetCrashed(TargetCrashedParams::Create()); 40 client_->TargetCrashed(TargetCrashedParams::Create());
41 return Response::OK(); 41 return Response::OK();
42 } 42 }
43 43
44 Response InspectorHandler::Disable() { 44 Response InspectorHandler::Disable() {
45 return Response::OK(); 45 return Response::OK();
46 } 46 }
47 47
48 } // namespace inspector 48 } // namespace inspector
49 } // namespace devtools 49 } // namespace devtools
50 } // namespace content 50 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/protocol/inspector_handler.h ('k') | content/browser/devtools/protocol/io_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698