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

Unified Diff: chrome/browser/devtools/devtools_window.h

Issue 972123003: Fixed behavior in case of disabled devtools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added test and removed reurn of pointer from OpenDevToolsWindow(). Created 5 years, 10 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/devtools/devtools_window.h
diff --git a/chrome/browser/devtools/devtools_window.h b/chrome/browser/devtools/devtools_window.h
index 63922fc96130205204ea5d56b89304950a57d54d..643d486c61e03e4b1e9b704f326f8bee4bfb943f 100644
--- a/chrome/browser/devtools/devtools_window.h
+++ b/chrome/browser/devtools/devtools_window.h
@@ -63,13 +63,11 @@ class DevToolsWindow : public DevToolsUIBindings::Delegate,
static bool IsDevToolsWindow(content::WebContents* web_contents);
// Open or reveal DevTools window, and perform the specified action.
- static DevToolsWindow* OpenDevToolsWindow(
- content::WebContents* inspected_web_contents,
- const DevToolsToggleAction& action);
+ static void OpenDevToolsWindow(content::WebContents* inspected_web_contents,
dgozman 2015/03/03 20:04:54 Let's just mention in the comment to each method t
Andrew T Wilson (Slow) 2015/03/04 13:32:42 In my experience, this will lead to crashes becaus
dgozman 2015/03/04 13:44:48 I don't feel strongly. Let's go with void.
+ const DevToolsToggleAction& action);
// Open or reveal DevTools window, with no special action.
- static DevToolsWindow* OpenDevToolsWindow(
- content::WebContents* inspected_web_contents);
+ static void OpenDevToolsWindow(content::WebContents* inspected_web_contents);
// Perform specified action for current WebContents inside a |browser|.
// This may close currently open DevTools window.
@@ -174,6 +172,8 @@ class DevToolsWindow : public DevToolsUIBindings::Delegate,
// by user.
static void OnPageCloseCanceled(content::WebContents* contents);
+ static DevToolsWindow* FindDevToolsWindow(content::DevToolsAgentHost*);
+
private:
friend class DevToolsWindowTesting;
@@ -217,7 +217,7 @@ class DevToolsWindow : public DevToolsUIBindings::Delegate,
const std::string& remote_frontend,
bool can_dock,
const std::string& settings);
- static DevToolsWindow* FindDevToolsWindow(content::DevToolsAgentHost*);
+
static DevToolsWindow* AsDevToolsWindow(content::WebContents*);
static DevToolsWindow* CreateDevToolsWindowForWorker(Profile* profile);
static DevToolsWindow* ToggleDevToolsWindow(

Powered by Google App Engine
This is Rietveld 408576698