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

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

Issue 2769243002: Adjust initial activation/focus Task Manager/Views TableView. (Closed)
Patch Set: sky review Created 3 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
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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 return gfx::Size(460, 270); 154 return gfx::Size(460, 270);
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 views::View* TaskManagerView::GetInitiallyFocusedView() {
165 return tab_table_;
166 }
167
168 bool TaskManagerView::CanResize() const { 164 bool TaskManagerView::CanResize() const {
169 return true; 165 return true;
170 } 166 }
171 167
172 bool TaskManagerView::CanMaximize() const { 168 bool TaskManagerView::CanMaximize() const {
173 return true; 169 return true;
174 } 170 }
175 171
176 bool TaskManagerView::CanMinimize() const { 172 bool TaskManagerView::CanMinimize() const {
177 return true; 173 return true;
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 if (!g_browser_process->local_state()) 362 if (!g_browser_process->local_state())
367 return; 363 return;
368 364
369 const base::DictionaryValue* dictionary = 365 const base::DictionaryValue* dictionary =
370 g_browser_process->local_state()->GetDictionary(GetWindowName()); 366 g_browser_process->local_state()->GetDictionary(GetWindowName());
371 if (dictionary) 367 if (dictionary)
372 dictionary->GetBoolean("always_on_top", &is_always_on_top_); 368 dictionary->GetBoolean("always_on_top", &is_always_on_top_);
373 } 369 }
374 370
375 } // namespace task_manager 371 } // namespace task_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698