| 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 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 819 } | 819 } |
| 820 | 820 |
| 821 bool NativeWidgetAura::CanFocus() { | 821 bool NativeWidgetAura::CanFocus() { |
| 822 return ShouldActivate(); | 822 return ShouldActivate(); |
| 823 } | 823 } |
| 824 | 824 |
| 825 void NativeWidgetAura::OnCaptureLost() { | 825 void NativeWidgetAura::OnCaptureLost() { |
| 826 delegate_->OnMouseCaptureLost(); | 826 delegate_->OnMouseCaptureLost(); |
| 827 } | 827 } |
| 828 | 828 |
| 829 void NativeWidgetAura::OnPaint(gfx::Canvas* canvas) { | 829 void NativeWidgetAura::OnPaint(const ui::PaintContext& context) { |
| 830 delegate_->OnNativeWidgetPaint(canvas); | 830 delegate_->OnNativeWidgetPaint(context); |
| 831 } | 831 } |
| 832 | 832 |
| 833 void NativeWidgetAura::OnDeviceScaleFactorChanged(float device_scale_factor) { | 833 void NativeWidgetAura::OnDeviceScaleFactorChanged(float device_scale_factor) { |
| 834 GetWidget()->DeviceScaleFactorChanged(device_scale_factor); | 834 GetWidget()->DeviceScaleFactorChanged(device_scale_factor); |
| 835 } | 835 } |
| 836 | 836 |
| 837 void NativeWidgetAura::OnWindowDestroying(aura::Window* window) { | 837 void NativeWidgetAura::OnWindowDestroying(aura::Window* window) { |
| 838 window_->RemoveObserver(this); | 838 window_->RemoveObserver(this); |
| 839 delegate_->OnNativeWidgetDestroying(); | 839 delegate_->OnNativeWidgetDestroying(); |
| 840 | 840 |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1205 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont)); | 1205 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont)); |
| 1206 base::win::ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont))); | 1206 base::win::ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont))); |
| 1207 return gfx::FontList(gfx::Font(caption_font)); | 1207 return gfx::FontList(gfx::Font(caption_font)); |
| 1208 #else | 1208 #else |
| 1209 return gfx::FontList(); | 1209 return gfx::FontList(); |
| 1210 #endif | 1210 #endif |
| 1211 } | 1211 } |
| 1212 | 1212 |
| 1213 } // namespace internal | 1213 } // namespace internal |
| 1214 } // namespace views | 1214 } // namespace views |
| OLD | NEW |