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

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

Issue 9166014: Allow a Views client to provide a default frameview for window widgets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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
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/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
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
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
OLDNEW
« chrome/browser/ui/views/chrome_views_delegate.cc ('K') | « ui/views/views_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698