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

Unified Diff: content/browser/devtools/protocol/page_handler.cc

Issue 2525903003: Add Page.stopLoading to devtools and --timeout switch to headless_shell (Closed)
Patch Set: Added a WeakPtrFactory 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/devtools/protocol/page_handler.cc
diff --git a/content/browser/devtools/protocol/page_handler.cc b/content/browser/devtools/protocol/page_handler.cc
index e1f72108baba64e55e48595971da9806aaa7e4ce..3959c743843a091c3827ce51d747b78324c3c589 100644
--- a/content/browser/devtools/protocol/page_handler.cc
+++ b/content/browser/devtools/protocol/page_handler.cc
@@ -640,6 +640,14 @@ void PageHandler::OnColorPicked(int r, int g, int b, int a) {
client_->ColorPicked(ColorPickedParams::Create()->set_color(color));
}
+Response PageHandler::Stop() {
+ WebContentsImpl* web_contents = GetWebContents();
+ if (!web_contents)
+ return Response::InternalError("Could not connect to view");
+ web_contents->Stop();
+ return Response::OK();
+}
+
} // namespace page
} // namespace devtools
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698