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

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

Issue 290553002: Refactor menu dependency on aura/wm SetShadowType (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months 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 | Annotate | Revision Log
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/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "ui/aura/client/aura_constants.h" 9 #include "ui/aura/client/aura_constants.h"
10 #include "ui/aura/client/cursor_client.h" 10 #include "ui/aura/client/cursor_client.h"
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 838
839 bool DesktopNativeWidgetAura::IsFullscreen() const { 839 bool DesktopNativeWidgetAura::IsFullscreen() const {
840 return content_window_ && desktop_window_tree_host_->IsFullscreen(); 840 return content_window_ && desktop_window_tree_host_->IsFullscreen();
841 } 841 }
842 842
843 void DesktopNativeWidgetAura::SetOpacity(unsigned char opacity) { 843 void DesktopNativeWidgetAura::SetOpacity(unsigned char opacity) {
844 if (content_window_) 844 if (content_window_)
845 desktop_window_tree_host_->SetOpacity(opacity); 845 desktop_window_tree_host_->SetOpacity(opacity);
846 } 846 }
847 847
848 void DesktopNativeWidgetAura::SetHasActivationShadow(bool has_shadow) {
849 if (content_window_)
850 SetShadowType(content_window_, has_shadow ? wm::SHADOW_TYPE_RECTANGULAR
851 : wm::SHADOW_TYPE_NONE);
852 }
853
848 void DesktopNativeWidgetAura::SetUseDragFrame(bool use_drag_frame) { 854 void DesktopNativeWidgetAura::SetUseDragFrame(bool use_drag_frame) {
849 } 855 }
850 856
851 void DesktopNativeWidgetAura::FlashFrame(bool flash_frame) { 857 void DesktopNativeWidgetAura::FlashFrame(bool flash_frame) {
852 if (content_window_) 858 if (content_window_)
853 desktop_window_tree_host_->FlashFrame(flash_frame); 859 desktop_window_tree_host_->FlashFrame(flash_frame);
854 } 860 }
855 861
856 void DesktopNativeWidgetAura::RunShellDrag( 862 void DesktopNativeWidgetAura::RunShellDrag(
857 View* view, 863 View* view,
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 if (cursor_reference_count_ == 0) { 1201 if (cursor_reference_count_ == 0) {
1196 // We are the last DesktopNativeWidgetAura instance, and we are responsible 1202 // We are the last DesktopNativeWidgetAura instance, and we are responsible
1197 // for cleaning up |cursor_manager_|. 1203 // for cleaning up |cursor_manager_|.
1198 delete cursor_manager_; 1204 delete cursor_manager_;
1199 native_cursor_manager_ = NULL; 1205 native_cursor_manager_ = NULL;
1200 cursor_manager_ = NULL; 1206 cursor_manager_ = NULL;
1201 } 1207 }
1202 } 1208 }
1203 1209
1204 } // namespace views 1210 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698