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

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

Issue 9030032: Get rid of a bunch of tab_contents.h includes from chrome. These are all trivial changes to use W... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix cros Created 8 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #import "base/logging.h" 7 #import "base/logging.h"
8 #include "base/mac/crash_logging.h" 8 #include "base/mac/crash_logging.h"
9 #import "base/mac/scoped_nsexception_enabler.h" 9 #import "base/mac/scoped_nsexception_enabler.h"
10 #import "base/metrics/histogram.h" 10 #import "base/metrics/histogram.h"
11 #import "base/memory/scoped_nsobject.h" 11 #import "base/memory/scoped_nsobject.h"
12 #import "base/sys_string_conversions.h" 12 #import "base/sys_string_conversions.h"
13 #import "chrome/browser/app_controller_mac.h" 13 #import "chrome/browser/app_controller_mac.h"
14 #include "chrome/browser/ui/browser_list.h" 14 #include "chrome/browser/ui/browser_list.h"
15 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 15 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
16 #import "chrome/common/mac/objc_method_swizzle.h" 16 #import "chrome/common/mac/objc_method_swizzle.h"
17 #import "chrome/common/mac/objc_zombie.h" 17 #import "chrome/common/mac/objc_zombie.h"
18 #include "content/browser/accessibility/browser_accessibility_state.h" 18 #include "content/browser/accessibility/browser_accessibility_state.h"
19 #include "content/browser/renderer_host/render_view_host.h" 19 #include "content/browser/renderer_host/render_view_host.h"
20 #include "content/browser/tab_contents/tab_contents.h" 20 #include "content/public/browser/web_contents.h"
21 21
22 // The implementation of NSExceptions break various assumptions in the 22 // The implementation of NSExceptions break various assumptions in the
23 // Chrome code. This category defines a replacement for 23 // Chrome code. This category defines a replacement for
24 // -initWithName:reason:userInfo: for purposes of forcing a break in 24 // -initWithName:reason:userInfo: for purposes of forcing a break in
25 // the debugger when an exception is raised. -raise sounds more 25 // the debugger when an exception is raised. -raise sounds more
26 // obvious to intercept, but it doesn't catch the original throw 26 // obvious to intercept, but it doesn't catch the original throw
27 // because the objc runtime doesn't use it. 27 // because the objc runtime doesn't use it.
28 @interface NSException (CrNSExceptionSwizzle) 28 @interface NSException (CrNSExceptionSwizzle)
29 - (id)crInitWithName:(NSString*)aName 29 - (id)crInitWithName:(NSString*)aName
30 reason:(NSString*)aReason 30 reason:(NSString*)aReason
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 472
473 - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute { 473 - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute {
474 if ([attribute isEqualToString:@"AXEnhancedUserInterface"] && 474 if ([attribute isEqualToString:@"AXEnhancedUserInterface"] &&
475 [value intValue] == 1) { 475 [value intValue] == 1) {
476 BrowserAccessibilityState::GetInstance()->OnScreenReaderDetected(); 476 BrowserAccessibilityState::GetInstance()->OnScreenReaderDetected();
477 for (TabContentsIterator it; 477 for (TabContentsIterator it;
478 !it.done(); 478 !it.done();
479 ++it) { 479 ++it) {
480 if (TabContentsWrapper* contents = *it) { 480 if (TabContentsWrapper* contents = *it) {
481 if (RenderViewHost* rvh = 481 if (RenderViewHost* rvh =
482 contents->tab_contents()->GetRenderViewHost()) { 482 contents->web_contents()->GetRenderViewHost()) {
483 rvh->EnableRendererAccessibility(); 483 rvh->EnableRendererAccessibility();
484 } 484 }
485 } 485 }
486 } 486 }
487 } 487 }
488 return [super accessibilitySetValue:value forAttribute:attribute]; 488 return [super accessibilitySetValue:value forAttribute:attribute];
489 } 489 }
490 490
491 @end 491 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698