| 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/desktop_aura/desktop_native_widget_aura.h" | 5 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 activation_client->DeactivateWindow(active_window); | 393 activation_client->DeactivateWindow(active_window); |
| 394 GetInputMethod()->OnBlur(); | 394 GetInputMethod()->OnBlur(); |
| 395 } | 395 } |
| 396 } | 396 } |
| 397 } | 397 } |
| 398 | 398 |
| 399 gfx::NativeWindow DesktopNativeWidgetAura::GetNativeWindow() const { | 399 gfx::NativeWindow DesktopNativeWidgetAura::GetNativeWindow() const { |
| 400 return content_window_; | 400 return content_window_; |
| 401 } | 401 } |
| 402 | 402 |
| 403 void DesktopNativeWidgetAura::SetNativeWindowProperty(const char* name, | |
| 404 void* value) { | |
| 405 if (content_window_) | |
| 406 content_window_->SetNativeWindowProperty(name, value); | |
| 407 } | |
| 408 | |
| 409 //////////////////////////////////////////////////////////////////////////////// | 403 //////////////////////////////////////////////////////////////////////////////// |
| 410 // DesktopNativeWidgetAura, internal::NativeWidgetPrivate implementation: | 404 // DesktopNativeWidgetAura, internal::NativeWidgetPrivate implementation: |
| 411 | 405 |
| 412 void DesktopNativeWidgetAura::InitNativeWidget( | 406 void DesktopNativeWidgetAura::InitNativeWidget( |
| 413 const Widget::InitParams& params) { | 407 const Widget::InitParams& params) { |
| 414 ownership_ = params.ownership; | 408 ownership_ = params.ownership; |
| 415 widget_type_ = params.type; | 409 widget_type_ = params.type; |
| 416 name_ = params.name; | 410 name_ = params.name; |
| 417 | 411 |
| 418 NativeWidgetAura::RegisterNativeWidgetForWindow(this, content_window_); | 412 NativeWidgetAura::RegisterNativeWidgetForWindow(this, content_window_); |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 | 597 |
| 604 void DesktopNativeWidgetAura::ReorderNativeViews() { | 598 void DesktopNativeWidgetAura::ReorderNativeViews() { |
| 605 window_reorderer_->ReorderChildWindows(); | 599 window_reorderer_->ReorderChildWindows(); |
| 606 } | 600 } |
| 607 | 601 |
| 608 void DesktopNativeWidgetAura::ViewRemoved(View* view) { | 602 void DesktopNativeWidgetAura::ViewRemoved(View* view) { |
| 609 DCHECK(drop_helper_.get() != NULL); | 603 DCHECK(drop_helper_.get() != NULL); |
| 610 drop_helper_->ResetTargetViewIfEquals(view); | 604 drop_helper_->ResetTargetViewIfEquals(view); |
| 611 } | 605 } |
| 612 | 606 |
| 607 void DesktopNativeWidgetAura::SetNativeWindowProperty(const char* name, |
| 608 void* value) { |
| 609 if (content_window_) |
| 610 content_window_->SetNativeWindowProperty(name, value); |
| 611 } |
| 612 |
| 613 void* DesktopNativeWidgetAura::GetNativeWindowProperty(const char* name) const { | 613 void* DesktopNativeWidgetAura::GetNativeWindowProperty(const char* name) const { |
| 614 return content_window_ ? | 614 return content_window_ ? |
| 615 content_window_->GetNativeWindowProperty(name) : NULL; | 615 content_window_->GetNativeWindowProperty(name) : NULL; |
| 616 } | 616 } |
| 617 | 617 |
| 618 TooltipManager* DesktopNativeWidgetAura::GetTooltipManager() const { | 618 TooltipManager* DesktopNativeWidgetAura::GetTooltipManager() const { |
| 619 return tooltip_manager_.get(); | 619 return tooltip_manager_.get(); |
| 620 } | 620 } |
| 621 | 621 |
| 622 void DesktopNativeWidgetAura::SetCapture() { | 622 void DesktopNativeWidgetAura::SetCapture() { |
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1212 if (cursor_reference_count_ == 0) { | 1212 if (cursor_reference_count_ == 0) { |
| 1213 // We are the last DesktopNativeWidgetAura instance, and we are responsible | 1213 // We are the last DesktopNativeWidgetAura instance, and we are responsible |
| 1214 // for cleaning up |cursor_manager_|. | 1214 // for cleaning up |cursor_manager_|. |
| 1215 delete cursor_manager_; | 1215 delete cursor_manager_; |
| 1216 native_cursor_manager_ = NULL; | 1216 native_cursor_manager_ = NULL; |
| 1217 cursor_manager_ = NULL; | 1217 cursor_manager_ = NULL; |
| 1218 } | 1218 } |
| 1219 } | 1219 } |
| 1220 | 1220 |
| 1221 } // namespace views | 1221 } // namespace views |
| OLD | NEW |