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

Side by Side Diff: chrome/browser/devtools/devtools_window.h

Issue 23835007: DevTools: Do not close devtools if there are dirty files in workspace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comments Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_
6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ 6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 int GetHeight(int container_height); 123 int GetHeight(int container_height);
124 124
125 // Stores preferred devtools window width for this instance. 125 // Stores preferred devtools window width for this instance.
126 void SetWidth(int width); 126 void SetWidth(int width);
127 127
128 // Stores preferred devtools window height for this instance. 128 // Stores preferred devtools window height for this instance.
129 void SetHeight(int height); 129 void SetHeight(int height);
130 130
131 void Show(const DevToolsToggleAction& action); 131 void Show(const DevToolsToggleAction& action);
132 132
133 static bool HandleBeforeUnload(content::WebContents*, bool, bool*);
134 static bool InterceptPageBeforeUnload(content::WebContents*);
135 static bool ShouldCloseDevToolsBrowser(Browser*);
136 static bool NeedToFireBeforeUnload(content::WebContents*);
137 static void PageCancelClose(content::WebContents*);
138
139 void SetDockSideForTest(DevToolsDockSide dock_side);
140
133 private: 141 private:
134 friend class DevToolsControllerTest; 142 friend class DevToolsControllerTest;
135 143
136 DevToolsWindow(Profile* profile, 144 DevToolsWindow(Profile* profile,
137 const GURL& frontend_url, 145 const GURL& frontend_url,
138 content::RenderViewHost* inspected_rvh, 146 content::RenderViewHost* inspected_rvh,
139 DevToolsDockSide dock_side); 147 DevToolsDockSide dock_side);
140 148
141 static DevToolsWindow* Create(Profile* profile, 149 static DevToolsWindow* Create(Profile* profile,
142 const GURL& frontend_url, 150 const GURL& frontend_url,
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 scoped_ptr<DevToolsFileHelper> file_helper_; 280 scoped_ptr<DevToolsFileHelper> file_helper_;
273 scoped_refptr<DevToolsFileSystemIndexer> file_system_indexer_; 281 scoped_refptr<DevToolsFileSystemIndexer> file_system_indexer_;
274 typedef std::map< 282 typedef std::map<
275 int, 283 int,
276 scoped_refptr<DevToolsFileSystemIndexer::FileSystemIndexingJob> > 284 scoped_refptr<DevToolsFileSystemIndexer::FileSystemIndexingJob> >
277 IndexingJobsMap; 285 IndexingJobsMap;
278 IndexingJobsMap indexing_jobs_; 286 IndexingJobsMap indexing_jobs_;
279 int width_; 287 int width_;
280 int height_; 288 int height_;
281 DevToolsDockSide dock_side_before_minimized_; 289 DevToolsDockSide dock_side_before_minimized_;
290 bool inspected_page_is_closing_;
282 291
283 scoped_ptr<DevToolsEmbedderMessageDispatcher> embedder_message_dispatcher_; 292 scoped_ptr<DevToolsEmbedderMessageDispatcher> embedder_message_dispatcher_;
284 base::WeakPtrFactory<DevToolsWindow> weak_factory_; 293 base::WeakPtrFactory<DevToolsWindow> weak_factory_;
285 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); 294 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow);
286 }; 295 };
287 296
288 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ 297 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698