summaryrefslogtreecommitdiffstats
path: root/ui/views
diff options
context:
space:
mode:
authordavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-28 15:40:41 +0000
committerdavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-28 15:40:41 +0000
commita636d8e56d0db4000e4139d00f6033a027a225d2 (patch)
tree736fffb6fbcb2a061d9bfe9e0ec89ea1343599ed /ui/views
parent112d8a38d876c2d9937108fe5c852c670c97e401 (diff)
downloadchromium_src-a636d8e56d0db4000e4139d00f6033a027a225d2.zip
chromium_src-a636d8e56d0db4000e4139d00f6033a027a225d2.tar.gz
chromium_src-a636d8e56d0db4000e4139d00f6033a027a225d2.tar.bz2
Add app mode for cros app windows, second try after revert of
https://chromiumcodereview.appspot.com/9359022/ BUG=None TEST=SessionServiceTest.RestoreApp, TabRestoreServiceBrowserTest.RestoreApp TBR=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/9489010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123977 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views')
-rw-r--r--ui/views/widget/native_widget_aura.cc2
-rw-r--r--ui/views/window/non_client_view.cc15
2 files changed, 10 insertions, 7 deletions
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index 05d4997..dc01169 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -215,8 +215,6 @@ NonClientFrameView* NativeWidgetAura::CreateNonClientFrameView() {
}
void NativeWidgetAura::UpdateFrameAfterFrameChange() {
- // We don't support changing the frame type.
- NOTREACHED();
}
bool NativeWidgetAura::ShouldUseNativeFrame() const {
diff --git a/ui/views/window/non_client_view.cc b/ui/views/window/non_client_view.cc
index c880414..9d37b5f 100644
--- a/ui/views/window/non_client_view.cc
+++ b/ui/views/window/non_client_view.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -168,10 +168,15 @@ views::View* NonClientView::GetEventHandlerForPoint(const gfx::Point& point) {
// detect this condition and re-route the events to the non-client frame view.
// The assumption is that the frame view's implementation of HitTest will only
// return true for area not occupied by the client view.
- gfx::Point point_in_child_coords(point);
- View::ConvertPointToView(this, frame_view_.get(), &point_in_child_coords);
- if (frame_view_->HitTest(point_in_child_coords))
- return frame_view_->GetEventHandlerForPoint(point_in_child_coords);
+ if (frame_view_->parent() == this) {
+ // During the reset of the frame_view_ it's possible to be in this code
+ // after it's been removed from the view hierarchy but before it's been
+ // removed from the NonClientView.
+ gfx::Point point_in_child_coords(point);
+ View::ConvertPointToView(this, frame_view_.get(), &point_in_child_coords);
+ if (frame_view_->HitTest(point_in_child_coords))
+ return frame_view_->GetEventHandlerForPoint(point_in_child_coords);
+ }
return View::GetEventHandlerForPoint(point);
}