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

Unified Diff: views/widget/widget.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/widget/native_widget_views.cc ('k') | views/widget/widget_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/widget.cc
diff --git a/views/widget/widget.cc b/views/widget/widget.cc
index e108e843586e5ca30d16dff975a0a4902bb7f17a..9c5060b9872a0b0a96b7f41af82b49b693bcc7fd 100644
--- a/views/widget/widget.cc
+++ b/views/widget/widget.cc
@@ -73,7 +73,8 @@ class DefaultWidgetDelegate : public WidgetDelegate {
public:
DefaultWidgetDelegate(Widget* widget, const Widget::InitParams& params)
: widget_(widget),
- can_activate_(params.type != Widget::InitParams::TYPE_POPUP) {
+ can_activate_(!params.child &&
+ params.type != Widget::InitParams::TYPE_POPUP) {
}
virtual ~DefaultWidgetDelegate() {}
@@ -398,6 +399,8 @@ const Widget* Widget::GetTopLevelWidget() const {
void Widget::SetContentsView(View* view) {
root_view_->SetContentsView(view);
+ if (non_client_view_ != view)
+ non_client_view_ = NULL;
sadrul 2011/09/22 22:12:04 If this is necessary only for tests, can there be
oshima 2011/09/22 22:27:05 This is a bug which has to be fixed in normal case
}
View* Widget::GetContentsView() {
@@ -1074,6 +1077,7 @@ internal::RootView* Widget::CreateRootView() {
}
void Widget::DestroyRootView() {
+ non_client_view_ = NULL;
root_view_.reset();
// Input method has to be destroyed before focus manager.
input_method_.reset();
« no previous file with comments | « views/widget/native_widget_views.cc ('k') | views/widget/widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698