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

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

Issue 273423004: Migrate accessibility from RenderView to RenderFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix more compile errors Created 6 years, 7 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) 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 <QuartzCore/QuartzCore.h> 8 #include <QuartzCore/QuartzCore.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 2044 matching lines...) Expand 10 before | Expand all | Expand 10 after
2055 helper.ShowDefinitionForSelection(); 2055 helper.ShowDefinitionForSelection();
2056 } 2056 }
2057 2057
2058 void RenderWidgetHostViewMac::SetBackground(const SkBitmap& background) { 2058 void RenderWidgetHostViewMac::SetBackground(const SkBitmap& background) {
2059 RenderWidgetHostViewBase::SetBackground(background); 2059 RenderWidgetHostViewBase::SetBackground(background);
2060 if (render_widget_host_) 2060 if (render_widget_host_)
2061 render_widget_host_->Send(new ViewMsg_SetBackground( 2061 render_widget_host_->Send(new ViewMsg_SetBackground(
2062 render_widget_host_->GetRoutingID(), background)); 2062 render_widget_host_->GetRoutingID(), background));
2063 } 2063 }
2064 2064
2065 void RenderWidgetHostViewMac::CreateBrowserAccessibilityManagerIfNeeded() { 2065 void RenderWidgetHostViewMac::CreateBrowserAccessibilityManagerIfNeeded(
2066 BrowserAccessibilityDelegate* delegate) {
2066 if (!GetBrowserAccessibilityManager()) { 2067 if (!GetBrowserAccessibilityManager()) {
2067 SetBrowserAccessibilityManager( 2068 SetBrowserAccessibilityManager(
2068 new BrowserAccessibilityManagerMac( 2069 new BrowserAccessibilityManagerMac(
2069 cocoa_view_, 2070 cocoa_view_,
2070 BrowserAccessibilityManagerMac::GetEmptyDocument(), 2071 BrowserAccessibilityManagerMac::GetEmptyDocument(),
2071 render_widget_host_)); 2072 delegate));
2072 } 2073 }
2073 } 2074 }
2074 2075
2075 gfx::Point RenderWidgetHostViewMac::AccessibilityOriginInScreen( 2076 gfx::Point RenderWidgetHostViewMac::AccessibilityOriginInScreen(
2076 const gfx::Rect& bounds) { 2077 const gfx::Rect& bounds) {
2077 NSPoint origin = NSMakePoint(bounds.x(), bounds.y()); 2078 NSPoint origin = NSMakePoint(bounds.x(), bounds.y());
2078 NSSize size = NSMakeSize(bounds.width(), bounds.height()); 2079 NSSize size = NSMakeSize(bounds.width(), bounds.height());
2079 origin.y = NSHeight([cocoa_view_ bounds]) - origin.y; 2080 origin.y = NSHeight([cocoa_view_ bounds]) - origin.y;
2080 NSPoint originInWindow = [cocoa_view_ convertPoint:origin toView:nil]; 2081 NSPoint originInWindow = [cocoa_view_ convertPoint:origin toView:nil];
2081 NSPoint originInScreen = 2082 NSPoint originInScreen =
(...skipping 2225 matching lines...) Expand 10 before | Expand all | Expand 10 after
4307 } 4308 }
4308 4309
4309 - (void)disableRendering { 4310 - (void)disableRendering {
4310 // Disable the fade-out animation as the layer is removed. 4311 // Disable the fade-out animation as the layer is removed.
4311 ScopedCAActionDisabler disabler; 4312 ScopedCAActionDisabler disabler;
4312 [self removeFromSuperlayer]; 4313 [self removeFromSuperlayer];
4313 renderWidgetHostView_ = nil; 4314 renderWidgetHostView_ = nil;
4314 } 4315 }
4315 4316
4316 @end // implementation SoftwareLayer 4317 @end // implementation SoftwareLayer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698