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

Side by Side Diff: ui/views/cocoa/bridged_native_widget.mm

Issue 1057873004: Pass a ui::PaintContext from ui::Layer to layer delegates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layer-paintcontext: mac Created 5 years, 8 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
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/views/cocoa/bridged_native_widget.h ('k') | ui/views/controls/native/native_view_host_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698