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

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

Issue 2434463004: mash: Move directly linked NewWindowDelegate to mojom::NewWindowClient. (Closed)
Patch Set: Rebase to ToT Created 4 years, 1 month 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 21 matching lines...) Expand all
32 #include "ui/views/view.h" 32 #include "ui/views/view.h"
33 #include "ui/views/widget/widget.h" 33 #include "ui/views/widget/widget.h"
34 #include "ui/views/window/dialog_client_view.h" 34 #include "ui/views/window/dialog_client_view.h"
35 35
36 #if defined(USE_ASH) 36 #if defined(USE_ASH)
37 // Note: gn check complains here, despite the correct conditional //ash dep. 37 // Note: gn check complains here, despite the correct conditional //ash dep.
38 #include "ash/common/shelf/shelf_item_types.h" // nogncheck 38 #include "ash/common/shelf/shelf_item_types.h" // nogncheck
39 #include "ash/resources/grit/ash_resources.h" // nogncheck 39 #include "ash/resources/grit/ash_resources.h" // nogncheck
40 #include "ash/wm/window_properties.h" // nogncheck 40 #include "ash/wm/window_properties.h" // nogncheck
41 #include "ash/wm/window_util.h" // nogncheck 41 #include "ash/wm/window_util.h" // nogncheck
42 #include "chrome/browser/ui/ash/ash_util.h" // nogncheck
42 #include "chrome/browser/ui/ash/property_util.h" // nogncheck 43 #include "chrome/browser/ui/ash/property_util.h" // nogncheck
43 #endif // defined(USE_ASH) 44 #endif // defined(USE_ASH)
44 45
45 #if defined(OS_WIN) 46 #if defined(OS_WIN)
46 #include "chrome/browser/shell_integration_win.h" 47 #include "chrome/browser/shell_integration_win.h"
47 #include "ui/base/win/shell.h" 48 #include "ui/base/win/shell.h"
48 #include "ui/views/win/hwnd_util.h" 49 #include "ui/views/win/hwnd_util.h"
49 #endif // defined(OS_WIN) 50 #endif // defined(OS_WIN)
50 51
51 namespace task_manager { 52 namespace task_manager {
(...skipping 16 matching lines...) Expand all
68 g_task_manager_view->SelectTaskOfActiveTab(browser); 69 g_task_manager_view->SelectTaskOfActiveTab(browser);
69 g_task_manager_view->GetWidget()->Activate(); 70 g_task_manager_view->GetWidget()->Activate();
70 return g_task_manager_view->table_model_.get(); 71 return g_task_manager_view->table_model_.get();
71 } 72 }
72 73
73 g_task_manager_view = new TaskManagerView(); 74 g_task_manager_view = new TaskManagerView();
74 75
75 gfx::NativeWindow window = 76 gfx::NativeWindow window =
76 browser ? browser->window()->GetNativeWindow() : nullptr; 77 browser ? browser->window()->GetNativeWindow() : nullptr;
77 #if defined(USE_ASH) 78 #if defined(USE_ASH)
78 if (!window) 79 if (!chrome::IsRunningInMash() && !window)
79 window = ash::wm::GetActiveWindow(); 80 window = ash::wm::GetActiveWindow();
80 #endif 81 #endif
81 82
82 DialogDelegate::CreateDialogWidget(g_task_manager_view, window, nullptr); 83 DialogDelegate::CreateDialogWidget(g_task_manager_view, window, nullptr);
83 g_task_manager_view->InitAlwaysOnTopState(); 84 g_task_manager_view->InitAlwaysOnTopState();
84 85
85 #if defined(OS_WIN) 86 #if defined(OS_WIN)
86 // Set the app id for the task manager to the app id of its parent browser. If 87 // Set the app id for the task manager to the app id of its parent browser. If
87 // no parent is specified, the app id will default to that of the initial 88 // no parent is specified, the app id will default to that of the initial
88 // process. 89 // process.
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 if (!g_browser_process->local_state()) 363 if (!g_browser_process->local_state())
363 return; 364 return;
364 365
365 const base::DictionaryValue* dictionary = 366 const base::DictionaryValue* dictionary =
366 g_browser_process->local_state()->GetDictionary(GetWindowName()); 367 g_browser_process->local_state()->GetDictionary(GetWindowName());
367 if (dictionary) 368 if (dictionary)
368 dictionary->GetBoolean("always_on_top", &is_always_on_top_); 369 dictionary->GetBoolean("always_on_top", &is_always_on_top_);
369 } 370 }
370 371
371 } // namespace task_manager 372 } // namespace task_manager
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate.cc ('k') | chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698