| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 g_task_manager_view->GetWidget()->Show(); | 98 g_task_manager_view->GetWidget()->Show(); |
| 99 | 99 |
| 100 // Set the initial focus to the list of tasks. | 100 // Set the initial focus to the list of tasks. |
| 101 views::FocusManager* focus_manager = g_task_manager_view->GetFocusManager(); | 101 views::FocusManager* focus_manager = g_task_manager_view->GetFocusManager(); |
| 102 if (focus_manager) | 102 if (focus_manager) |
| 103 focus_manager->SetFocusedView(g_task_manager_view->tab_table_); | 103 focus_manager->SetFocusedView(g_task_manager_view->tab_table_); |
| 104 | 104 |
| 105 #if defined(USE_ASH) | 105 #if defined(USE_ASH) |
| 106 ash::WmWindow* wm_window = ash::WmLookup::Get()->GetWindowForWidget( | 106 ash::WmWindow* wm_window = ash::WmLookup::Get()->GetWindowForWidget( |
| 107 g_task_manager_view->GetWidget()); | 107 g_task_manager_view->GetWidget()); |
| 108 ash::ShelfItemDetails item_details; | 108 wm_window->SetIntProperty(ash::WmWindowProperty::SHELF_ITEM_TYPE, |
| 109 item_details.type = ash::TYPE_DIALOG; | 109 ash::TYPE_DIALOG); |
| 110 item_details.image_resource_id = IDR_ASH_SHELF_ICON_TASK_MANAGER; | 110 wm_window->SetIntProperty(ash::WmWindowProperty::SHELF_ICON_RESOURCE_ID, |
| 111 item_details.title = wm_window->GetTitle(); | 111 IDR_ASH_SHELF_ICON_TASK_MANAGER); |
| 112 wm_window->SetShelfItemDetails(item_details); | |
| 113 #endif | 112 #endif |
| 114 return g_task_manager_view->table_model_.get(); | 113 return g_task_manager_view->table_model_.get(); |
| 115 } | 114 } |
| 116 | 115 |
| 117 // static | 116 // static |
| 118 void TaskManagerView::Hide() { | 117 void TaskManagerView::Hide() { |
| 119 if (g_task_manager_view) | 118 if (g_task_manager_view) |
| 120 g_task_manager_view->GetWidget()->Close(); | 119 g_task_manager_view->GetWidget()->Close(); |
| 121 } | 120 } |
| 122 | 121 |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 if (!g_browser_process->local_state()) | 362 if (!g_browser_process->local_state()) |
| 364 return; | 363 return; |
| 365 | 364 |
| 366 const base::DictionaryValue* dictionary = | 365 const base::DictionaryValue* dictionary = |
| 367 g_browser_process->local_state()->GetDictionary(GetWindowName()); | 366 g_browser_process->local_state()->GetDictionary(GetWindowName()); |
| 368 if (dictionary) | 367 if (dictionary) |
| 369 dictionary->GetBoolean("always_on_top", &is_always_on_top_); | 368 dictionary->GetBoolean("always_on_top", &is_always_on_top_); |
| 370 } | 369 } |
| 371 | 370 |
| 372 } // namespace task_manager | 371 } // namespace task_manager |
| OLD | NEW |