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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 1009583004: Add UMA histograms and logging for bad IPC message handling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: actions.xml claims to be pretty printed Created 5 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
OLDNEW
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_view_mac.h" 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h"
6 6
7 #import <objc/runtime.h> 7 #import <objc/runtime.h>
8 #include <OpenGL/gl.h> 8 #include <OpenGL/gl.h>
9 #include <QuartzCore/QuartzCore.h> 9 #include <QuartzCore/QuartzCore.h>
10 10
(...skipping 10 matching lines...) Expand all
21 #include "base/message_loop/message_loop.h" 21 #include "base/message_loop/message_loop.h"
22 #include "base/metrics/histogram.h" 22 #include "base/metrics/histogram.h"
23 #include "base/strings/string_util.h" 23 #include "base/strings/string_util.h"
24 #include "base/strings/stringprintf.h" 24 #include "base/strings/stringprintf.h"
25 #include "base/strings/sys_string_conversions.h" 25 #include "base/strings/sys_string_conversions.h"
26 #include "base/strings/utf_string_conversions.h" 26 #include "base/strings/utf_string_conversions.h"
27 #include "base/sys_info.h" 27 #include "base/sys_info.h"
28 #include "base/trace_event/trace_event.h" 28 #include "base/trace_event/trace_event.h"
29 #import "content/browser/accessibility/browser_accessibility_cocoa.h" 29 #import "content/browser/accessibility/browser_accessibility_cocoa.h"
30 #include "content/browser/accessibility/browser_accessibility_manager_mac.h" 30 #include "content/browser/accessibility/browser_accessibility_manager_mac.h"
31 #include "content/browser/bad_message.h"
31 #import "content/browser/cocoa/system_hotkey_helper_mac.h" 32 #import "content/browser/cocoa/system_hotkey_helper_mac.h"
32 #import "content/browser/cocoa/system_hotkey_map.h" 33 #import "content/browser/cocoa/system_hotkey_map.h"
33 #include "content/browser/compositor/resize_lock.h" 34 #include "content/browser/compositor/resize_lock.h"
34 #include "content/browser/frame_host/frame_tree.h" 35 #include "content/browser/frame_host/frame_tree.h"
35 #include "content/browser/frame_host/frame_tree_node.h" 36 #include "content/browser/frame_host/frame_tree_node.h"
36 #include "content/browser/frame_host/render_frame_host_impl.h" 37 #include "content/browser/frame_host/render_frame_host_impl.h"
37 #include "content/browser/gpu/compositor_util.h" 38 #include "content/browser/gpu/compositor_util.h"
38 #include "content/browser/renderer_host/render_view_host_impl.h" 39 #include "content/browser/renderer_host/render_view_host_impl.h"
39 #include "content/browser/renderer_host/render_widget_helper.h" 40 #include "content/browser/renderer_host/render_widget_helper.h"
40 #import "content/browser/renderer_host/render_widget_host_view_mac_dictionary_he lper.h" 41 #import "content/browser/renderer_host/render_widget_host_view_mac_dictionary_he lper.h"
41 #import "content/browser/renderer_host/render_widget_host_view_mac_editcommand_h elper.h" 42 #import "content/browser/renderer_host/render_widget_host_view_mac_editcommand_h elper.h"
42 #import "content/browser/renderer_host/text_input_client_mac.h" 43 #import "content/browser/renderer_host/text_input_client_mac.h"
43 #include "content/common/accessibility_messages.h" 44 #include "content/common/accessibility_messages.h"
44 #include "content/common/edit_command.h" 45 #include "content/common/edit_command.h"
45 #include "content/common/gpu/gpu_messages.h" 46 #include "content/common/gpu/gpu_messages.h"
46 #include "content/common/input_messages.h" 47 #include "content/common/input_messages.h"
47 #include "content/common/view_messages.h" 48 #include "content/common/view_messages.h"
48 #include "content/common/webplugin_geometry.h" 49 #include "content/common/webplugin_geometry.h"
49 #include "content/public/browser/browser_thread.h" 50 #include "content/public/browser/browser_thread.h"
50 #include "content/public/browser/native_web_keyboard_event.h" 51 #include "content/public/browser/native_web_keyboard_event.h"
51 #include "content/public/browser/notification_service.h" 52 #include "content/public/browser/notification_service.h"
52 #include "content/public/browser/notification_types.h" 53 #include "content/public/browser/notification_types.h"
53 #include "content/public/browser/render_widget_host_view_frame_subscriber.h" 54 #include "content/public/browser/render_widget_host_view_frame_subscriber.h"
54 #import "content/public/browser/render_widget_host_view_mac_delegate.h" 55 #import "content/public/browser/render_widget_host_view_mac_delegate.h"
55 #include "content/public/browser/user_metrics.h"
56 #include "content/public/browser/web_contents.h" 56 #include "content/public/browser/web_contents.h"
57 #include "skia/ext/platform_canvas.h" 57 #include "skia/ext/platform_canvas.h"
58 #include "skia/ext/skia_utils_mac.h" 58 #include "skia/ext/skia_utils_mac.h"
59 #include "third_party/WebKit/public/platform/WebScreenInfo.h" 59 #include "third_party/WebKit/public/platform/WebScreenInfo.h"
60 #include "third_party/WebKit/public/web/WebInputEvent.h" 60 #include "third_party/WebKit/public/web/WebInputEvent.h"
61 #include "third_party/WebKit/public/web/mac/WebInputEventFactory.h" 61 #include "third_party/WebKit/public/web/mac/WebInputEventFactory.h"
62 #import "third_party/mozilla/ComplexTextInputPanel.h" 62 #import "third_party/mozilla/ComplexTextInputPanel.h"
63 #include "ui/accelerated_widget_mac/io_surface_layer.h" 63 #include "ui/accelerated_widget_mac/io_surface_layer.h"
64 #include "ui/accelerated_widget_mac/surface_handle_types.h" 64 #include "ui/accelerated_widget_mac/surface_handle_types.h"
65 #include "ui/base/cocoa/animation_utils.h" 65 #include "ui/base/cocoa/animation_utils.h"
(...skipping 1402 matching lines...) Expand 10 before | Expand all | Expand 10 after
1468 1468
1469 SendVSyncParametersToRenderer(); 1469 SendVSyncParametersToRenderer();
1470 1470
1471 delegated_frame_host_->SwapDelegatedFrame( 1471 delegated_frame_host_->SwapDelegatedFrame(
1472 output_surface_id, 1472 output_surface_id,
1473 frame->delegated_frame_data.Pass(), 1473 frame->delegated_frame_data.Pass(),
1474 frame->metadata.device_scale_factor, 1474 frame->metadata.device_scale_factor,
1475 frame->metadata.latency_info); 1475 frame->metadata.latency_info);
1476 } else { 1476 } else {
1477 DLOG(ERROR) << "Received unexpected frame type."; 1477 DLOG(ERROR) << "Received unexpected frame type.";
1478 RecordAction( 1478 bad_message::ReceivedBadMessage(render_widget_host_->GetProcess(),
1479 base::UserMetricsAction("BadMessageTerminate_UnexpectedFrameType")); 1479 bad_message::RWHVM_UNEXPECTED_FRAME_TYPE);
1480 render_widget_host_->GetProcess()->ReceivedBadMessage();
1481 } 1480 }
1482 } 1481 }
1483 1482
1484 void RenderWidgetHostViewMac::GetScreenInfo(blink::WebScreenInfo* results) { 1483 void RenderWidgetHostViewMac::GetScreenInfo(blink::WebScreenInfo* results) {
1485 *results = GetWebScreenInfo(GetNativeView()); 1484 *results = GetWebScreenInfo(GetNativeView());
1486 } 1485 }
1487 1486
1488 gfx::Rect RenderWidgetHostViewMac::GetBoundsInRootWindow() { 1487 gfx::Rect RenderWidgetHostViewMac::GetBoundsInRootWindow() {
1489 // TODO(shess): In case of !window, the view has been removed from 1488 // TODO(shess): In case of !window, the view has been removed from
1490 // the view hierarchy because the tab isn't main. Could retrieve 1489 // the view hierarchy because the tab isn't main. Could retrieve
(...skipping 1959 matching lines...) Expand 10 before | Expand all | Expand 10 after
3450 3449
3451 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 3450 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
3452 // regions that are not draggable. (See ControlRegionView in 3451 // regions that are not draggable. (See ControlRegionView in
3453 // native_app_window_cocoa.mm). This requires the render host view to be 3452 // native_app_window_cocoa.mm). This requires the render host view to be
3454 // draggable by default. 3453 // draggable by default.
3455 - (BOOL)mouseDownCanMoveWindow { 3454 - (BOOL)mouseDownCanMoveWindow {
3456 return YES; 3455 return YES;
3457 } 3456 }
3458 3457
3459 @end 3458 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698