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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 g_task_manager_view->SelectTaskOfActiveTab(browser); | 71 g_task_manager_view->SelectTaskOfActiveTab(browser); |
72 g_task_manager_view->GetWidget()->Activate(); | 72 g_task_manager_view->GetWidget()->Activate(); |
73 return g_task_manager_view->table_model_.get(); | 73 return g_task_manager_view->table_model_.get(); |
74 } | 74 } |
75 | 75 |
76 g_task_manager_view = new TaskManagerView(); | 76 g_task_manager_view = new TaskManagerView(); |
77 | 77 |
78 gfx::NativeWindow context = | 78 gfx::NativeWindow context = |
79 browser ? browser->window()->GetNativeWindow() : nullptr; | 79 browser ? browser->window()->GetNativeWindow() : nullptr; |
80 #if defined(USE_ASH) | 80 #if defined(USE_ASH) |
81 if (!ash_util::IsRunningInMash() && !context) | 81 if (!IsRunningInMash() && !context) |
82 context = ash::wm::GetActiveWindow(); | 82 context = ash::wm::GetActiveWindow(); |
83 #endif | 83 #endif |
84 | 84 |
85 DialogDelegate::CreateDialogWidget(g_task_manager_view, context, nullptr); | 85 DialogDelegate::CreateDialogWidget(g_task_manager_view, context, nullptr); |
86 g_task_manager_view->InitAlwaysOnTopState(); | 86 g_task_manager_view->InitAlwaysOnTopState(); |
87 | 87 |
88 #if defined(OS_WIN) | 88 #if defined(OS_WIN) |
89 // Set the app id for the task manager to the app id of its parent browser. If | 89 // Set the app id for the task manager to the app id of its parent browser. If |
90 // no parent is specified, the app id will default to that of the initial | 90 // no parent is specified, the app id will default to that of the initial |
91 // process. | 91 // process. |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 if (!g_browser_process->local_state()) | 365 if (!g_browser_process->local_state()) |
366 return; | 366 return; |
367 | 367 |
368 const base::DictionaryValue* dictionary = | 368 const base::DictionaryValue* dictionary = |
369 g_browser_process->local_state()->GetDictionary(GetWindowName()); | 369 g_browser_process->local_state()->GetDictionary(GetWindowName()); |
370 if (dictionary) | 370 if (dictionary) |
371 dictionary->GetBoolean("always_on_top", &is_always_on_top_); | 371 dictionary->GetBoolean("always_on_top", &is_always_on_top_); |
372 } | 372 } |
373 | 373 |
374 } // namespace task_manager | 374 } // namespace task_manager |
OLD | NEW |