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

Side by Side Diff: ash/touch/touch_hud_debug.cc

Issue 2773513002: Stop passing raw pointers to DictionaryValue::Set, part 1 (Closed)
Patch Set: Fix compilation Created 3 years, 9 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 | « no previous file | base/value_conversions.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/touch/touch_hud_debug.h" 5 #include "ash/touch/touch_hud_debug.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility>
9 #include <vector> 10 #include <vector>
10 11
11 #include "ash/root_window_controller.h" 12 #include "ash/root_window_controller.h"
12 #include "ash/shell.h" 13 #include "ash/shell.h"
13 #include "base/json/json_string_value_serializer.h" 14 #include "base/json/json_string_value_serializer.h"
14 #include "base/strings/string_number_conversions.h" 15 #include "base/strings/string_number_conversions.h"
15 #include "base/strings/stringprintf.h" 16 #include "base/strings/stringprintf.h"
16 #include "base/strings/utf_string_conversions.h" 17 #include "base/strings/utf_string_conversions.h"
17 #include "third_party/skia/include/core/SkPath.h" 18 #include "third_party/skia/include/core/SkPath.h"
18 #include "ui/aura/window_event_dispatcher.h" 19 #include "ui/aura/window_event_dispatcher.h"
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 std::unique_ptr<base::DictionaryValue> TouchHudDebug::GetAllAsDictionary() { 357 std::unique_ptr<base::DictionaryValue> TouchHudDebug::GetAllAsDictionary() {
357 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); 358 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue());
358 aura::Window::Windows roots = Shell::GetInstance()->GetAllRootWindows(); 359 aura::Window::Windows roots = Shell::GetInstance()->GetAllRootWindows();
359 for (aura::Window::Windows::iterator iter = roots.begin(); 360 for (aura::Window::Windows::iterator iter = roots.begin();
360 iter != roots.end(); ++iter) { 361 iter != roots.end(); ++iter) {
361 RootWindowController* controller = GetRootWindowController(*iter); 362 RootWindowController* controller = GetRootWindowController(*iter);
362 TouchHudDebug* hud = controller->touch_hud_debug(); 363 TouchHudDebug* hud = controller->touch_hud_debug();
363 if (hud) { 364 if (hud) {
364 std::unique_ptr<base::ListValue> list = hud->GetLogAsList(); 365 std::unique_ptr<base::ListValue> list = hud->GetLogAsList();
365 if (!list->empty()) 366 if (!list->empty())
366 value->Set(base::Int64ToString(hud->display_id()), list.release()); 367 value->Set(base::Int64ToString(hud->display_id()), std::move(list));
367 } 368 }
368 } 369 }
369 return value; 370 return value;
370 } 371 }
371 372
372 void TouchHudDebug::ChangeToNextMode() { 373 void TouchHudDebug::ChangeToNextMode() {
373 switch (mode_) { 374 switch (mode_) {
374 case FULLSCREEN: 375 case FULLSCREEN:
375 SetMode(REDUCED_SCALE); 376 SetMode(REDUCED_SCALE);
376 break; 377 break;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 RootWindowController* controller) { 464 RootWindowController* controller) {
464 controller->set_touch_hud_debug(this); 465 controller->set_touch_hud_debug(this);
465 } 466 }
466 467
467 void TouchHudDebug::UnsetHudForRootWindowController( 468 void TouchHudDebug::UnsetHudForRootWindowController(
468 RootWindowController* controller) { 469 RootWindowController* controller) {
469 controller->set_touch_hud_debug(NULL); 470 controller->set_touch_hud_debug(NULL);
470 } 471 }
471 472
472 } // namespace ash 473 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | base/value_conversions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698