| 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/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| 11 #include "third_party/skia/include/core/SkRegion.h" | 11 #include "third_party/skia/include/core/SkRegion.h" |
| 12 #include "ui/aura/client/aura_constants.h" | 12 #include "ui/aura/client/aura_constants.h" |
| 13 #include "ui/aura/client/capture_client.h" |
| 13 #include "ui/aura/client/cursor_client.h" | 14 #include "ui/aura/client/cursor_client.h" |
| 14 #include "ui/aura/client/focus_client.h" | 15 #include "ui/aura/client/focus_client.h" |
| 15 #include "ui/aura/client/screen_position_client.h" | 16 #include "ui/aura/client/screen_position_client.h" |
| 16 #include "ui/aura/client/window_tree_client.h" | 17 #include "ui/aura/client/window_tree_client.h" |
| 17 #include "ui/aura/env.h" | 18 #include "ui/aura/env.h" |
| 18 #include "ui/aura/window.h" | 19 #include "ui/aura/window.h" |
| 19 #include "ui/aura/window_event_dispatcher.h" | 20 #include "ui/aura/window_event_dispatcher.h" |
| 20 #include "ui/aura/window_observer.h" | 21 #include "ui/aura/window_observer.h" |
| 21 #include "ui/aura/window_tree_host.h" | 22 #include "ui/aura/window_tree_host.h" |
| 22 #include "ui/base/dragdrop/os_exchange_data.h" | 23 #include "ui/base/dragdrop/os_exchange_data.h" |
| (...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1179 NONCLIENTMETRICS_XP ncm; | 1180 NONCLIENTMETRICS_XP ncm; |
| 1180 base::win::GetNonClientMetrics(&ncm); | 1181 base::win::GetNonClientMetrics(&ncm); |
| 1181 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont)); | 1182 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont)); |
| 1182 base::win::ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont))); | 1183 base::win::ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont))); |
| 1183 return gfx::FontList(gfx::Font(caption_font.get())); | 1184 return gfx::FontList(gfx::Font(caption_font.get())); |
| 1184 #else | 1185 #else |
| 1185 return gfx::FontList(); | 1186 return gfx::FontList(); |
| 1186 #endif | 1187 #endif |
| 1187 } | 1188 } |
| 1188 | 1189 |
| 1190 // static |
| 1191 gfx::NativeView NativeWidgetPrivate::GetGlobalCapture( |
| 1192 gfx::NativeView native_view) { |
| 1193 aura::client::CaptureClient* capture_client = |
| 1194 aura::client::GetCaptureClient(native_view->GetRootWindow()); |
| 1195 if (!capture_client) |
| 1196 return nullptr; |
| 1197 return capture_client->GetGlobalCaptureWindow(); |
| 1198 } |
| 1199 |
| 1189 } // namespace internal | 1200 } // namespace internal |
| 1190 } // namespace views | 1201 } // namespace views |
| OLD | NEW |