OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ui/views/cocoa/bridged_native_widget.h" | 5 #import "ui/views/cocoa/bridged_native_widget.h" |
6 | 6 |
7 #import <objc/runtime.h> | 7 #import <objc/runtime.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
587 void BridgedNativeWidget::OnDidChangeFocus(View* focused_before, | 587 void BridgedNativeWidget::OnDidChangeFocus(View* focused_before, |
588 View* focused_now) { | 588 View* focused_now) { |
589 ui::TextInputClient* input_client = | 589 ui::TextInputClient* input_client = |
590 focused_now ? focused_now->GetTextInputClient() : NULL; | 590 focused_now ? focused_now->GetTextInputClient() : NULL; |
591 [bridged_view_ setTextInputClient:input_client]; | 591 [bridged_view_ setTextInputClient:input_client]; |
592 } | 592 } |
593 | 593 |
594 //////////////////////////////////////////////////////////////////////////////// | 594 //////////////////////////////////////////////////////////////////////////////// |
595 // BridgedNativeWidget, LayerDelegate: | 595 // BridgedNativeWidget, LayerDelegate: |
596 | 596 |
597 void BridgedNativeWidget::OnPaintLayer(gfx::Canvas* canvas) { | 597 void BridgedNativeWidget::OnPaintLayer(const ui::PaintContext& context) { |
598 DCHECK(window_visible_); | 598 DCHECK(window_visible_); |
599 native_widget_mac_->GetWidget()->OnNativeWidgetPaint(canvas); | 599 native_widget_mac_->GetWidget()->OnNativeWidgetPaint(context); |
600 } | 600 } |
601 | 601 |
602 void BridgedNativeWidget::OnDelegatedFrameDamage( | 602 void BridgedNativeWidget::OnDelegatedFrameDamage( |
603 const gfx::Rect& damage_rect_in_dip) { | 603 const gfx::Rect& damage_rect_in_dip) { |
604 NOTIMPLEMENTED(); | 604 NOTIMPLEMENTED(); |
605 } | 605 } |
606 | 606 |
607 void BridgedNativeWidget::OnDeviceScaleFactorChanged( | 607 void BridgedNativeWidget::OnDeviceScaleFactorChanged( |
608 float device_scale_factor) { | 608 float device_scale_factor) { |
609 NOTIMPLEMENTED(); | 609 NOTIMPLEMENTED(); |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
802 window_, &kWindowPropertiesKey); | 802 window_, &kWindowPropertiesKey); |
803 if (!properties) { | 803 if (!properties) { |
804 properties = [NSMutableDictionary dictionary]; | 804 properties = [NSMutableDictionary dictionary]; |
805 objc_setAssociatedObject(window_, &kWindowPropertiesKey, | 805 objc_setAssociatedObject(window_, &kWindowPropertiesKey, |
806 properties, OBJC_ASSOCIATION_RETAIN); | 806 properties, OBJC_ASSOCIATION_RETAIN); |
807 } | 807 } |
808 return properties; | 808 return properties; |
809 } | 809 } |
810 | 810 |
811 } // namespace views | 811 } // namespace views |
OLD | NEW |