Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(427)

Side by Side Diff: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc

Issue 2596743002: Replace WM shadow types (on/off) and styles (small/inactive/active) (Closed)
Patch Set: . Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 NativeWidgetAura::RegisterNativeWidgetForWindow(this, content_window_); 401 NativeWidgetAura::RegisterNativeWidgetForWindow(this, content_window_);
402 // Animations on TYPE_WINDOW are handled by the OS. Additionally if we animate 402 // Animations on TYPE_WINDOW are handled by the OS. Additionally if we animate
403 // these windows the size of the window gets augmented, effecting restore 403 // these windows the size of the window gets augmented, effecting restore
404 // bounds and maximized windows in bad ways. 404 // bounds and maximized windows in bad ways.
405 if (params.type == Widget::InitParams::TYPE_WINDOW && 405 if (params.type == Widget::InitParams::TYPE_WINDOW &&
406 !params.remove_standard_frame) { 406 !params.remove_standard_frame) {
407 content_window_->SetProperty(aura::client::kAnimationsDisabledKey, true); 407 content_window_->SetProperty(aura::client::kAnimationsDisabledKey, true);
408 } 408 }
409 content_window_->SetType(GetAuraWindowTypeForWidgetType(params.type)); 409 content_window_->SetType(GetAuraWindowTypeForWidgetType(params.type));
410 content_window_->Init(params.layer_type); 410 content_window_->Init(params.layer_type);
411 wm::SetShadowType(content_window_, wm::SHADOW_TYPE_NONE); 411 wm::SetShadowElevation(content_window_, wm::ShadowElevation::NONE);
412 412
413 content_window_container_ = new aura::Window(NULL); 413 content_window_container_ = new aura::Window(NULL);
414 content_window_container_->Init(ui::LAYER_NOT_DRAWN); 414 content_window_container_->Init(ui::LAYER_NOT_DRAWN);
415 content_window_container_->Show(); 415 content_window_container_->Show();
416 content_window_container_->AddChild(content_window_); 416 content_window_container_->AddChild(content_window_);
417 417
418 if (!desktop_window_tree_host_) { 418 if (!desktop_window_tree_host_) {
419 desktop_window_tree_host_ = 419 desktop_window_tree_host_ =
420 params.desktop_window_tree_host 420 params.desktop_window_tree_host
421 ? params.desktop_window_tree_host 421 ? params.desktop_window_tree_host
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
1203 if (cursor_reference_count_ == 0) { 1203 if (cursor_reference_count_ == 0) {
1204 // We are the last DesktopNativeWidgetAura instance, and we are responsible 1204 // We are the last DesktopNativeWidgetAura instance, and we are responsible
1205 // for cleaning up |cursor_manager_|. 1205 // for cleaning up |cursor_manager_|.
1206 delete cursor_manager_; 1206 delete cursor_manager_;
1207 native_cursor_manager_ = NULL; 1207 native_cursor_manager_ = NULL;
1208 cursor_manager_ = NULL; 1208 cursor_manager_ = NULL;
1209 } 1209 }
1210 } 1210 }
1211 1211
1212 } // namespace views 1212 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698