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

Side by Side Diff: chrome/browser/ui/views/task_manager_view.cc

Issue 2344703002: Fix task manager's default sizing. (Closed)
Patch Set: rabbit holes 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "chrome/browser/ui/views/task_manager_view.h" 5 #include "chrome/browser/ui/views/task_manager_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 // If |sorted_column_id| is the default value, it means to clear the sort. 140 // If |sorted_column_id| is the default value, it means to clear the sort.
141 if (descriptor.sorted_column_id != TableSortDescriptor().sorted_column_id) { 141 if (descriptor.sorted_column_id != TableSortDescriptor().sorted_column_id) {
142 descriptor_list.emplace_back(descriptor.sorted_column_id, 142 descriptor_list.emplace_back(descriptor.sorted_column_id,
143 descriptor.is_ascending); 143 descriptor.is_ascending);
144 } 144 }
145 145
146 tab_table_->SetSortDescriptors(descriptor_list); 146 tab_table_->SetSortDescriptors(descriptor_list);
147 } 147 }
148 148
149 gfx::Size TaskManagerView::GetPreferredSize() const { 149 gfx::Size TaskManagerView::GetPreferredSize() const {
150 return gfx::Size(460, 270); 150 gfx::Size table_size = tab_table_parent_->GetPreferredSize();
151 table_size.set_height(270);
152 gfx::Insets border = GetInsets();
153 table_size.Enlarge(border.width(), border.height());
154 return table_size;
151 } 155 }
152 156
153 bool TaskManagerView::AcceleratorPressed(const ui::Accelerator& accelerator) { 157 bool TaskManagerView::AcceleratorPressed(const ui::Accelerator& accelerator) {
154 DCHECK_EQ(ui::VKEY_W, accelerator.key_code()); 158 DCHECK_EQ(ui::VKEY_W, accelerator.key_code());
155 DCHECK_EQ(ui::EF_CONTROL_DOWN, accelerator.modifiers()); 159 DCHECK_EQ(ui::EF_CONTROL_DOWN, accelerator.modifiers());
156 GetWidget()->Close(); 160 GetWidget()->Close();
157 return true; 161 return true;
158 } 162 }
159 163
160 bool TaskManagerView::CanResize() const { 164 bool TaskManagerView::CanResize() const {
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 if (!g_browser_process->local_state()) 361 if (!g_browser_process->local_state())
358 return; 362 return;
359 363
360 const base::DictionaryValue* dictionary = 364 const base::DictionaryValue* dictionary =
361 g_browser_process->local_state()->GetDictionary(GetWindowName()); 365 g_browser_process->local_state()->GetDictionary(GetWindowName());
362 if (dictionary) 366 if (dictionary)
363 dictionary->GetBoolean("always_on_top", &is_always_on_top_); 367 dictionary->GetBoolean("always_on_top", &is_always_on_top_);
364 } 368 }
365 369
366 } // namespace task_manager 370 } // namespace task_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698