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

Unified Diff: chrome/browser/ui/webui/inspect_ui.cc

Issue 338113002: DevTools: Added user warning for chrome://inspect/#devices in Incognito. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/inspect_ui.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/inspect_ui.cc
diff --git a/chrome/browser/ui/webui/inspect_ui.cc b/chrome/browser/ui/webui/inspect_ui.cc
index 0a778c0dce8b2358f418edac63ec018b028dd40c..a7e344202f09520699e43280c3765268961427e9 100644
--- a/chrome/browser/ui/webui/inspect_ui.cc
+++ b/chrome/browser/ui/webui/inspect_ui.cc
@@ -326,8 +326,12 @@ void InspectUI::StartListeningNotifications() {
DevToolsTargetsUIHandler::CreateForRenderers(callback));
AddTargetUIHandler(
DevToolsTargetsUIHandler::CreateForWorkers(callback));
- AddTargetUIHandler(
- DevToolsTargetsUIHandler::CreateForAdb(callback, profile));
+ if (profile->IsOffTheRecord()) {
+ ShowIncognitoWarning();
+ } else {
+ AddTargetUIHandler(
+ DevToolsTargetsUIHandler::CreateForAdb(callback, profile));
+ }
port_status_serializer_.reset(
new PortForwardingStatusSerializer(
@@ -483,3 +487,7 @@ void InspectUI::PopulateTargets(const std::string& source,
void InspectUI::PopulatePortStatus(const base::Value& status) {
web_ui()->CallJavascriptFunction("populatePortStatus", status);
}
+
+void InspectUI::ShowIncognitoWarning() {
+ web_ui()->CallJavascriptFunction("showIncognitoWarning");
+}
« no previous file with comments | « chrome/browser/ui/webui/inspect_ui.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698