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 18 matching lines...) Expand all Loading... |
29 #include "ui/views/ime/input_method_bridge.h" | 29 #include "ui/views/ime/input_method_bridge.h" |
30 #include "ui/views/ime/null_input_method.h" | 30 #include "ui/views/ime/null_input_method.h" |
31 #include "ui/views/views_delegate.h" | 31 #include "ui/views/views_delegate.h" |
32 #include "ui/views/widget/drop_helper.h" | 32 #include "ui/views/widget/drop_helper.h" |
33 #include "ui/views/widget/native_widget_delegate.h" | 33 #include "ui/views/widget/native_widget_delegate.h" |
34 #include "ui/views/widget/root_view.h" | 34 #include "ui/views/widget/root_view.h" |
35 #include "ui/views/widget/tooltip_manager_aura.h" | 35 #include "ui/views/widget/tooltip_manager_aura.h" |
36 #include "ui/views/widget/widget_aura_utils.h" | 36 #include "ui/views/widget/widget_aura_utils.h" |
37 #include "ui/views/widget/widget_delegate.h" | 37 #include "ui/views/widget/widget_delegate.h" |
38 #include "ui/views/widget/window_reorderer.h" | 38 #include "ui/views/widget/window_reorderer.h" |
| 39 #include "ui/wm/core/shadow_types.h" |
39 #include "ui/wm/core/window_util.h" | 40 #include "ui/wm/core/window_util.h" |
40 #include "ui/wm/public/activation_client.h" | 41 #include "ui/wm/public/activation_client.h" |
41 #include "ui/wm/public/drag_drop_client.h" | 42 #include "ui/wm/public/drag_drop_client.h" |
42 #include "ui/wm/public/window_move_client.h" | 43 #include "ui/wm/public/window_move_client.h" |
43 #include "ui/wm/public/window_types.h" | 44 #include "ui/wm/public/window_types.h" |
44 | 45 |
45 #if defined(OS_WIN) | 46 #if defined(OS_WIN) |
46 #include "base/win/scoped_gdi_object.h" | 47 #include "base/win/scoped_gdi_object.h" |
47 #include "base/win/win_util.h" | 48 #include "base/win/win_util.h" |
48 #include "ui/base/l10n/l10n_util_win.h" | 49 #include "ui/base/l10n/l10n_util_win.h" |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 bool NativeWidgetAura::IsFullscreen() const { | 578 bool NativeWidgetAura::IsFullscreen() const { |
578 return window_ && window_->GetProperty(aura::client::kShowStateKey) == | 579 return window_ && window_->GetProperty(aura::client::kShowStateKey) == |
579 ui::SHOW_STATE_FULLSCREEN; | 580 ui::SHOW_STATE_FULLSCREEN; |
580 } | 581 } |
581 | 582 |
582 void NativeWidgetAura::SetOpacity(unsigned char opacity) { | 583 void NativeWidgetAura::SetOpacity(unsigned char opacity) { |
583 if (window_) | 584 if (window_) |
584 window_->layer()->SetOpacity(opacity / 255.0); | 585 window_->layer()->SetOpacity(opacity / 255.0); |
585 } | 586 } |
586 | 587 |
| 588 void NativeWidgetAura::SetHasActivationShadow(bool has_shadow) { |
| 589 SetShadowType(window_, has_shadow ? wm::SHADOW_TYPE_RECTANGULAR |
| 590 : wm::SHADOW_TYPE_NONE); |
| 591 } |
| 592 |
587 void NativeWidgetAura::SetUseDragFrame(bool use_drag_frame) { | 593 void NativeWidgetAura::SetUseDragFrame(bool use_drag_frame) { |
588 NOTIMPLEMENTED(); | 594 NOTIMPLEMENTED(); |
589 } | 595 } |
590 | 596 |
591 void NativeWidgetAura::FlashFrame(bool flash) { | 597 void NativeWidgetAura::FlashFrame(bool flash) { |
592 if (window_) | 598 if (window_) |
593 window_->SetProperty(aura::client::kDrawAttentionKey, flash); | 599 window_->SetProperty(aura::client::kDrawAttentionKey, flash); |
594 } | 600 } |
595 | 601 |
596 void NativeWidgetAura::RunShellDrag(View* view, | 602 void NativeWidgetAura::RunShellDrag(View* view, |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1153 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont)); | 1159 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont)); |
1154 base::win::ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont))); | 1160 base::win::ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont))); |
1155 return gfx::FontList(gfx::Font(caption_font)); | 1161 return gfx::FontList(gfx::Font(caption_font)); |
1156 #else | 1162 #else |
1157 return gfx::FontList(); | 1163 return gfx::FontList(); |
1158 #endif | 1164 #endif |
1159 } | 1165 } |
1160 | 1166 |
1161 } // namespace internal | 1167 } // namespace internal |
1162 } // namespace views | 1168 } // namespace views |
OLD | NEW |