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

Side by Side Diff: ui/views/widget/widget.cc

Issue 136093007: Widget::ShouldUseNativeFrame is now meaningful on Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/widget/widget.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/views/widget/widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698