Chromium Code Reviews| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 169 drop_helper_.reset(new DropHelper(GetWidget()->GetRootView())); | 170 drop_helper_.reset(new DropHelper(GetWidget()->GetRootView())); |
| 170 if (params.type != Widget::InitParams::TYPE_TOOLTIP && | 171 if (params.type != Widget::InitParams::TYPE_TOOLTIP && |
| 171 params.type != Widget::InitParams::TYPE_POPUP) { | 172 params.type != Widget::InitParams::TYPE_POPUP) { |
| 172 aura::client::SetDragDropDelegate(window_, this); | 173 aura::client::SetDragDropDelegate(window_, this); |
| 173 } | 174 } |
| 174 | 175 |
| 175 aura::client::SetActivationDelegate(window_, this); | 176 aura::client::SetActivationDelegate(window_, this); |
| 176 | 177 |
| 177 window_reorderer_.reset(new WindowReorderer(window_, | 178 window_reorderer_.reset(new WindowReorderer(window_, |
| 178 GetWidget()->GetRootView())); | 179 GetWidget()->GetRootView())); |
| 180 | |
| 181 if (!params.has_dropshadow) | |
|
tapted
2014/05/04 23:43:39
This might be a different kind of shadow. I think
Andre
2014/05/05 22:41:29
OK, I added Widget::SetHasShadow to replace this.
| |
| 182 SetShadowType(window_, wm::SHADOW_TYPE_NONE); | |
| 179 } | 183 } |
| 180 | 184 |
| 181 NonClientFrameView* NativeWidgetAura::CreateNonClientFrameView() { | 185 NonClientFrameView* NativeWidgetAura::CreateNonClientFrameView() { |
| 182 return NULL; | 186 return NULL; |
| 183 } | 187 } |
| 184 | 188 |
| 185 bool NativeWidgetAura::ShouldUseNativeFrame() const { | 189 bool NativeWidgetAura::ShouldUseNativeFrame() const { |
| 186 // There is only one frame type for aura. | 190 // There is only one frame type for aura. |
| 187 return false; | 191 return false; |
| 188 } | 192 } |
| (...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1140 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont)); | 1144 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont)); |
| 1141 base::win::ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont))); | 1145 base::win::ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont))); |
| 1142 return gfx::FontList(gfx::Font(caption_font)); | 1146 return gfx::FontList(gfx::Font(caption_font)); |
| 1143 #else | 1147 #else |
| 1144 return gfx::FontList(); | 1148 return gfx::FontList(); |
| 1145 #endif | 1149 #endif |
| 1146 } | 1150 } |
| 1147 | 1151 |
| 1148 } // namespace internal | 1152 } // namespace internal |
| 1149 } // namespace views | 1153 } // namespace views |
| OLD | NEW |