| 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 SetBorder(views::CreateEmptyBorder( | 339 SetBorder( |
| 340 ChromeLayoutProvider::Get()->GetDistanceMetric( | 340 views::CreateEmptyBorder(ChromeLayoutProvider::Get()->GetInsetsMetric( |
| 341 DISTANCE_PANEL_CONTENT_MARGIN), | 341 views::INSETS_DIALOG_CONTENTS))); |
| 342 views::kButtonHEdgeMarginNew, 0, views::kButtonHEdgeMarginNew)); | |
| 343 | 342 |
| 344 table_model_->RetrieveSavedColumnsSettingsAndUpdateTable(); | 343 table_model_->RetrieveSavedColumnsSettingsAndUpdateTable(); |
| 345 | 344 |
| 346 AddAccelerator(ui::Accelerator(ui::VKEY_W, ui::EF_CONTROL_DOWN)); | 345 AddAccelerator(ui::Accelerator(ui::VKEY_W, ui::EF_CONTROL_DOWN)); |
| 347 } | 346 } |
| 348 | 347 |
| 349 void TaskManagerView::InitAlwaysOnTopState() { | 348 void TaskManagerView::InitAlwaysOnTopState() { |
| 350 RetrieveSavedAlwaysOnTopState(); | 349 RetrieveSavedAlwaysOnTopState(); |
| 351 GetWidget()->SetAlwaysOnTop(is_always_on_top_); | 350 GetWidget()->SetAlwaysOnTop(is_always_on_top_); |
| 352 } | 351 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 370 if (!g_browser_process->local_state()) | 369 if (!g_browser_process->local_state()) |
| 371 return; | 370 return; |
| 372 | 371 |
| 373 const base::DictionaryValue* dictionary = | 372 const base::DictionaryValue* dictionary = |
| 374 g_browser_process->local_state()->GetDictionary(GetWindowName()); | 373 g_browser_process->local_state()->GetDictionary(GetWindowName()); |
| 375 if (dictionary) | 374 if (dictionary) |
| 376 dictionary->GetBoolean("always_on_top", &is_always_on_top_); | 375 dictionary->GetBoolean("always_on_top", &is_always_on_top_); |
| 377 } | 376 } |
| 378 | 377 |
| 379 } // namespace task_manager | 378 } // namespace task_manager |
| OLD | NEW |