summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-30 04:10:50 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-30 04:10:50 +0000
commit45b946a1e2146cdd5362eb1062f63916ca86ff38 (patch)
tree6988eb1b8a1181dc6f452cec1cbcf0091dc6326f
parent67554a12c20a2dea6506b38add9b8e7f65d3b0e3 (diff)
downloadchromium_src-45b946a1e2146cdd5362eb1062f63916ca86ff38.zip
chromium_src-45b946a1e2146cdd5362eb1062f63916ca86ff38.tar.gz
chromium_src-45b946a1e2146cdd5362eb1062f63916ca86ff38.tar.bz2
[Mac] Breakpad key for custom cursor size.
Previous CL indicated that the crash was a custom cursor with no image data. To inform the fix, log new info to determine if the size is zero, or something else. BUG=73356 TEST=Watch crash server. Review URL: http://codereview.chromium.org/7281024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91087 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_mac.mm13
-rw-r--r--webkit/glue/webcursor.h2
2 files changed, 10 insertions, 5 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.mm b/chrome/browser/renderer_host/render_widget_host_view_mac.mm
index d7d19cf..8b12cf0 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac.mm
@@ -43,6 +43,7 @@
#import "third_party/mozilla/ComplexTextInputPanel.h"
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/mac/WebInputEventFactory.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
#include "ui/gfx/point.h"
#include "ui/gfx/surface/io_surface_support_mac.h"
@@ -482,10 +483,14 @@ void RenderWidgetHostViewMac::UpdateCursorIfNecessary() {
// TODO(shess): Store additional information in breakpad dumps for
// debugging http://crbug.com/73356 .
- NSString* kCrashKey = @"cursor-type";
- NSString* crashValue =
- [NSString stringWithFormat:@"%d", current_cursor_.type()];
- ScopedCrashKey key(kCrashKey, crashValue);
+ scoped_ptr<ScopedCrashKey> key;
+ if (current_cursor_.IsCustom()) {
+ NSString* kCrashKey = @"custom-cursor-size";
+ const gfx::Size size = current_cursor_.custom_size();
+ NSString* crashValue =
+ [NSString stringWithFormat:@"{%d, %d}", size.width(), size.height()];
+ key.reset(new ScopedCrashKey(kCrashKey, crashValue));
+ }
NSCursor* ns_cursor = current_cursor_.GetCursor();
[ns_cursor set];
diff --git a/webkit/glue/webcursor.h b/webkit/glue/webcursor.h
index a931c23..9b2b420 100644
--- a/webkit/glue/webcursor.h
+++ b/webkit/glue/webcursor.h
@@ -104,7 +104,7 @@ class WebCursor {
void InitFromNSCursor(NSCursor* cursor);
// TODO(shess): Temporary accessor for debugging http://crbug.com/73356 .
- int type() const { return type_; }
+ const gfx::Size& custom_size() const { return custom_size_; }
#endif
private: