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

Side by Side Diff: ash/common/accelerators/debug_commands.cc

Issue 2798333005: Moves WmWindow::GetInternalWidget() into a standalone function (Closed)
Patch Set: Created 3 years, 8 months 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
« no previous file with comments | « ash/BUILD.gn ('k') | ash/common/devtools/ash_devtools_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ash/common/accelerators/debug_commands.h" 5 #include "ash/common/accelerators/debug_commands.h"
6 6
7 #include "ash/common/accelerators/accelerator_commands.h" 7 #include "ash/common/accelerators/accelerator_commands.h"
8 #include "ash/common/ash_switches.h" 8 #include "ash/common/ash_switches.h"
9 #include "ash/common/shell_delegate.h" 9 #include "ash/common/shell_delegate.h"
10 #include "ash/common/system/toast/toast_data.h" 10 #include "ash/common/system/toast/toast_data.h"
11 #include "ash/common/system/toast/toast_manager.h" 11 #include "ash/common/system/toast/toast_manager.h"
12 #include "ash/common/wallpaper/wallpaper_controller.h" 12 #include "ash/common/wallpaper/wallpaper_controller.h"
13 #include "ash/common/wallpaper/wallpaper_delegate.h" 13 #include "ash/common/wallpaper/wallpaper_delegate.h"
14 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" 14 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
15 #include "ash/common/wm_shell.h" 15 #include "ash/common/wm_shell.h"
16 #include "ash/common/wm_window.h"
17 #include "ash/root_window_controller.h" 16 #include "ash/root_window_controller.h"
18 #include "ash/shell.h" 17 #include "ash/shell.h"
18 #include "ash/wm/widget_finder.h"
19 #include "ash/wm/window_properties.h" 19 #include "ash/wm/window_properties.h"
20 #include "ash/wm/window_util.h" 20 #include "ash/wm/window_util.h"
21 #include "base/command_line.h" 21 #include "base/command_line.h"
22 #include "base/metrics/user_metrics.h" 22 #include "base/metrics/user_metrics.h"
23 #include "base/metrics/user_metrics_action.h" 23 #include "base/metrics/user_metrics_action.h"
24 #include "base/strings/utf_string_conversions.h" 24 #include "base/strings/utf_string_conversions.h"
25 #include "ui/compositor/debug_utils.h" 25 #include "ui/compositor/debug_utils.h"
26 #include "ui/compositor/layer.h" 26 #include "ui/compositor/layer.h"
27 #include "ui/gfx/canvas.h" 27 #include "ui/gfx/canvas.h"
28 #include "ui/gfx/image/image_skia.h" 28 #include "ui/gfx/image/image_skia.h"
(...skipping 12 matching lines...) Expand all
41 ui::PrintLayerHierarchy( 41 ui::PrintLayerHierarchy(
42 layer, 42 layer,
43 RootWindowController::ForWindow(root)->GetLastMouseLocationInRoot()); 43 RootWindowController::ForWindow(root)->GetLastMouseLocationInRoot());
44 } 44 }
45 } 45 }
46 46
47 void HandlePrintViewHierarchy() { 47 void HandlePrintViewHierarchy() {
48 aura::Window* active_window = wm::GetActiveWindow(); 48 aura::Window* active_window = wm::GetActiveWindow();
49 if (!active_window) 49 if (!active_window)
50 return; 50 return;
51 views::Widget* widget = WmWindow::Get(active_window)->GetInternalWidget(); 51 views::Widget* widget = GetInternalWidgetForWindow(active_window);
52 if (!widget) 52 if (!widget)
53 return; 53 return;
54 views::PrintViewHierarchy(widget->GetRootView()); 54 views::PrintViewHierarchy(widget->GetRootView());
55 } 55 }
56 56
57 void PrintWindowHierarchy(const aura::Window* active_window, 57 void PrintWindowHierarchy(const aura::Window* active_window,
58 aura::Window* window, 58 aura::Window* window,
59 int indent, 59 int indent,
60 std::ostringstream* out) { 60 std::ostringstream* out) {
61 std::string indent_str(indent, ' '); 61 std::string indent_str(indent, ' ');
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 case DEBUG_TRIGGER_CRASH: 211 case DEBUG_TRIGGER_CRASH:
212 HandleTriggerCrash(); 212 HandleTriggerCrash();
213 break; 213 break;
214 default: 214 default:
215 break; 215 break;
216 } 216 }
217 } 217 }
218 218
219 } // namespace debug 219 } // namespace debug
220 } // namespace ash 220 } // namespace ash
OLDNEW
« no previous file with comments | « ash/BUILD.gn ('k') | ash/common/devtools/ash_devtools_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698