Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 2009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2020 if (!EnsureCompositedIOSurface()) | 2020 if (!EnsureCompositedIOSurface()) |
| 2021 GotAcceleratedCompositingError(); | 2021 GotAcceleratedCompositingError(); |
| 2022 } | 2022 } |
| 2023 } | 2023 } |
| 2024 | 2024 |
| 2025 void RenderWidgetHostViewMac::ShowDefinitionForSelection() { | 2025 void RenderWidgetHostViewMac::ShowDefinitionForSelection() { |
| 2026 RenderWidgetHostViewMacDictionaryHelper helper(this); | 2026 RenderWidgetHostViewMacDictionaryHelper helper(this); |
| 2027 helper.ShowDefinitionForSelection(); | 2027 helper.ShowDefinitionForSelection(); |
| 2028 } | 2028 } |
| 2029 | 2029 |
| 2030 void RenderWidgetHostViewMac::SetBackground(const SkBitmap& background) { | 2030 void RenderWidgetHostViewMac::SetBackgroundOpaque(bool opaque) { |
| 2031 RenderWidgetHostViewBase::SetBackground(background); | 2031 RenderWidgetHostViewBase::SetBackgroundOpaque(opaque); |
| 2032 if (render_widget_host_) | 2032 if (render_widget_host_) |
| 2033 render_widget_host_->Send(new ViewMsg_SetBackground( | 2033 render_widget_host_->Send(new ViewMsg_SetBackgroundOpaque( |
|
piman
2014/05/07 00:29:56
nit: same here, render_widget_host_->SetBackground
danakj
2014/05/07 17:08:17
Done.
| |
| 2034 render_widget_host_->GetRoutingID(), background)); | 2034 render_widget_host_->GetRoutingID(), opaque)); |
| 2035 } | 2035 } |
| 2036 | 2036 |
| 2037 void RenderWidgetHostViewMac::CreateBrowserAccessibilityManagerIfNeeded() { | 2037 void RenderWidgetHostViewMac::CreateBrowserAccessibilityManagerIfNeeded() { |
| 2038 if (!GetBrowserAccessibilityManager()) { | 2038 if (!GetBrowserAccessibilityManager()) { |
| 2039 SetBrowserAccessibilityManager( | 2039 SetBrowserAccessibilityManager( |
| 2040 new BrowserAccessibilityManagerMac( | 2040 new BrowserAccessibilityManagerMac( |
| 2041 cocoa_view_, | 2041 cocoa_view_, |
| 2042 BrowserAccessibilityManagerMac::GetEmptyDocument(), | 2042 BrowserAccessibilityManagerMac::GetEmptyDocument(), |
| 2043 render_widget_host_)); | 2043 render_widget_host_)); |
| 2044 } | 2044 } |
| (...skipping 2234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4279 } | 4279 } |
| 4280 | 4280 |
| 4281 - (void)disableRendering { | 4281 - (void)disableRendering { |
| 4282 // Disable the fade-out animation as the layer is removed. | 4282 // Disable the fade-out animation as the layer is removed. |
| 4283 ScopedCAActionDisabler disabler; | 4283 ScopedCAActionDisabler disabler; |
| 4284 [self removeFromSuperlayer]; | 4284 [self removeFromSuperlayer]; |
| 4285 renderWidgetHostView_ = nil; | 4285 renderWidgetHostView_ = nil; |
| 4286 } | 4286 } |
| 4287 | 4287 |
| 4288 @end // implementation SoftwareLayer | 4288 @end // implementation SoftwareLayer |
| OLD | NEW |