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/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
863 custom_frame_view->Init(this); | 863 custom_frame_view->Init(this); |
864 return custom_frame_view; | 864 return custom_frame_view; |
865 } | 865 } |
866 | 866 |
867 bool Widget::ShouldUseNativeFrame() const { | 867 bool Widget::ShouldUseNativeFrame() const { |
868 if (frame_type_ != FRAME_TYPE_DEFAULT) | 868 if (frame_type_ != FRAME_TYPE_DEFAULT) |
869 return frame_type_ == FRAME_TYPE_FORCE_NATIVE; | 869 return frame_type_ == FRAME_TYPE_FORCE_NATIVE; |
870 return native_widget_->ShouldUseNativeFrame(); | 870 return native_widget_->ShouldUseNativeFrame(); |
871 } | 871 } |
872 | 872 |
| 873 bool Widget::ShouldWindowContentsBeTransparent() const { |
| 874 return native_widget_->ShouldWindowContentsBeTransparent(); |
| 875 } |
| 876 |
873 void Widget::DebugToggleFrameType() { | 877 void Widget::DebugToggleFrameType() { |
874 if (frame_type_ == FRAME_TYPE_DEFAULT) { | 878 if (frame_type_ == FRAME_TYPE_DEFAULT) { |
875 frame_type_ = ShouldUseNativeFrame() ? FRAME_TYPE_FORCE_CUSTOM : | 879 frame_type_ = ShouldUseNativeFrame() ? FRAME_TYPE_FORCE_CUSTOM : |
876 FRAME_TYPE_FORCE_NATIVE; | 880 FRAME_TYPE_FORCE_NATIVE; |
877 } else { | 881 } else { |
878 frame_type_ = frame_type_ == FRAME_TYPE_FORCE_CUSTOM ? | 882 frame_type_ = frame_type_ == FRAME_TYPE_FORCE_CUSTOM ? |
879 FRAME_TYPE_FORCE_NATIVE : FRAME_TYPE_FORCE_CUSTOM; | 883 FRAME_TYPE_FORCE_NATIVE : FRAME_TYPE_FORCE_CUSTOM; |
880 } | 884 } |
881 FrameTypeChanged(); | 885 FrameTypeChanged(); |
882 } | 886 } |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1431 | 1435 |
1432 //////////////////////////////////////////////////////////////////////////////// | 1436 //////////////////////////////////////////////////////////////////////////////// |
1433 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1437 // internal::NativeWidgetPrivate, NativeWidget implementation: |
1434 | 1438 |
1435 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1439 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
1436 return this; | 1440 return this; |
1437 } | 1441 } |
1438 | 1442 |
1439 } // namespace internal | 1443 } // namespace internal |
1440 } // namespace views | 1444 } // namespace views |
OLD | NEW |