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

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: FixPage.stopLoading command description. 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
« no previous file with comments | « content/browser/devtools/protocol/page_handler.h ('k') | headless/app/headless_shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e8d168489dab634a106be429e5e3e261880a65a5 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::StopLoading() {
+ 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
« no previous file with comments | « content/browser/devtools/protocol/page_handler.h ('k') | headless/app/headless_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698