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 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 | 585 |
586 for (NativeWidgetPrivate* parent; | 586 for (NativeWidgetPrivate* parent; |
587 (parent = GetNativeWidgetForNativeWindow( | 587 (parent = GetNativeWidgetForNativeWindow( |
588 [native_widget->GetNativeWindow() parentWindow])); | 588 [native_widget->GetNativeWindow() parentWindow])); |
589 native_widget = parent) { | 589 native_widget = parent) { |
590 } | 590 } |
591 return native_widget; | 591 return native_widget; |
592 } | 592 } |
593 | 593 |
594 // static | 594 // static |
595 void NativeWidgetPrivate::GetAllChildWidgets(gfx::NativeView native_view, | 595 void NativeWidgetPrivate::GetAllChildAndOwnedWidgets( |
596 Widget::Widgets* children) { | 596 gfx::NativeView native_view, |
| 597 Widget::Widgets* widgets) { |
597 NativeWidgetPrivate* native_widget = | 598 NativeWidgetPrivate* native_widget = |
598 GetNativeWidgetForNativeView(native_view); | 599 GetNativeWidgetForNativeView(native_view); |
599 if (!native_widget) | 600 if (!native_widget) |
600 return; | 601 return; |
601 | 602 |
602 // Code expects widget for |native_view| to be added to |children|. | 603 // Code expects widget for |native_view| to be added to |widgets|. |
603 if (native_widget->GetWidget()) | 604 if (native_widget->GetWidget()) |
604 children->insert(native_widget->GetWidget()); | 605 widgets->insert(native_widget->GetWidget()); |
605 | 606 |
606 for (NSWindow* child_window : [native_widget->GetNativeWindow() childWindows]) | 607 for (NSWindow* child_window : [native_widget->GetNativeWindow() childWindows]) |
607 GetAllChildWidgets([child_window contentView], children); | 608 GetAllChildAndOwnedWidgets([child_window contentView], widgets); |
608 } | 609 } |
609 | 610 |
610 // static | 611 // static |
611 void NativeWidgetPrivate::GetAllOwnedWidgets(gfx::NativeView native_view, | |
612 Widget::Widgets* owned) { | |
613 NOTIMPLEMENTED(); | |
614 } | |
615 | |
616 // static | |
617 void NativeWidgetPrivate::ReparentNativeView(gfx::NativeView native_view, | 612 void NativeWidgetPrivate::ReparentNativeView(gfx::NativeView native_view, |
618 gfx::NativeView new_parent) { | 613 gfx::NativeView new_parent) { |
619 NOTIMPLEMENTED(); | 614 NOTIMPLEMENTED(); |
620 } | 615 } |
621 | 616 |
622 // static | 617 // static |
623 bool NativeWidgetPrivate::IsMouseButtonDown() { | 618 bool NativeWidgetPrivate::IsMouseButtonDown() { |
624 return [NSEvent pressedMouseButtons] != 0; | 619 return [NSEvent pressedMouseButtons] != 0; |
625 } | 620 } |
626 | 621 |
627 // static | 622 // static |
628 gfx::FontList NativeWidgetPrivate::GetWindowTitleFontList() { | 623 gfx::FontList NativeWidgetPrivate::GetWindowTitleFontList() { |
629 NOTIMPLEMENTED(); | 624 NOTIMPLEMENTED(); |
630 return gfx::FontList(); | 625 return gfx::FontList(); |
631 } | 626 } |
632 | 627 |
633 } // namespace internal | 628 } // namespace internal |
634 } // namespace views | 629 } // namespace views |
OLD | NEW |