diff options
author | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-06 21:50:31 +0000 |
---|---|---|
committer | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-06 21:50:31 +0000 |
commit | 2bd808c38a91cf5d12a8baabe9dfe88a3764dcec (patch) | |
tree | 149e04a4896890668e0145798a7c488af67372eb /content/renderer/renderer_main_platform_delegate_mac.mm | |
parent | 91492501f81f478643307bd16c1a504faf499500 (diff) | |
download | chromium_src-2bd808c38a91cf5d12a8baabe9dfe88a3764dcec.zip chromium_src-2bd808c38a91cf5d12a8baabe9dfe88a3764dcec.tar.gz chromium_src-2bd808c38a91cf5d12a8baabe9dfe88a3764dcec.tar.bz2 |
Add two crash keys for debugging to record Text Input Services information in the renderer.
BUG=152566
Review URL: https://chromiumcodereview.appspot.com/11363106
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166275 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/renderer_main_platform_delegate_mac.mm')
-rw-r--r-- | content/renderer/renderer_main_platform_delegate_mac.mm | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/content/renderer/renderer_main_platform_delegate_mac.mm b/content/renderer/renderer_main_platform_delegate_mac.mm index 0bc1060..03957a9 100644 --- a/content/renderer/renderer_main_platform_delegate_mac.mm +++ b/content/renderer/renderer_main_platform_delegate_mac.mm @@ -4,11 +4,15 @@ #include "content/renderer/renderer_main_platform_delegate.h" +#include <Carbon/Carbon.h> #import <Cocoa/Cocoa.h> #include <objc/runtime.h> #include "base/command_line.h" #include "base/logging.h" +#import "base/mac/foundation_util.h" +#import "base/mac/crash_logging.h" +#include "base/mac/scoped_cftyperef.h" #include "base/sys_string_conversions.h" #include "content/common/sandbox_mac.h" #include "content/public/common/content_switches.h" @@ -39,6 +43,19 @@ void RendererMainPlatformDelegate::PlatformInitialize() { toTarget:string withObject:nil]; } + + // Debugging for http://crbug.com/152566 + base::mac::ScopedCFTypeRef<TISInputSourceRef> input_source( + TISCopyCurrentKeyboardInputSource()); + base::mac::ScopedCFTypeRef<CFStringRef> description( + CFCopyDescription(input_source)); + base::mac::SetCrashKeyValue(@"tis_input_source", + base::mac::CFToNSCast(description)); + + input_source.reset(TISCopyCurrentKeyboardLayoutInputSource()); + description.reset(CFCopyDescription(input_source)); + base::mac::SetCrashKeyValue(@"tis_layout_source", + base::mac::CFToNSCast(description)); } void RendererMainPlatformDelegate::PlatformUninitialize() { |