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

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

Issue 9569001: WebUI TaskManager: Add method to set minimum window size on HTMLDialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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/ui/webui/task_manager_dialog.cc
diff --git a/chrome/browser/ui/webui/task_manager_dialog.cc b/chrome/browser/ui/webui/task_manager_dialog.cc
index 6c8b274f0d82972ade779b8a8e3b31481e4f6316..f06ea5bc8897b9bbed297c0ace8cf1ac78c12b03 100644
--- a/chrome/browser/ui/webui/task_manager_dialog.cc
+++ b/chrome/browser/ui/webui/task_manager_dialog.cc
@@ -53,6 +53,9 @@ class TaskManagerDialogImpl : public HtmlDialogUIDelegate {
virtual string16 GetDialogTitle() const OVERRIDE {
return l10n_util::GetStringUTF16(IDS_TASK_MANAGER_TITLE);
}
+ virtual std::string GetDialogName() const OVERRIDE {
+ return prefs::kTaskManagerWindowPlacement;
+ }
virtual GURL GetDialogContentURL() const OVERRIDE {
std::string url_string(chrome::kChromeUITaskManagerURL);
url_string += "?";
@@ -68,6 +71,7 @@ class TaskManagerDialogImpl : public HtmlDialogUIDelegate {
std::vector<WebUIMessageHandler*>* handlers) const OVERRIDE {
}
virtual void GetDialogSize(gfx::Size* size) const OVERRIDE {
+#if !defined(TOOLKIT_VIEWS)
// If dialog's bounds are previously saved, use them.
if (g_browser_process->local_state()) {
const DictionaryValue* placement_pref =
@@ -84,6 +88,10 @@ class TaskManagerDialogImpl : public HtmlDialogUIDelegate {
// Otherwise set default size.
size->SetSize(640, 480);
+#endif
+ }
+ virtual void GetMinimumDialogSize(gfx::Size* size) const OVERRIDE {
+ size->SetSize(640, 480);
}
virtual std::string GetDialogArgs() const OVERRIDE {
return std::string();
@@ -102,6 +110,7 @@ class TaskManagerDialogImpl : public HtmlDialogUIDelegate {
const content::ContextMenuParams& params) OVERRIDE {
return true;
}
+#if !defined(TOOLKIT_VIEWS)
virtual void StoreDialogSize(const gfx::Size& dialog_size) OVERRIDE {
// Store the dialog's bounds so that it can be restored with the same bounds
// the next time it's opened.
@@ -113,6 +122,7 @@ class TaskManagerDialogImpl : public HtmlDialogUIDelegate {
placement_pref->SetInteger("height", dialog_size.height());
}
}
+#endif
private:
void ShowDialog(bool is_background_page_mode);

Powered by Google App Engine
This is Rietveld 408576698