| 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 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 if (params.type != Widget::InitParams::TYPE_TOOLTIP) { | 500 if (params.type != Widget::InitParams::TYPE_TOOLTIP) { |
| 501 tooltip_manager_.reset(new TooltipManagerAura(GetWidget())); | 501 tooltip_manager_.reset(new TooltipManagerAura(GetWidget())); |
| 502 tooltip_controller_.reset( | 502 tooltip_controller_.reset( |
| 503 new corewm::TooltipController( | 503 new corewm::TooltipController( |
| 504 desktop_window_tree_host_->CreateTooltip())); | 504 desktop_window_tree_host_->CreateTooltip())); |
| 505 aura::client::SetTooltipClient(host_->window(), | 505 aura::client::SetTooltipClient(host_->window(), |
| 506 tooltip_controller_.get()); | 506 tooltip_controller_.get()); |
| 507 host_->window()->AddPreTargetHandler(tooltip_controller_.get()); | 507 host_->window()->AddPreTargetHandler(tooltip_controller_.get()); |
| 508 } | 508 } |
| 509 | 509 |
| 510 if (params.opacity == Widget::InitParams::TRANSLUCENT_WINDOW) { | 510 if (params.opacity == Widget::InitParams::TRANSLUCENT_WINDOW && |
| 511 visibility_controller_.reset(new wm::VisibilityController); | 511 desktop_window_tree_host_->ShouldCreateVisibilityController()) { |
| 512 visibility_controller_ = base::MakeUnique<wm::VisibilityController>(); |
| 512 aura::client::SetVisibilityClient(host_->window(), | 513 aura::client::SetVisibilityClient(host_->window(), |
| 513 visibility_controller_.get()); | 514 visibility_controller_.get()); |
| 514 wm::SetChildWindowVisibilityChangesAnimated(host_->window()); | 515 wm::SetChildWindowVisibilityChangesAnimated(host_->window()); |
| 515 } | 516 } |
| 516 | 517 |
| 517 if (params.type == Widget::InitParams::TYPE_WINDOW) { | 518 if (params.type == Widget::InitParams::TYPE_WINDOW) { |
| 518 focus_manager_event_handler_ = base::MakeUnique<FocusManagerEventHandler>( | 519 focus_manager_event_handler_ = base::MakeUnique<FocusManagerEventHandler>( |
| 519 GetWidget(), host_->window()); | 520 GetWidget(), host_->window()); |
| 520 } | 521 } |
| 521 | 522 |
| (...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1196 if (cursor_reference_count_ == 0) { | 1197 if (cursor_reference_count_ == 0) { |
| 1197 // We are the last DesktopNativeWidgetAura instance, and we are responsible | 1198 // We are the last DesktopNativeWidgetAura instance, and we are responsible |
| 1198 // for cleaning up |cursor_manager_|. | 1199 // for cleaning up |cursor_manager_|. |
| 1199 delete cursor_manager_; | 1200 delete cursor_manager_; |
| 1200 native_cursor_manager_ = NULL; | 1201 native_cursor_manager_ = NULL; |
| 1201 cursor_manager_ = NULL; | 1202 cursor_manager_ = NULL; |
| 1202 } | 1203 } |
| 1203 } | 1204 } |
| 1204 | 1205 |
| 1205 } // namespace views | 1206 } // namespace views |
| OLD | NEW |