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

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

Issue 2361613002: DevTools: untangle device discovery request from the devtools android bridge. (Closed)
Patch Set: for landing Created 4 years, 3 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
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 8dfead13ca7b10850a7717663b521395b5003965..c457e1e27b25948741b37a5bd8394bea80e8cc84 100644
--- a/chrome/browser/ui/webui/inspect_ui.cc
+++ b/chrome/browser/ui/webui/inspect_ui.cc
@@ -8,6 +8,7 @@
#include "base/stl_util.h"
#include "chrome/browser/devtools/devtools_targets_ui.h"
#include "chrome/browser/devtools/devtools_ui_bindings.h"
+#include "chrome/browser/devtools/devtools_window.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_navigator_params.h"
#include "chrome/browser/ui/singleton_tabs.h"
@@ -303,7 +304,9 @@ void InspectUI::Inspect(const std::string& source_id,
scoped_refptr<DevToolsAgentHost> target = FindTarget(source_id, target_id);
if (target) {
const std::string target_type = target->GetType();
- target->Inspect();
+ Profile* profile = Profile::FromBrowserContext(
+ web_ui()->GetWebContents()->GetBrowserContext());
+ DevToolsWindow::OpenDevToolsWindow(target, profile);
ForceUpdateIfNeeded(source_id, target_type);
}
}

Powered by Google App Engine
This is Rietveld 408576698