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 "ash/magnifier/partial_magnification_controller.h" | 5 #include "ash/magnifier/partial_magnification_controller.h" |
6 | 6 |
7 #include "ash/common/system/chromeos/palette/palette_utils.h" | 7 #include "ash/common/system/chromeos/palette/palette_utils.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "third_party/skia/include/core/SkDrawLooper.h" | 9 #include "third_party/skia/include/core/SkDrawLooper.h" |
10 #include "ui/aura/window_event_dispatcher.h" | 10 #include "ui/aura/window_event_dispatcher.h" |
11 #include "ui/aura/window_tree_host.h" | 11 #include "ui/aura/window_tree_host.h" |
12 #include "ui/compositor/layer.h" | 12 #include "ui/compositor/layer.h" |
13 #include "ui/compositor/paint_recorder.h" | 13 #include "ui/compositor/paint_recorder.h" |
14 #include "ui/events/event.h" | 14 #include "ui/events/event.h" |
15 #include "ui/events/event_constants.h" | 15 #include "ui/events/event_constants.h" |
16 #include "ui/gfx/shadow_value.h" | 16 #include "ui/gfx/shadow_value.h" |
| 17 #include "ui/gfx/skia_paint_util.h" |
17 #include "ui/views/widget/widget.h" | 18 #include "ui/views/widget/widget.h" |
18 #include "ui/wm/core/coordinate_conversion.h" | 19 #include "ui/wm/core/coordinate_conversion.h" |
19 | 20 |
20 namespace ash { | 21 namespace ash { |
21 namespace { | 22 namespace { |
22 | 23 |
23 // Ratio of magnifier scale. | 24 // Ratio of magnifier scale. |
24 const float kMagnificationScale = 2.f; | 25 const float kMagnificationScale = 2.f; |
25 // Radius of the magnifying glass in DIP. This does not include the thickness | 26 // Radius of the magnifying glass in DIP. This does not include the thickness |
26 // of the magnifying glass shadow and border. | 27 // of the magnifying glass shadow and border. |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 | 372 |
372 void PartialMagnificationController::RemoveZoomWidgetObservers() { | 373 void PartialMagnificationController::RemoveZoomWidgetObservers() { |
373 DCHECK(host_widget_); | 374 DCHECK(host_widget_); |
374 host_widget_->RemoveObserver(this); | 375 host_widget_->RemoveObserver(this); |
375 aura::Window* root_window = host_widget_->GetNativeView()->GetRootWindow(); | 376 aura::Window* root_window = host_widget_->GetNativeView()->GetRootWindow(); |
376 DCHECK(root_window); | 377 DCHECK(root_window); |
377 root_window->RemoveObserver(this); | 378 root_window->RemoveObserver(this); |
378 } | 379 } |
379 | 380 |
380 } // namespace ash | 381 } // namespace ash |
OLD | NEW |