Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(527)

Side by Side Diff: ash/magnifier/partial_magnification_controller.h

Issue 2095193002: clang-format all of //ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifndef ASH_MAGNIFIER_PARTIAL_MAGNIFICATION_CONTROLLER_H_ 5 #ifndef ASH_MAGNIFIER_PARTIAL_MAGNIFICATION_CONTROLLER_H_
6 #define ASH_MAGNIFIER_PARTIAL_MAGNIFICATION_CONTROLLER_H_ 6 #define ASH_MAGNIFIER_PARTIAL_MAGNIFICATION_CONTROLLER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/aura/window_observer.h" 9 #include "ui/aura/window_observer.h"
10 #include "ui/events/event_handler.h" 10 #include "ui/events/event_handler.h"
11 #include "ui/gfx/geometry/point.h" 11 #include "ui/gfx/geometry/point.h"
12 #include "ui/views/widget/widget_observer.h" 12 #include "ui/views/widget/widget_observer.h"
13 13
14 namespace ash { 14 namespace ash {
15 15
16 const float kDefaultPartialMagnifiedScale = 1.5f; 16 const float kDefaultPartialMagnifiedScale = 1.5f;
17 const float kNonPartialMagnifiedScale = 1.0f; 17 const float kNonPartialMagnifiedScale = 1.0f;
18 18
19 // Controls the partial screen magnifier, which is a small area of the screen 19 // Controls the partial screen magnifier, which is a small area of the screen
20 // which is zoomed in. The zoomed area follows the mouse cursor when enabled. 20 // which is zoomed in. The zoomed area follows the mouse cursor when enabled.
21 class PartialMagnificationController 21 class PartialMagnificationController : public ui::EventHandler,
22 : public ui::EventHandler, 22 public aura::WindowObserver,
23 public aura::WindowObserver, 23 public views::WidgetObserver {
24 public views::WidgetObserver {
25 public: 24 public:
26 PartialMagnificationController(); 25 PartialMagnificationController();
27 ~PartialMagnificationController() override; 26 ~PartialMagnificationController() override;
28 27
29 // Enables (or disables if |enabled| is false) partial screen magnifier 28 // Enables (or disables if |enabled| is false) partial screen magnifier
30 // feature. 29 // feature.
31 virtual void SetEnabled(bool enabled); 30 virtual void SetEnabled(bool enabled);
32 31
33 bool is_enabled() const { return is_enabled_; } 32 bool is_enabled() const { return is_enabled_; }
34 33
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 gfx::Point origin_; 78 gfx::Point origin_;
80 79
81 views::Widget* zoom_widget_; 80 views::Widget* zoom_widget_;
82 81
83 DISALLOW_COPY_AND_ASSIGN(PartialMagnificationController); 82 DISALLOW_COPY_AND_ASSIGN(PartialMagnificationController);
84 }; 83 };
85 84
86 } // namespace ash 85 } // namespace ash
87 86
88 #endif // ASH_MAGNIFIER_PARTIAL_MAGNIFICATION_CONTROLLER_H_ 87 #endif // ASH_MAGNIFIER_PARTIAL_MAGNIFICATION_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/magnifier/magnification_controller_unittest.cc ('k') | ash/magnifier/partial_magnification_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698