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/native_widget_aura.h" | 5 #include "ui/views/widget/native_widget_aura.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "third_party/skia/include/core/SkRegion.h" | 9 #include "third_party/skia/include/core/SkRegion.h" |
10 #include "ui/aura/client/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "ui/views/drag_utils.h" | 27 #include "ui/views/drag_utils.h" |
28 #include "ui/views/ime/input_method_bridge.h" | 28 #include "ui/views/ime/input_method_bridge.h" |
29 #include "ui/views/views_delegate.h" | 29 #include "ui/views/views_delegate.h" |
30 #include "ui/views/widget/drop_helper.h" | 30 #include "ui/views/widget/drop_helper.h" |
31 #include "ui/views/widget/native_widget_delegate.h" | 31 #include "ui/views/widget/native_widget_delegate.h" |
32 #include "ui/views/widget/root_view.h" | 32 #include "ui/views/widget/root_view.h" |
33 #include "ui/views/widget/tooltip_manager_aura.h" | 33 #include "ui/views/widget/tooltip_manager_aura.h" |
34 #include "ui/views/widget/widget_aura_utils.h" | 34 #include "ui/views/widget/widget_aura_utils.h" |
35 #include "ui/views/widget/widget_delegate.h" | 35 #include "ui/views/widget/widget_delegate.h" |
36 #include "ui/views/widget/window_reorderer.h" | 36 #include "ui/views/widget/window_reorderer.h" |
| 37 #include "ui/wm/core/shadow_types.h" |
37 #include "ui/wm/core/window_util.h" | 38 #include "ui/wm/core/window_util.h" |
38 #include "ui/wm/public/activation_client.h" | 39 #include "ui/wm/public/activation_client.h" |
39 #include "ui/wm/public/drag_drop_client.h" | 40 #include "ui/wm/public/drag_drop_client.h" |
40 #include "ui/wm/public/window_move_client.h" | 41 #include "ui/wm/public/window_move_client.h" |
41 #include "ui/wm/public/window_types.h" | 42 #include "ui/wm/public/window_types.h" |
42 | 43 |
43 #if defined(OS_WIN) | 44 #if defined(OS_WIN) |
44 #include "base/win/scoped_gdi_object.h" | 45 #include "base/win/scoped_gdi_object.h" |
45 #include "base/win/win_util.h" | 46 #include "base/win/win_util.h" |
46 #include "ui/base/l10n/l10n_util_win.h" | 47 #include "ui/base/l10n/l10n_util_win.h" |
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 bool NativeWidgetAura::IsFullscreen() const { | 571 bool NativeWidgetAura::IsFullscreen() const { |
571 return window_ && window_->GetProperty(aura::client::kShowStateKey) == | 572 return window_ && window_->GetProperty(aura::client::kShowStateKey) == |
572 ui::SHOW_STATE_FULLSCREEN; | 573 ui::SHOW_STATE_FULLSCREEN; |
573 } | 574 } |
574 | 575 |
575 void NativeWidgetAura::SetOpacity(unsigned char opacity) { | 576 void NativeWidgetAura::SetOpacity(unsigned char opacity) { |
576 if (window_) | 577 if (window_) |
577 window_->layer()->SetOpacity(opacity / 255.0); | 578 window_->layer()->SetOpacity(opacity / 255.0); |
578 } | 579 } |
579 | 580 |
| 581 void NativeWidgetAura::SetHasShadow(bool has_shadow) { |
| 582 SetShadowType(window_, has_shadow ? wm::SHADOW_TYPE_RECTANGULAR |
| 583 : wm::SHADOW_TYPE_NONE); |
| 584 } |
| 585 |
580 void NativeWidgetAura::SetUseDragFrame(bool use_drag_frame) { | 586 void NativeWidgetAura::SetUseDragFrame(bool use_drag_frame) { |
581 NOTIMPLEMENTED(); | 587 NOTIMPLEMENTED(); |
582 } | 588 } |
583 | 589 |
584 void NativeWidgetAura::FlashFrame(bool flash) { | 590 void NativeWidgetAura::FlashFrame(bool flash) { |
585 if (window_) | 591 if (window_) |
586 window_->SetProperty(aura::client::kDrawAttentionKey, flash); | 592 window_->SetProperty(aura::client::kDrawAttentionKey, flash); |
587 } | 593 } |
588 | 594 |
589 void NativeWidgetAura::RunShellDrag(View* view, | 595 void NativeWidgetAura::RunShellDrag(View* view, |
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1140 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont)); | 1146 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont)); |
1141 base::win::ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont))); | 1147 base::win::ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont))); |
1142 return gfx::FontList(gfx::Font(caption_font)); | 1148 return gfx::FontList(gfx::Font(caption_font)); |
1143 #else | 1149 #else |
1144 return gfx::FontList(); | 1150 return gfx::FontList(); |
1145 #endif | 1151 #endif |
1146 } | 1152 } |
1147 | 1153 |
1148 } // namespace internal | 1154 } // namespace internal |
1149 } // namespace views | 1155 } // namespace views |
OLD | NEW |