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

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

Issue 8570011: Aura: windows in aura should honor Widget::InitParams::accept_events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: modified according to comments Created 9 years, 1 month 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/aura/window_unittest.cc ('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) 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_aura.h" 5 #include "views/widget/native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "ui/aura/client/aura_constants.h" 8 #include "ui/aura/client/aura_constants.h"
9 #include "ui/aura/desktop.h" 9 #include "ui/aura/desktop.h"
10 #include "ui/aura/desktop_observer.h" 10 #include "ui/aura/desktop_observer.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 } else { 140 } else {
141 // Set up the transient child before the window is added. This way the 141 // Set up the transient child before the window is added. This way the
142 // LayoutManager knows the window has a transient parent. 142 // LayoutManager knows the window has a transient parent.
143 gfx::NativeView parent = params.GetParent(); 143 gfx::NativeView parent = params.GetParent();
144 if (parent) 144 if (parent)
145 parent->AddTransientChild(window_); 145 parent->AddTransientChild(window_);
146 // SetAlwaysOnTop before SetParent so that always-on-top container is used. 146 // SetAlwaysOnTop before SetParent so that always-on-top container is used.
147 SetAlwaysOnTop(params.keep_on_top); 147 SetAlwaysOnTop(params.keep_on_top);
148 window_->SetParent(NULL); 148 window_->SetParent(NULL);
149 } 149 }
150 window_->set_ignore_events(!params.accept_events);
150 // TODO(beng): do this some other way. 151 // TODO(beng): do this some other way.
151 delegate_->OnNativeWidgetSizeChanged(params.bounds.size()); 152 delegate_->OnNativeWidgetSizeChanged(params.bounds.size());
152 can_activate_ = params.can_activate; 153 can_activate_ = params.can_activate;
153 if (params.type != Widget::InitParams::TYPE_TOOLTIP && !params.child) { 154 if (params.type != Widget::InitParams::TYPE_TOOLTIP && !params.child) {
154 DCHECK(GetWidget()->GetRootView()); 155 DCHECK(GetWidget()->GetRootView());
155 views::TooltipManagerViews* manager = new views::TooltipManagerViews( 156 views::TooltipManagerViews* manager = new views::TooltipManagerViews(
156 GetWidget()->GetRootView()); 157 GetWidget()->GetRootView());
157 tooltip_manager_.reset(manager); 158 tooltip_manager_.reset(manager);
158 } 159 }
159 } 160 }
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 NOTIMPLEMENTED(); 723 NOTIMPLEMENTED();
723 } 724 }
724 725
725 // static 726 // static
726 bool NativeWidgetPrivate::IsMouseButtonDown() { 727 bool NativeWidgetPrivate::IsMouseButtonDown() {
727 return aura::Desktop::GetInstance()->IsMouseButtonDown(); 728 return aura::Desktop::GetInstance()->IsMouseButtonDown();
728 } 729 }
729 730
730 } // namespace internal 731 } // namespace internal
731 } // namespace views 732 } // namespace views
OLDNEW
« no previous file with comments | « ui/aura/window_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698