| 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/trace_event/trace_event.h" |     9 #include "base/trace_event/trace_event.h" | 
|    10 #include "build/build_config.h" |    10 #include "build/build_config.h" | 
| (...skipping 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1178   TRACE_EVENT1("views", "DesktopNativeWidgetAura::OnHostMovedInPixels", |  1178   TRACE_EVENT1("views", "DesktopNativeWidgetAura::OnHostMovedInPixels", | 
|  1179                "new_origin_in_pixels", new_origin_in_pixels.ToString()); |  1179                "new_origin_in_pixels", new_origin_in_pixels.ToString()); | 
|  1180  |  1180  | 
|  1181   native_widget_delegate_->OnNativeWidgetMove(); |  1181   native_widget_delegate_->OnNativeWidgetMove(); | 
|  1182 } |  1182 } | 
|  1183  |  1183  | 
|  1184 //////////////////////////////////////////////////////////////////////////////// |  1184 //////////////////////////////////////////////////////////////////////////////// | 
|  1185 // DesktopNativeWidgetAura, private: |  1185 // DesktopNativeWidgetAura, private: | 
|  1186  |  1186  | 
|  1187 void DesktopNativeWidgetAura::UpdateWindowTransparency() { |  1187 void DesktopNativeWidgetAura::UpdateWindowTransparency() { | 
 |  1188   if (!desktop_window_tree_host_->ShouldUpdateWindowTransparency()) | 
 |  1189     return; | 
 |  1190  | 
|  1188   content_window_->SetTransparent( |  1191   content_window_->SetTransparent( | 
|  1189       desktop_window_tree_host_->ShouldWindowContentsBeTransparent()); |  1192       desktop_window_tree_host_->ShouldWindowContentsBeTransparent()); | 
|  1190   // Regardless of transparency or not, this root content window will always |  1193   // Regardless of transparency or not, this root content window will always | 
|  1191   // fill its bounds completely, so set this flag to true to avoid an |  1194   // fill its bounds completely, so set this flag to true to avoid an | 
|  1192   // unecessary clear before update. |  1195   // unecessary clear before update. | 
|  1193   content_window_->SetFillsBoundsCompletely(true); |  1196   content_window_->SetFillsBoundsCompletely(true); | 
|  1194 } |  1197 } | 
|  1195  |  1198  | 
|  1196 void DesktopNativeWidgetAura::RootWindowDestroyed() { |  1199 void DesktopNativeWidgetAura::RootWindowDestroyed() { | 
|  1197   cursor_reference_count_--; |  1200   cursor_reference_count_--; | 
|  1198   if (cursor_reference_count_ == 0) { |  1201   if (cursor_reference_count_ == 0) { | 
|  1199     // We are the last DesktopNativeWidgetAura instance, and we are responsible |  1202     // We are the last DesktopNativeWidgetAura instance, and we are responsible | 
|  1200     // for cleaning up |cursor_manager_|. |  1203     // for cleaning up |cursor_manager_|. | 
|  1201     delete cursor_manager_; |  1204     delete cursor_manager_; | 
|  1202     native_cursor_manager_ = NULL; |  1205     native_cursor_manager_ = NULL; | 
|  1203     cursor_manager_ = NULL; |  1206     cursor_manager_ = NULL; | 
|  1204   } |  1207   } | 
|  1205 } |  1208 } | 
|  1206  |  1209  | 
|  1207 }  // namespace views |  1210 }  // namespace views | 
| OLD | NEW |