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

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

Issue 12871013: DevTools: respect minimum width/height when resizing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/devtools/devtools_window.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // container width, then clamps to try and ensure both devtools and content 95 // container width, then clamps to try and ensure both devtools and content
96 // are at least somewhat visible. 96 // are at least somewhat visible.
97 // Called only for the case when devtools window is docked to the side. 97 // Called only for the case when devtools window is docked to the side.
98 int GetWidth(int container_width); 98 int GetWidth(int container_width);
99 99
100 // Returns preferred devtools window height for given |container_height|. 100 // Returns preferred devtools window height for given |container_height|.
101 // Uses the same logic as GetWidth. 101 // Uses the same logic as GetWidth.
102 // Called only for the case when devtools window is docked to bottom. 102 // Called only for the case when devtools window is docked to bottom.
103 int GetHeight(int container_height); 103 int GetHeight(int container_height);
104 104
105 // Returns the minimum width devtools window needs.
106 int GetMinimumWidth();
107
108 // Returns the minimum height devtools window needs.
109 int GetMinimumHeight();
110
105 // Stores preferred devtools window width for this instance. 111 // Stores preferred devtools window width for this instance.
106 void SetWidth(int width); 112 void SetWidth(int width);
107 113
108 // Stores preferred devtools window height for this instance. 114 // Stores preferred devtools window height for this instance.
109 void SetHeight(int height); 115 void SetHeight(int height);
110 116
111 private: 117 private:
112 friend class DevToolsControllerTest; 118 friend class DevToolsControllerTest;
113 static DevToolsWindow* Create(Profile* profile, 119 static DevToolsWindow* Create(Profile* profile,
114 content::RenderViewHost* inspected_rvh, 120 content::RenderViewHost* inspected_rvh,
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 content::NotificationRegistrar registrar_; 218 content::NotificationRegistrar registrar_;
213 scoped_ptr<content::DevToolsClientHost> frontend_host_; 219 scoped_ptr<content::DevToolsClientHost> frontend_host_;
214 base::WeakPtrFactory<DevToolsWindow> weak_factory_; 220 base::WeakPtrFactory<DevToolsWindow> weak_factory_;
215 scoped_ptr<DevToolsFileHelper> file_helper_; 221 scoped_ptr<DevToolsFileHelper> file_helper_;
216 int width_; 222 int width_;
217 int height_; 223 int height_;
218 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); 224 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow);
219 }; 225 };
220 226
221 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ 227 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/devtools/devtools_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698