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

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

Issue 2095193002: clang-format all of //ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/accelerators/accelerator_table_unittest.cc ('k') | ash/accelerators/exit_warning_handler.h » ('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/accelerators/debug_commands.h" 5 #include "ash/accelerators/debug_commands.h"
6 6
7 #include "ash/accelerators/accelerator_commands.h" 7 #include "ash/accelerators/accelerator_commands.h"
8 #include "ash/common/ash_switches.h" 8 #include "ash/common/ash_switches.h"
9 #include "ash/debug.h" 9 #include "ash/debug.h"
10 #include "ash/desktop_background/desktop_background_controller.h" 10 #include "ash/desktop_background/desktop_background_controller.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 int indent, 60 int indent,
61 std::ostringstream* out) { 61 std::ostringstream* out) {
62 std::string indent_str(indent, ' '); 62 std::string indent_str(indent, ' ');
63 std::string name(window->name()); 63 std::string name(window->name());
64 if (name.empty()) 64 if (name.empty())
65 name = "\"\""; 65 name = "\"\"";
66 *out << indent_str << name << " (" << window << ")" 66 *out << indent_str << name << " (" << window << ")"
67 << " type=" << window->type() 67 << " type=" << window->type()
68 << (wm::IsActiveWindow(window) ? " [active] " : " ") 68 << (wm::IsActiveWindow(window) ? " [active] " : " ")
69 << (window->IsVisible() ? " visible " : " ") 69 << (window->IsVisible() ? " visible " : " ")
70 << window->bounds().ToString() 70 << window->bounds().ToString() << '\n';
71 << '\n';
72 71
73 for (size_t i = 0; i < window->children().size(); ++i) 72 for (size_t i = 0; i < window->children().size(); ++i)
74 PrintWindowHierarchy(window->children()[i], indent + 3, out); 73 PrintWindowHierarchy(window->children()[i], indent + 3, out);
75 } 74 }
76 75
77 void HandlePrintWindowHierarchy() { 76 void HandlePrintWindowHierarchy() {
78 Shell::RootWindowControllerList controllers = 77 Shell::RootWindowControllerList controllers =
79 Shell::GetAllRootWindowControllers(); 78 Shell::GetAllRootWindowControllers();
80 for (size_t i = 0; i < controllers.size(); ++i) { 79 for (size_t i = 0; i < controllers.size(); ++i) {
81 std::ostringstream out; 80 std::ostringstream out;
(...skipping 19 matching lines...) Expand all
101 canvas.DrawRoundRect(gfx::Rect(image_size), 100, paint); 100 canvas.DrawRoundRect(gfx::Rect(image_size), 100, paint);
102 return gfx::ImageSkia(canvas.ExtractImageRep()); 101 return gfx::ImageSkia(canvas.ExtractImageRep());
103 } 102 }
104 103
105 void HandleToggleDesktopBackgroundMode() { 104 void HandleToggleDesktopBackgroundMode() {
106 static int index = 0; 105 static int index = 0;
107 DesktopBackgroundController* desktop_background_controller = 106 DesktopBackgroundController* desktop_background_controller =
108 Shell::GetInstance()->desktop_background_controller(); 107 Shell::GetInstance()->desktop_background_controller();
109 switch (++index % 4) { 108 switch (++index % 4) {
110 case 0: 109 case 0:
111 ash::Shell::GetInstance()->user_wallpaper_delegate()-> 110 ash::Shell::GetInstance()
112 InitializeWallpaper(); 111 ->user_wallpaper_delegate()
112 ->InitializeWallpaper();
113 break; 113 break;
114 case 1: 114 case 1:
115 desktop_background_controller->SetWallpaperImage( 115 desktop_background_controller->SetWallpaperImage(
116 CreateWallpaperImage(SK_ColorRED, SK_ColorBLUE), 116 CreateWallpaperImage(SK_ColorRED, SK_ColorBLUE),
117 wallpaper::WALLPAPER_LAYOUT_STRETCH); 117 wallpaper::WALLPAPER_LAYOUT_STRETCH);
118 break; 118 break;
119 case 2: 119 case 2:
120 desktop_background_controller->SetWallpaperImage( 120 desktop_background_controller->SetWallpaperImage(
121 CreateWallpaperImage(SK_ColorBLUE, SK_ColorGREEN), 121 CreateWallpaperImage(SK_ColorBLUE, SK_ColorGREEN),
122 wallpaper::WALLPAPER_LAYOUT_CENTER); 122 wallpaper::WALLPAPER_LAYOUT_CENTER);
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 case DEBUG_TOGGLE_SHOW_PAINT_RECTS: 222 case DEBUG_TOGGLE_SHOW_PAINT_RECTS:
223 ToggleShowPaintRects(); 223 ToggleShowPaintRects();
224 break; 224 break;
225 default: 225 default:
226 break; 226 break;
227 } 227 }
228 } 228 }
229 229
230 } // namespace debug 230 } // namespace debug
231 } // namespace ash 231 } // namespace ash
OLDNEW
« no previous file with comments | « ash/accelerators/accelerator_table_unittest.cc ('k') | ash/accelerators/exit_warning_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698