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

Side by Side Diff: content/browser/renderer_host/render_widget_host.cc

Issue 8205009: Add accessibility stats counter (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 2 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 | « no previous file | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/browser/renderer_host/render_widget_host.h" 5 #include "content/browser/renderer_host/render_widget_host.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "base/metrics/histogram.h" 12 #include "base/metrics/histogram.h"
13 #include "base/metrics/stats_counters.h"
13 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
14 #include "content/browser/accessibility/browser_accessibility_state.h" 15 #include "content/browser/accessibility/browser_accessibility_state.h"
15 #include "content/browser/gpu/gpu_process_host.h" 16 #include "content/browser/gpu/gpu_process_host.h"
16 #include "content/browser/renderer_host/backing_store.h" 17 #include "content/browser/renderer_host/backing_store.h"
17 #include "content/browser/renderer_host/backing_store_manager.h" 18 #include "content/browser/renderer_host/backing_store_manager.h"
18 #include "content/browser/renderer_host/render_process_host.h" 19 #include "content/browser/renderer_host/render_process_host.h"
19 #include "content/browser/renderer_host/render_widget_helper.h" 20 #include "content/browser/renderer_host/render_widget_helper.h"
20 #include "content/browser/renderer_host/render_widget_host_view.h" 21 #include "content/browser/renderer_host/render_widget_host_view.h"
21 #include "content/browser/user_metrics.h" 22 #include "content/browser/user_metrics.h"
22 #include "content/common/content_switches.h" 23 #include "content/common/content_switches.h"
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 1228
1228 void RenderWidgetHost::EnableRendererAccessibility() { 1229 void RenderWidgetHost::EnableRendererAccessibility() {
1229 if (renderer_accessible_) 1230 if (renderer_accessible_)
1230 return; 1231 return;
1231 1232
1232 if (CommandLine::ForCurrentProcess()->HasSwitch( 1233 if (CommandLine::ForCurrentProcess()->HasSwitch(
1233 switches::kDisableRendererAccessibility)) { 1234 switches::kDisableRendererAccessibility)) {
1234 return; 1235 return;
1235 } 1236 }
1236 1237
1238 SIMPLE_STATS_COUNTER("Accessibility.SessionCount");
1237 renderer_accessible_ = true; 1239 renderer_accessible_ = true;
1238 1240
1239 if (process_->HasConnection()) { 1241 if (process_->HasConnection()) {
1240 // Renderer accessibility wasn't enabled on process launch. Enable it now. 1242 // Renderer accessibility wasn't enabled on process launch. Enable it now.
1241 Send(new ViewMsg_EnableAccessibility(routing_id())); 1243 Send(new ViewMsg_EnableAccessibility(routing_id()));
1242 } 1244 }
1243 } 1245 }
1244 1246
1245 void RenderWidgetHost::ProcessKeyboardEventAck(int type, bool processed) { 1247 void RenderWidgetHost::ProcessKeyboardEventAck(int type, bool processed) {
1246 if (key_queue_.empty()) { 1248 if (key_queue_.empty()) {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 1369
1368 void RenderWidgetHost::Delete() { 1370 void RenderWidgetHost::Delete() {
1369 Send(new ViewMsg_Delete(routing_id())); 1371 Send(new ViewMsg_Delete(routing_id()));
1370 UserMetrics::RecordAction(UserMetricsAction("DeleteSelection")); 1372 UserMetrics::RecordAction(UserMetricsAction("DeleteSelection"));
1371 } 1373 }
1372 1374
1373 void RenderWidgetHost::SelectAll() { 1375 void RenderWidgetHost::SelectAll() {
1374 Send(new ViewMsg_SelectAll(routing_id())); 1376 Send(new ViewMsg_SelectAll(routing_id()));
1375 UserMetrics::RecordAction(UserMetricsAction("SelectAll")); 1377 UserMetrics::RecordAction(UserMetricsAction("SelectAll"));
1376 } 1378 }
1377
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698