Chromium Code Reviews| 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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 329 tab_table_->SetModel(table_model_.get()); | 329 tab_table_->SetModel(table_model_.get()); |
| 330 tab_table_->SetGrouper(this); | 330 tab_table_->SetGrouper(this); |
| 331 tab_table_->set_observer(this); | 331 tab_table_->set_observer(this); |
| 332 tab_table_->set_context_menu_controller(this); | 332 tab_table_->set_context_menu_controller(this); |
| 333 set_context_menu_controller(this); | 333 set_context_menu_controller(this); |
| 334 | 334 |
| 335 tab_table_parent_ = tab_table_->CreateParentIfNecessary(); | 335 tab_table_parent_ = tab_table_->CreateParentIfNecessary(); |
| 336 AddChildView(tab_table_parent_); | 336 AddChildView(tab_table_parent_); |
| 337 | 337 |
| 338 SetLayoutManager(new views::FillLayout()); | 338 SetLayoutManager(new views::FillLayout()); |
| 339 const gfx::Insets content_insets = | |
| 340 ChromeLayoutProvider::Get()->GetInsetsMetric( | |
| 341 views::INSETS_DIALOG_CONTENTS); | |
| 339 SetBorder(views::CreateEmptyBorder( | 342 SetBorder(views::CreateEmptyBorder( |
| 340 ChromeLayoutProvider::Get()->GetDistanceMetric( | 343 content_insets.top(), content_insets.left(), 0, content_insets.right())); |
|
Peter Kasting
2017/05/18 00:00:06
The 0 here looks odd. Why are we not just using t
Bret
2017/05/18 00:50:05
I guess someone wanted the "End Process" button cl
Peter Kasting
2017/05/18 00:56:28
Mrph. Can we just Do The Correct Thing all the ti
Bret
2017/05/18 01:20:30
Okay, done.
| |
| 341 DISTANCE_PANEL_CONTENT_MARGIN), | |
| 342 views::kButtonHEdgeMarginNew, 0, views::kButtonHEdgeMarginNew)); | |
| 343 | 344 |
| 344 table_model_->RetrieveSavedColumnsSettingsAndUpdateTable(); | 345 table_model_->RetrieveSavedColumnsSettingsAndUpdateTable(); |
| 345 | 346 |
| 346 AddAccelerator(ui::Accelerator(ui::VKEY_W, ui::EF_CONTROL_DOWN)); | 347 AddAccelerator(ui::Accelerator(ui::VKEY_W, ui::EF_CONTROL_DOWN)); |
| 347 } | 348 } |
| 348 | 349 |
| 349 void TaskManagerView::InitAlwaysOnTopState() { | 350 void TaskManagerView::InitAlwaysOnTopState() { |
| 350 RetrieveSavedAlwaysOnTopState(); | 351 RetrieveSavedAlwaysOnTopState(); |
| 351 GetWidget()->SetAlwaysOnTop(is_always_on_top_); | 352 GetWidget()->SetAlwaysOnTop(is_always_on_top_); |
| 352 } | 353 } |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 370 if (!g_browser_process->local_state()) | 371 if (!g_browser_process->local_state()) |
| 371 return; | 372 return; |
| 372 | 373 |
| 373 const base::DictionaryValue* dictionary = | 374 const base::DictionaryValue* dictionary = |
| 374 g_browser_process->local_state()->GetDictionary(GetWindowName()); | 375 g_browser_process->local_state()->GetDictionary(GetWindowName()); |
| 375 if (dictionary) | 376 if (dictionary) |
| 376 dictionary->GetBoolean("always_on_top", &is_always_on_top_); | 377 dictionary->GetBoolean("always_on_top", &is_always_on_top_); |
| 377 } | 378 } |
| 378 | 379 |
| 379 } // namespace task_manager | 380 } // namespace task_manager |
| OLD | NEW |