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

Side by Side Diff: chrome/browser/chrome_browser_application_mac.mm

Issue 2566443002: mac: Add tracing for -[BrowserCrApplication sendEvent:]. (Closed)
Patch Set: missing include. Created 4 years 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
« 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) 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 #import "chrome/browser/chrome_browser_application_mac.h" 5 #import "chrome/browser/chrome_browser_application_mac.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/crash_logging.h" 9 #include "base/debug/crash_logging.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/mac/call_with_eh_frame.h" 11 #include "base/mac/call_with_eh_frame.h"
12 #include "base/strings/stringprintf.h" 12 #include "base/strings/stringprintf.h"
13 #include "base/strings/sys_string_conversions.h" 13 #include "base/strings/sys_string_conversions.h"
14 #include "base/trace_event/trace_event.h"
14 #import "chrome/browser/app_controller_mac.h" 15 #import "chrome/browser/app_controller_mac.h"
15 #import "chrome/browser/mac/exception_processor.h" 16 #import "chrome/browser/mac/exception_processor.h"
16 #include "chrome/common/chrome_switches.h" 17 #include "chrome/common/chrome_switches.h"
17 #include "chrome/common/crash_keys.h" 18 #include "chrome/common/crash_keys.h"
18 #import "components/crash/core/common/objc_zombie.h" 19 #import "components/crash/core/common/objc_zombie.h"
19 #include "content/public/browser/browser_accessibility_state.h" 20 #include "content/public/browser/browser_accessibility_state.h"
20 21
21 namespace chrome_browser_application_mac { 22 namespace chrome_browser_application_mac {
22 23
23 void RegisterBrowserCrApp() { 24 void RegisterBrowserCrApp() {
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 247
247 - (BOOL)isHandlingSendEvent { 248 - (BOOL)isHandlingSendEvent {
248 return handlingSendEvent_; 249 return handlingSendEvent_;
249 } 250 }
250 251
251 - (void)setHandlingSendEvent:(BOOL)handlingSendEvent { 252 - (void)setHandlingSendEvent:(BOOL)handlingSendEvent {
252 handlingSendEvent_ = handlingSendEvent; 253 handlingSendEvent_ = handlingSendEvent;
253 } 254 }
254 255
255 - (void)sendEvent:(NSEvent*)event { 256 - (void)sendEvent:(NSEvent*)event {
257 TRACE_EVENT0("toplevel", "BrowserCrApplication::sendEvent");
256 base::debug::ScopedCrashKey crash_key( 258 base::debug::ScopedCrashKey crash_key(
257 crash_keys::mac::kNSEvent, base::SysNSStringToUTF8([event description])); 259 crash_keys::mac::kNSEvent, base::SysNSStringToUTF8([event description]));
258 260
259 base::mac::CallWithEHFrame(^{ 261 base::mac::CallWithEHFrame(^{
260 switch (event.type) { 262 switch (event.type) {
261 case NSLeftMouseDown: 263 case NSLeftMouseDown:
262 case NSRightMouseDown: { 264 case NSRightMouseDown: {
263 // In kiosk mode, we want to prevent context menus from appearing, 265 // In kiosk mode, we want to prevent context menus from appearing,
264 // so simply discard menu-generating events instead of passing them 266 // so simply discard menu-generating events instead of passing them
265 // along. 267 // along.
(...skipping 28 matching lines...) Expand all
294 - (void)_cycleWindowsReversed:(BOOL)arg1 { 296 - (void)_cycleWindowsReversed:(BOOL)arg1 {
295 base::AutoReset<BOOL> pin(&cyclingWindows_, YES); 297 base::AutoReset<BOOL> pin(&cyclingWindows_, YES);
296 [super _cycleWindowsReversed:arg1]; 298 [super _cycleWindowsReversed:arg1];
297 } 299 }
298 300
299 - (BOOL)isCyclingWindows { 301 - (BOOL)isCyclingWindows {
300 return cyclingWindows_; 302 return cyclingWindows_;
301 } 303 }
302 304
303 @end 305 @end
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