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

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

Issue 7979035: Fix for black-hole. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix more tests, reset non_client_view when new contentview is set Created 9 years, 3 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 | « no previous file | views/widget/widget.cc » ('j') | views/widget/widget.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "views/widget/native_widget_views.h" 5 #include "views/widget/native_widget_views.h"
6 6
7 #include "ui/gfx/compositor/compositor.h" 7 #include "ui/gfx/compositor/compositor.h"
8 #include "views/desktop/desktop_window_view.h" 8 #include "views/desktop/desktop_window_view.h"
9 #include "views/view.h" 9 #include "views/view.h"
10 #include "views/views_delegate.h" 10 #include "views/views_delegate.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 //////////////////////////////////////////////////////////////////////////////// 112 ////////////////////////////////////////////////////////////////////////////////
113 // NativeWidgetViews, NativeWidget implementation: 113 // NativeWidgetViews, NativeWidget implementation:
114 114
115 void NativeWidgetViews::InitNativeWidget(const Widget::InitParams& params) { 115 void NativeWidgetViews::InitNativeWidget(const Widget::InitParams& params) {
116 ownership_ = params.ownership; 116 ownership_ = params.ownership;
117 always_on_top_ = params.keep_on_top; 117 always_on_top_ = params.keep_on_top;
118 View* parent_view = NULL; 118 View* parent_view = NULL;
119 if (params.parent_widget) { 119 if (params.parent_widget) {
120 parent_view = params.parent_widget->GetChildViewParent(); 120 parent_view = params.parent_widget->GetChildViewParent();
121 } else if (ViewsDelegate::views_delegate && 121 } else if (ViewsDelegate::views_delegate &&
122 ViewsDelegate::views_delegate->GetDefaultParentView()) { 122 ViewsDelegate::views_delegate->GetDefaultParentView() &&
123 !params.child) {
123 parent_view = ViewsDelegate::views_delegate->GetDefaultParentView(); 124 parent_view = ViewsDelegate::views_delegate->GetDefaultParentView();
124 } else if (params.parent) { 125 } else if (params.parent) {
125 Widget* widget = Widget::GetWidgetForNativeView(params.parent); 126 Widget* widget = Widget::GetWidgetForNativeView(params.parent);
126 parent_view = widget->GetChildViewParent(); 127 parent_view = widget->GetChildViewParent();
127 } 128 }
128 129
129 view_ = new internal::NativeWidgetView(this); 130 view_ = new internal::NativeWidgetView(this);
130 view_->SetBoundsRect(params.bounds); 131 view_->SetBoundsRect(params.bounds);
131 #if !defined(USE_AURA) 132 #if !defined(USE_AURA)
132 // TODO(beng): re-enable this once we have a consolidated layer tree. 133 // TODO(beng): re-enable this once we have a consolidated layer tree.
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 } 582 }
582 default: 583 default:
583 // Everything else falls into standard client event handling. 584 // Everything else falls into standard client event handling.
584 break; 585 break;
585 } 586 }
586 } 587 }
587 return false; 588 return false;
588 } 589 }
589 590
590 } // namespace views 591 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | views/widget/widget.cc » ('j') | views/widget/widget.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698