| 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/bind.h" | 10 #include "base/bind.h" |
| (...skipping 1839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1850 helper.ShowDefinitionForSelection(); | 1850 helper.ShowDefinitionForSelection(); |
| 1851 } | 1851 } |
| 1852 | 1852 |
| 1853 void RenderWidgetHostViewMac::SetBackground(const SkBitmap& background) { | 1853 void RenderWidgetHostViewMac::SetBackground(const SkBitmap& background) { |
| 1854 RenderWidgetHostViewBase::SetBackground(background); | 1854 RenderWidgetHostViewBase::SetBackground(background); |
| 1855 if (render_widget_host_) | 1855 if (render_widget_host_) |
| 1856 render_widget_host_->Send(new ViewMsg_SetBackground( | 1856 render_widget_host_->Send(new ViewMsg_SetBackground( |
| 1857 render_widget_host_->GetRoutingID(), background)); | 1857 render_widget_host_->GetRoutingID(), background)); |
| 1858 } | 1858 } |
| 1859 | 1859 |
| 1860 void RenderWidgetHostViewMac::OnAccessibilityNotifications( | 1860 void RenderWidgetHostViewMac::OnAccessibilityEvents( |
| 1861 const std::vector<AccessibilityHostMsg_NotificationParams>& params) { | 1861 const std::vector<AccessibilityHostMsg_EventParams>& params) { |
| 1862 if (!GetBrowserAccessibilityManager()) { | 1862 if (!GetBrowserAccessibilityManager()) { |
| 1863 SetBrowserAccessibilityManager( | 1863 SetBrowserAccessibilityManager( |
| 1864 new BrowserAccessibilityManagerMac( | 1864 new BrowserAccessibilityManagerMac( |
| 1865 cocoa_view_, | 1865 cocoa_view_, |
| 1866 BrowserAccessibilityManagerMac::GetEmptyDocument(), | 1866 BrowserAccessibilityManagerMac::GetEmptyDocument(), |
| 1867 NULL)); | 1867 NULL)); |
| 1868 } | 1868 } |
| 1869 GetBrowserAccessibilityManager()->OnAccessibilityNotifications(params); | 1869 GetBrowserAccessibilityManager()->OnAccessibilityEvents(params); |
| 1870 } | 1870 } |
| 1871 | 1871 |
| 1872 void RenderWidgetHostViewMac::SetTextInputActive(bool active) { | 1872 void RenderWidgetHostViewMac::SetTextInputActive(bool active) { |
| 1873 if (active) { | 1873 if (active) { |
| 1874 if (text_input_type_ == ui::TEXT_INPUT_TYPE_PASSWORD) | 1874 if (text_input_type_ == ui::TEXT_INPUT_TYPE_PASSWORD) |
| 1875 EnablePasswordInput(); | 1875 EnablePasswordInput(); |
| 1876 else | 1876 else |
| 1877 DisablePasswordInput(); | 1877 DisablePasswordInput(); |
| 1878 } else { | 1878 } else { |
| 1879 if (text_input_type_ == ui::TEXT_INPUT_TYPE_PASSWORD) | 1879 if (text_input_type_ == ui::TEXT_INPUT_TYPE_PASSWORD) |
| (...skipping 1965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3845 return YES; | 3845 return YES; |
| 3846 } | 3846 } |
| 3847 | 3847 |
| 3848 - (BOOL)isOpaque { | 3848 - (BOOL)isOpaque { |
| 3849 if (renderWidgetHostView_->use_core_animation_) | 3849 if (renderWidgetHostView_->use_core_animation_) |
| 3850 return YES; | 3850 return YES; |
| 3851 return [super isOpaque]; | 3851 return [super isOpaque]; |
| 3852 } | 3852 } |
| 3853 | 3853 |
| 3854 @end | 3854 @end |
| OLD | NEW |