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 "ui/views/widget/widget.h" | 5 #include "ui/views/widget/widget.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "ui/base/hit_test.h" | 10 #include "ui/base/hit_test.h" |
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
743 } | 743 } |
744 | 744 |
745 void Widget::UpdateFrameAfterFrameChange() { | 745 void Widget::UpdateFrameAfterFrameChange() { |
746 native_widget_->UpdateFrameAfterFrameChange(); | 746 native_widget_->UpdateFrameAfterFrameChange(); |
747 } | 747 } |
748 | 748 |
749 NonClientFrameView* Widget::CreateNonClientFrameView() { | 749 NonClientFrameView* Widget::CreateNonClientFrameView() { |
750 NonClientFrameView* frame_view = widget_delegate_->CreateNonClientFrameView(); | 750 NonClientFrameView* frame_view = widget_delegate_->CreateNonClientFrameView(); |
751 if (!frame_view) | 751 if (!frame_view) |
752 frame_view = native_widget_->CreateNonClientFrameView(); | 752 frame_view = native_widget_->CreateNonClientFrameView(); |
| 753 if (!frame_view && ViewsDelegate::views_delegate) { |
| 754 frame_view = |
| 755 ViewsDelegate::views_delegate->CreateDefaultNonClientFrameView(this); |
| 756 } |
753 return frame_view ? frame_view : new CustomFrameView(this); | 757 return frame_view ? frame_view : new CustomFrameView(this); |
754 } | 758 } |
755 | 759 |
756 bool Widget::ShouldUseNativeFrame() const { | 760 bool Widget::ShouldUseNativeFrame() const { |
757 if (frame_type_ != FRAME_TYPE_DEFAULT) | 761 if (frame_type_ != FRAME_TYPE_DEFAULT) |
758 return frame_type_ == FRAME_TYPE_FORCE_NATIVE; | 762 return frame_type_ == FRAME_TYPE_FORCE_NATIVE; |
759 return native_widget_->ShouldUseNativeFrame(); | 763 return native_widget_->ShouldUseNativeFrame(); |
760 } | 764 } |
761 | 765 |
762 void Widget::DebugToggleFrameType() { | 766 void Widget::DebugToggleFrameType() { |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1227 | 1231 |
1228 //////////////////////////////////////////////////////////////////////////////// | 1232 //////////////////////////////////////////////////////////////////////////////// |
1229 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1233 // internal::NativeWidgetPrivate, NativeWidget implementation: |
1230 | 1234 |
1231 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1235 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
1232 return this; | 1236 return this; |
1233 } | 1237 } |
1234 | 1238 |
1235 } // namespace internal | 1239 } // namespace internal |
1236 } // namespace views | 1240 } // namespace views |
OLD | NEW |