OLD | NEW |
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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 // If |sorted_column_id| is the default value, it means to clear the sort. | 146 // If |sorted_column_id| is the default value, it means to clear the sort. |
147 if (descriptor.sorted_column_id != TableSortDescriptor().sorted_column_id) { | 147 if (descriptor.sorted_column_id != TableSortDescriptor().sorted_column_id) { |
148 descriptor_list.emplace_back(descriptor.sorted_column_id, | 148 descriptor_list.emplace_back(descriptor.sorted_column_id, |
149 descriptor.is_ascending); | 149 descriptor.is_ascending); |
150 } | 150 } |
151 | 151 |
152 tab_table_->SetSortDescriptors(descriptor_list); | 152 tab_table_->SetSortDescriptors(descriptor_list); |
153 } | 153 } |
154 | 154 |
155 gfx::Size TaskManagerView::GetPreferredSize() const { | 155 gfx::Size TaskManagerView::GetPreferredSize() const { |
156 return gfx::Size(460, 270); | 156 gfx::Size table_size = tab_table_parent_->GetPreferredSize(); |
| 157 table_size.set_height(270); |
| 158 gfx::Insets border = GetInsets(); |
| 159 table_size.Enlarge(border.width(), border.height()); |
| 160 return table_size; |
157 } | 161 } |
158 | 162 |
159 bool TaskManagerView::AcceleratorPressed(const ui::Accelerator& accelerator) { | 163 bool TaskManagerView::AcceleratorPressed(const ui::Accelerator& accelerator) { |
160 DCHECK_EQ(ui::VKEY_W, accelerator.key_code()); | 164 DCHECK_EQ(ui::VKEY_W, accelerator.key_code()); |
161 DCHECK_EQ(ui::EF_CONTROL_DOWN, accelerator.modifiers()); | 165 DCHECK_EQ(ui::EF_CONTROL_DOWN, accelerator.modifiers()); |
162 GetWidget()->Close(); | 166 GetWidget()->Close(); |
163 return true; | 167 return true; |
164 } | 168 } |
165 | 169 |
166 bool TaskManagerView::CanResize() const { | 170 bool TaskManagerView::CanResize() const { |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 if (!g_browser_process->local_state()) | 367 if (!g_browser_process->local_state()) |
364 return; | 368 return; |
365 | 369 |
366 const base::DictionaryValue* dictionary = | 370 const base::DictionaryValue* dictionary = |
367 g_browser_process->local_state()->GetDictionary(GetWindowName()); | 371 g_browser_process->local_state()->GetDictionary(GetWindowName()); |
368 if (dictionary) | 372 if (dictionary) |
369 dictionary->GetBoolean("always_on_top", &is_always_on_top_); | 373 dictionary->GetBoolean("always_on_top", &is_always_on_top_); |
370 } | 374 } |
371 | 375 |
372 } // namespace task_manager | 376 } // namespace task_manager |
OLD | NEW |