OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 2215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2226 void RenderWidgetHostImpl::Undo() { | 2226 void RenderWidgetHostImpl::Undo() { |
2227 Send(new InputMsg_Undo(GetRoutingID())); | 2227 Send(new InputMsg_Undo(GetRoutingID())); |
2228 RecordAction(base::UserMetricsAction("Undo")); | 2228 RecordAction(base::UserMetricsAction("Undo")); |
2229 } | 2229 } |
2230 | 2230 |
2231 void RenderWidgetHostImpl::Redo() { | 2231 void RenderWidgetHostImpl::Redo() { |
2232 Send(new InputMsg_Redo(GetRoutingID())); | 2232 Send(new InputMsg_Redo(GetRoutingID())); |
2233 RecordAction(base::UserMetricsAction("Redo")); | 2233 RecordAction(base::UserMetricsAction("Redo")); |
2234 } | 2234 } |
2235 | 2235 |
2236 void RenderWidgetHostImpl::Cut() { | |
2237 Send(new InputMsg_Cut(GetRoutingID())); | |
2238 RecordAction(base::UserMetricsAction("Cut")); | |
2239 } | |
2240 | |
2241 void RenderWidgetHostImpl::Copy() { | |
2242 Send(new InputMsg_Copy(GetRoutingID())); | |
2243 RecordAction(base::UserMetricsAction("Copy")); | |
2244 } | |
2245 | |
2246 void RenderWidgetHostImpl::CopyToFindPboard() { | 2236 void RenderWidgetHostImpl::CopyToFindPboard() { |
2247 #if defined(OS_MACOSX) | 2237 #if defined(OS_MACOSX) |
2248 // Windows/Linux don't have the concept of a find pasteboard. | 2238 // Windows/Linux don't have the concept of a find pasteboard. |
2249 Send(new InputMsg_CopyToFindPboard(GetRoutingID())); | 2239 Send(new InputMsg_CopyToFindPboard(GetRoutingID())); |
2250 RecordAction(base::UserMetricsAction("CopyToFindPboard")); | 2240 RecordAction(base::UserMetricsAction("CopyToFindPboard")); |
2251 #endif | 2241 #endif |
2252 } | 2242 } |
2253 | 2243 |
2254 void RenderWidgetHostImpl::Paste() { | |
2255 Send(new InputMsg_Paste(GetRoutingID())); | |
2256 RecordAction(base::UserMetricsAction("Paste")); | |
2257 } | |
2258 | |
2259 void RenderWidgetHostImpl::PasteAndMatchStyle() { | 2244 void RenderWidgetHostImpl::PasteAndMatchStyle() { |
2260 Send(new InputMsg_PasteAndMatchStyle(GetRoutingID())); | 2245 Send(new InputMsg_PasteAndMatchStyle(GetRoutingID())); |
2261 RecordAction(base::UserMetricsAction("PasteAndMatchStyle")); | 2246 RecordAction(base::UserMetricsAction("PasteAndMatchStyle")); |
2262 } | 2247 } |
2263 | 2248 |
2264 void RenderWidgetHostImpl::Delete() { | 2249 void RenderWidgetHostImpl::Delete() { |
2265 Send(new InputMsg_Delete(GetRoutingID())); | 2250 Send(new InputMsg_Delete(GetRoutingID())); |
2266 RecordAction(base::UserMetricsAction("DeleteSelection")); | 2251 RecordAction(base::UserMetricsAction("DeleteSelection")); |
2267 } | 2252 } |
2268 | 2253 |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2541 } | 2526 } |
2542 } | 2527 } |
2543 | 2528 |
2544 // Add newly generated components into the latency info | 2529 // Add newly generated components into the latency info |
2545 for (lc = new_components.begin(); lc != new_components.end(); ++lc) { | 2530 for (lc = new_components.begin(); lc != new_components.end(); ++lc) { |
2546 latency_info->latency_components[lc->first] = lc->second; | 2531 latency_info->latency_components[lc->first] = lc->second; |
2547 } | 2532 } |
2548 } | 2533 } |
2549 | 2534 |
2550 } // namespace content | 2535 } // namespace content |
OLD | NEW |