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

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

Issue 2478703002: [DevTools] Remove handlers = browser from protocol definition. (Closed)
Patch Set: fixes Created 4 years, 1 month 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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 return Response::OK(); 402 return Response::OK();
403 } else if (response == kNavigationResponseCancelAndIgnore) { 403 } else if (response == kNavigationResponseCancelAndIgnore) {
404 it->second->CancelDeferredNavigation( 404 it->second->CancelDeferredNavigation(
405 content::NavigationThrottle::CANCEL_AND_IGNORE); 405 content::NavigationThrottle::CANCEL_AND_IGNORE);
406 return Response::OK(); 406 return Response::OK();
407 } 407 }
408 408
409 return Response::InvalidParams("Unrecognized response"); 409 return Response::InvalidParams("Unrecognized response");
410 } 410 }
411 411
412 Response PageHandler::AddScriptToEvaluateOnLoad(const std::string& source,
413 std::string* identifier) {
414 return Response::FallThrough();
415 }
416
417 Response PageHandler::RemoveScriptToEvaluateOnLoad(
418 const std::string& identifier) {
419 return Response::FallThrough();
420 }
421
422 Response PageHandler::SetAutoAttachToCreatedPages(bool auto_attach) {
423 return Response::FallThrough();
424 }
425
426 Response PageHandler::GetResourceTree(scoped_refptr<FrameResourceTree>* tree) {
427 return Response::FallThrough();
428 }
429
430 Response PageHandler::GetResourceContent(DevToolsCommandId command_id,
431 const std::string& frame_id,
432 const std::string& url) {
433 return Response::FallThrough();
434 }
435
436 Response PageHandler::SearchInResource(DevToolsCommandId command_id,
437 const std::string& frame_id,
438 const std::string& url,
439 const std::string& query,
440 bool* case_sensitive,
441 bool* is_regex) {
442 return Response::FallThrough();
443 }
444
445 Response PageHandler::SetDocumentContent(const std::string& frame_id,
446 const std::string& html) {
447 return Response::FallThrough();
448 }
449
450 Response PageHandler::ConfigureOverlay(const bool* is_suspended,
451 const std::string* message) {
452 return Response::FallThrough();
453 }
454
455 Response PageHandler::GetAppManifest(
456 std::string* url,
457 std::vector<scoped_refptr<AppManifestError>>* errors,
458 std::string* data) {
459 return Response::FallThrough();
460 }
461
462 Response PageHandler::SetBlockedEventsWarningThreshold(double threshold) {
463 return Response::FallThrough();
464 }
465
466 Response PageHandler::GetLayoutMetrics(
467 scoped_refptr<LayoutViewport>* layout_viewport,
468 scoped_refptr<VisualViewport>* visual_viewport) {
469 return Response::FallThrough();
470 }
471
412 std::unique_ptr<PageNavigationThrottle> 472 std::unique_ptr<PageNavigationThrottle>
413 PageHandler::CreateThrottleForNavigation(NavigationHandle* navigation_handle) { 473 PageHandler::CreateThrottleForNavigation(NavigationHandle* navigation_handle) {
414 if (!navigation_throttle_enabled_) 474 if (!navigation_throttle_enabled_)
415 return nullptr; 475 return nullptr;
416 476
417 std::unique_ptr<PageNavigationThrottle> throttle(new PageNavigationThrottle( 477 std::unique_ptr<PageNavigationThrottle> throttle(new PageNavigationThrottle(
418 weak_factory_.GetWeakPtr(), next_navigation_id_, navigation_handle)); 478 weak_factory_.GetWeakPtr(), next_navigation_id_, navigation_handle));
419 navigation_throttles_[next_navigation_id_++] = throttle.get(); 479 navigation_throttles_[next_navigation_id_++] = throttle.get();
420 return throttle; 480 return throttle;
421 } 481 }
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 640
581 void PageHandler::OnColorPicked(int r, int g, int b, int a) { 641 void PageHandler::OnColorPicked(int r, int g, int b, int a) {
582 scoped_refptr<dom::RGBA> color = 642 scoped_refptr<dom::RGBA> color =
583 dom::RGBA::Create()->set_r(r)->set_g(g)->set_b(b)->set_a(a); 643 dom::RGBA::Create()->set_r(r)->set_g(g)->set_b(b)->set_a(a);
584 client_->ColorPicked(ColorPickedParams::Create()->set_color(color)); 644 client_->ColorPicked(ColorPickedParams::Create()->set_color(color));
585 } 645 }
586 646
587 } // namespace page 647 } // namespace page
588 } // namespace devtools 648 } // namespace devtools
589 } // namespace content 649 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/protocol/page_handler.h ('k') | third_party/WebKit/LayoutTests/inspector/report-protocol-errors.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698