OLD | NEW |
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/native_widget_aura.h" | 5 #include "ui/views/widget/native_widget_aura.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "third_party/skia/include/core/SkRegion.h" | 9 #include "third_party/skia/include/core/SkRegion.h" |
10 #include "ui/aura/client/activation_client.h" | 10 #include "ui/aura/client/activation_client.h" |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 // and ownership is WIDGET_OWNS_NATIVE_WIDGET. | 404 // and ownership is WIDGET_OWNS_NATIVE_WIDGET. |
405 DCHECK(window_ || | 405 DCHECK(window_ || |
406 ownership_ == Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET); | 406 ownership_ == Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET); |
407 if (window_) { | 407 if (window_) { |
408 window_->SuppressPaint(); | 408 window_->SuppressPaint(); |
409 Hide(); | 409 Hide(); |
410 window_->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_NONE); | 410 window_->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_NONE); |
411 } | 411 } |
412 | 412 |
413 if (!close_widget_factory_.HasWeakPtrs()) { | 413 if (!close_widget_factory_.HasWeakPtrs()) { |
414 MessageLoop::current()->PostTask( | 414 base::MessageLoop::current()->PostTask( |
415 FROM_HERE, | 415 FROM_HERE, |
416 base::Bind(&NativeWidgetAura::CloseNow, | 416 base::Bind(&NativeWidgetAura::CloseNow, |
417 close_widget_factory_.GetWeakPtr())); | 417 close_widget_factory_.GetWeakPtr())); |
418 } | 418 } |
419 } | 419 } |
420 | 420 |
421 void NativeWidgetAura::CloseNow() { | 421 void NativeWidgetAura::CloseNow() { |
422 delete window_; | 422 delete window_; |
423 } | 423 } |
424 | 424 |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1035 return aura::Env::GetInstance()->is_mouse_button_down(); | 1035 return aura::Env::GetInstance()->is_mouse_button_down(); |
1036 } | 1036 } |
1037 | 1037 |
1038 // static | 1038 // static |
1039 bool NativeWidgetPrivate::IsTouchDown() { | 1039 bool NativeWidgetPrivate::IsTouchDown() { |
1040 return aura::Env::GetInstance()->is_touch_down(); | 1040 return aura::Env::GetInstance()->is_touch_down(); |
1041 } | 1041 } |
1042 | 1042 |
1043 } // namespace internal | 1043 } // namespace internal |
1044 } // namespace views | 1044 } // namespace views |
OLD | NEW |