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

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

Issue 2590293003: [DevTools] Rework DevToolsSession interaction with domain handlers. (Closed)
Patch Set: addressed comments Created 3 years, 12 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/page_handler.h" 5 #include "content/browser/devtools/protocol/page_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 base::Base64Encode( 83 base::Base64Encode(
84 base::StringPiece(reinterpret_cast<char*>(&data[0]), data.size()), 84 base::StringPiece(reinterpret_cast<char*>(&data[0]), data.size()),
85 &base_64_data); 85 &base_64_data);
86 86
87 return base_64_data; 87 return base_64_data;
88 } 88 }
89 89
90 } // namespace 90 } // namespace
91 91
92 PageHandler::PageHandler() 92 PageHandler::PageHandler()
93 : enabled_(false), 93 : DevToolsDomainHandler(Page::Metainfo::domainName),
94 enabled_(false),
94 screencast_enabled_(false), 95 screencast_enabled_(false),
95 screencast_quality_(kDefaultScreenshotQuality), 96 screencast_quality_(kDefaultScreenshotQuality),
96 screencast_max_width_(-1), 97 screencast_max_width_(-1),
97 screencast_max_height_(-1), 98 screencast_max_height_(-1),
98 capture_every_nth_frame_(1), 99 capture_every_nth_frame_(1),
99 capture_retry_count_(0), 100 capture_retry_count_(0),
100 has_compositor_frame_metadata_(false), 101 has_compositor_frame_metadata_(false),
101 session_id_(0), 102 session_id_(0),
102 frame_counter_(0), 103 frame_counter_(0),
103 frames_in_flight_(0), 104 frames_in_flight_(0),
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 Response PageHandler::StopLoading() { 575 Response PageHandler::StopLoading() {
575 WebContentsImpl* web_contents = GetWebContents(); 576 WebContentsImpl* web_contents = GetWebContents();
576 if (!web_contents) 577 if (!web_contents)
577 return Response::InternalError(); 578 return Response::InternalError();
578 web_contents->Stop(); 579 web_contents->Stop();
579 return Response::OK(); 580 return Response::OK();
580 } 581 }
581 582
582 } // namespace protocol 583 } // namespace protocol
583 } // namespace content 584 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698