| OLD | NEW |
| 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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 // http://crbug.com/102570 | 304 // http://crbug.com/102570 |
| 305 //NOTIMPLEMENTED(); | 305 //NOTIMPLEMENTED(); |
| 306 } | 306 } |
| 307 | 307 |
| 308 void NativeWidgetAura::SetAccessibleState(ui::AccessibilityTypes::State state) { | 308 void NativeWidgetAura::SetAccessibleState(ui::AccessibilityTypes::State state) { |
| 309 // http://crbug.com/102570 | 309 // http://crbug.com/102570 |
| 310 //NOTIMPLEMENTED(); | 310 //NOTIMPLEMENTED(); |
| 311 } | 311 } |
| 312 | 312 |
| 313 void NativeWidgetAura::BecomeModal() { | 313 void NativeWidgetAura::BecomeModal() { |
| 314 // http://crbug.com/93936 | 314 window_->SetIntProperty(aura::kModalKey, 1); |
| 315 NOTIMPLEMENTED(); | |
| 316 } | 315 } |
| 317 | 316 |
| 318 gfx::Rect NativeWidgetAura::GetWindowScreenBounds() const { | 317 gfx::Rect NativeWidgetAura::GetWindowScreenBounds() const { |
| 319 return window_->GetScreenBounds(); | 318 return window_->GetScreenBounds(); |
| 320 } | 319 } |
| 321 | 320 |
| 322 gfx::Rect NativeWidgetAura::GetClientAreaScreenBounds() const { | 321 gfx::Rect NativeWidgetAura::GetClientAreaScreenBounds() const { |
| 323 // In Aura, the entire window is the client area. | 322 // In Aura, the entire window is the client area. |
| 324 return window_->GetScreenBounds(); | 323 return window_->GetScreenBounds(); |
| 325 } | 324 } |
| (...skipping 19 matching lines...) Expand all Loading... |
| 345 window_->parent()->MoveChildToFront(window_); | 344 window_->parent()->MoveChildToFront(window_); |
| 346 } | 345 } |
| 347 | 346 |
| 348 void NativeWidgetAura::SetShape(gfx::NativeRegion region) { | 347 void NativeWidgetAura::SetShape(gfx::NativeRegion region) { |
| 349 // No need for this. | 348 // No need for this. |
| 350 } | 349 } |
| 351 | 350 |
| 352 void NativeWidgetAura::Close() { | 351 void NativeWidgetAura::Close() { |
| 353 Hide(); | 352 Hide(); |
| 354 | 353 |
| 354 window_->SetIntProperty(aura::kModalKey, 0); |
| 355 |
| 355 if (!close_widget_factory_.HasWeakPtrs()) { | 356 if (!close_widget_factory_.HasWeakPtrs()) { |
| 356 MessageLoop::current()->PostTask( | 357 MessageLoop::current()->PostTask( |
| 357 FROM_HERE, | 358 FROM_HERE, |
| 358 base::Bind(&NativeWidgetAura::CloseNow, | 359 base::Bind(&NativeWidgetAura::CloseNow, |
| 359 close_widget_factory_.GetWeakPtr())); | 360 close_widget_factory_.GetWeakPtr())); |
| 360 } | 361 } |
| 361 } | 362 } |
| 362 | 363 |
| 363 void NativeWidgetAura::CloseNow() { | 364 void NativeWidgetAura::CloseNow() { |
| 364 delete window_; | 365 delete window_; |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |