| 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 #include "ui/views/widget/native_widget_mac.h" | 5 #include "ui/views/widget/native_widget_mac.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include "base/mac/foundation_util.h" | 9 #include "base/mac/foundation_util.h" |
| 10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 | 464 |
| 465 void NativeWidgetMac::SchedulePaintInRect(const gfx::Rect& rect) { | 465 void NativeWidgetMac::SchedulePaintInRect(const gfx::Rect& rect) { |
| 466 // TODO(tapted): This should use setNeedsDisplayInRect:, once the coordinate | 466 // TODO(tapted): This should use setNeedsDisplayInRect:, once the coordinate |
| 467 // system of |rect| has been converted. | 467 // system of |rect| has been converted. |
| 468 [GetNativeView() setNeedsDisplay:YES]; | 468 [GetNativeView() setNeedsDisplay:YES]; |
| 469 if (bridge_ && bridge_->layer()) | 469 if (bridge_ && bridge_->layer()) |
| 470 bridge_->layer()->SchedulePaint(rect); | 470 bridge_->layer()->SchedulePaint(rect); |
| 471 } | 471 } |
| 472 | 472 |
| 473 void NativeWidgetMac::SetCursor(gfx::NativeCursor cursor) { | 473 void NativeWidgetMac::SetCursor(gfx::NativeCursor cursor) { |
| 474 NOTIMPLEMENTED(); | 474 if (bridge_) |
| 475 bridge_->SetCursor(cursor); |
| 475 } | 476 } |
| 476 | 477 |
| 477 bool NativeWidgetMac::IsMouseEventsEnabled() const { | 478 bool NativeWidgetMac::IsMouseEventsEnabled() const { |
| 478 NOTIMPLEMENTED(); | 479 NOTIMPLEMENTED(); |
| 479 return true; | 480 return true; |
| 480 } | 481 } |
| 481 | 482 |
| 482 void NativeWidgetMac::ClearNativeFocus() { | 483 void NativeWidgetMac::ClearNativeFocus() { |
| 483 // To quote DesktopWindowTreeHostX11, "This method is weird and misnamed." | 484 // To quote DesktopWindowTreeHostX11, "This method is weird and misnamed." |
| 484 // The goal is to set focus to the content window, thereby removing focus from | 485 // The goal is to set focus to the content window, thereby removing focus from |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 } | 634 } |
| 634 | 635 |
| 635 // static | 636 // static |
| 636 gfx::FontList NativeWidgetPrivate::GetWindowTitleFontList() { | 637 gfx::FontList NativeWidgetPrivate::GetWindowTitleFontList() { |
| 637 NOTIMPLEMENTED(); | 638 NOTIMPLEMENTED(); |
| 638 return gfx::FontList(); | 639 return gfx::FontList(); |
| 639 } | 640 } |
| 640 | 641 |
| 641 } // namespace internal | 642 } // namespace internal |
| 642 } // namespace views | 643 } // namespace views |
| OLD | NEW |