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

Side by Side Diff: chrome/browser/chromeos/system_logs/touch_log_source.cc

Issue 17063013: Separate projection mode from rest of touch HUD (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « ash/touch/touch_observer_hud_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "chrome/browser/chromeos/system_logs/touch_log_source.h" 5 #include "chrome/browser/chromeos/system_logs/touch_log_source.h"
6 6
7 #include "ash/touch/touch_observer_hud.h" 7 #include "ash/touch/touch_hud_debug.h"
8 #include "base/json/json_string_value_serializer.h" 8 #include "base/json/json_string_value_serializer.h"
9 #include "chrome/browser/feedback/feedback_util.h" 9 #include "chrome/browser/feedback/feedback_util.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
11 11
12 const char kHUDLogDataKey[] = "hud_log"; 12 const char kHUDLogDataKey[] = "hud_log";
13 13
14 namespace chromeos { 14 namespace chromeos {
15 15
16 TouchLogSource::TouchLogSource() { 16 TouchLogSource::TouchLogSource() {
17 } 17 }
18 18
19 TouchLogSource::~TouchLogSource() { 19 TouchLogSource::~TouchLogSource() {
20 } 20 }
21 21
22 void TouchLogSource::Fetch(const SysLogsSourceCallback& callback) { 22 void TouchLogSource::Fetch(const SysLogsSourceCallback& callback) {
23 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 23 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
24 DCHECK(!callback.is_null()); 24 DCHECK(!callback.is_null());
25 25
26 SystemLogsResponse response; 26 SystemLogsResponse response;
27 scoped_ptr<DictionaryValue> dictionary = 27 scoped_ptr<DictionaryValue> dictionary =
28 ash::internal::TouchObserverHUD::GetAllAsDictionary(); 28 ash::internal::TouchHudDebug::GetAllAsDictionary();
29 if (!dictionary->empty()) { 29 if (!dictionary->empty()) {
30 std::string touch_log; 30 std::string touch_log;
31 JSONStringValueSerializer json(&touch_log); 31 JSONStringValueSerializer json(&touch_log);
32 json.set_pretty_print(true); 32 json.set_pretty_print(true);
33 if (json.Serialize(*dictionary) && !touch_log.empty()) 33 if (json.Serialize(*dictionary) && !touch_log.empty())
34 response[kHUDLogDataKey] = touch_log; 34 response[kHUDLogDataKey] = touch_log;
35 } 35 }
36 callback.Run(&response); 36 callback.Run(&response);
37 } 37 }
38 38
39 } // namespace chromeos 39 } // namespace chromeos
OLDNEW
« no previous file with comments | « ash/touch/touch_observer_hud_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698