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

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

Issue 2785683003: views: implement width snapping for DialogDelegateViews (Closed)
Patch Set: Created 3 years, 8 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 143
144 // If |sorted_column_id| is the default value, it means to clear the sort. 144 // If |sorted_column_id| is the default value, it means to clear the sort.
145 if (descriptor.sorted_column_id != TableSortDescriptor().sorted_column_id) { 145 if (descriptor.sorted_column_id != TableSortDescriptor().sorted_column_id) {
146 descriptor_list.emplace_back(descriptor.sorted_column_id, 146 descriptor_list.emplace_back(descriptor.sorted_column_id,
147 descriptor.is_ascending); 147 descriptor.is_ascending);
148 } 148 }
149 149
150 tab_table_->SetSortDescriptors(descriptor_list); 150 tab_table_->SetSortDescriptors(descriptor_list);
151 } 151 }
152 152
153 gfx::Size TaskManagerView::GetPreferredSize() const { 153 gfx::Size TaskManagerView::GetUnsnappedPreferredSize() const {
154 return gfx::Size(460, 270); 154 return gfx::Size(460, 270);
Peter Kasting 2017/03/30 00:35:36 This should probably be using a localized size ins
155 } 155 }
156 156
157 bool TaskManagerView::AcceleratorPressed(const ui::Accelerator& accelerator) { 157 bool TaskManagerView::AcceleratorPressed(const ui::Accelerator& accelerator) {
158 DCHECK_EQ(ui::VKEY_W, accelerator.key_code()); 158 DCHECK_EQ(ui::VKEY_W, accelerator.key_code());
159 DCHECK_EQ(ui::EF_CONTROL_DOWN, accelerator.modifiers()); 159 DCHECK_EQ(ui::EF_CONTROL_DOWN, accelerator.modifiers());
160 GetWidget()->Close(); 160 GetWidget()->Close();
161 return true; 161 return true;
162 } 162 }
163 163
164 bool TaskManagerView::CanResize() const { 164 bool TaskManagerView::CanResize() const {
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 if (!g_browser_process->local_state()) 362 if (!g_browser_process->local_state())
363 return; 363 return;
364 364
365 const base::DictionaryValue* dictionary = 365 const base::DictionaryValue* dictionary =
366 g_browser_process->local_state()->GetDictionary(GetWindowName()); 366 g_browser_process->local_state()->GetDictionary(GetWindowName());
367 if (dictionary) 367 if (dictionary)
368 dictionary->GetBoolean("always_on_top", &is_always_on_top_); 368 dictionary->GetBoolean("always_on_top", &is_always_on_top_);
369 } 369 }
370 370
371 } // namespace task_manager 371 } // namespace task_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698