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

Side by Side Diff: cc/input/browser_controls_offset_manager.h

Issue 2833383002: Remove redundant SupportsWeakPtr from BrowserControlsOffsetManager (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 CC_INPUT_BROWSER_CONTROLS_OFFSET_MANAGER_H_ 5 #ifndef CC_INPUT_BROWSER_CONTROLS_OFFSET_MANAGER_H_
6 #define CC_INPUT_BROWSER_CONTROLS_OFFSET_MANAGER_H_ 6 #define CC_INPUT_BROWSER_CONTROLS_OFFSET_MANAGER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/weak_ptr.h"
12 #include "base/time/time.h" 11 #include "base/time/time.h"
13 #include "cc/input/browser_controls_state.h" 12 #include "cc/input/browser_controls_state.h"
14 #include "cc/layers/layer_impl.h" 13 #include "cc/layers/layer_impl.h"
15 #include "ui/gfx/geometry/size.h" 14 #include "ui/gfx/geometry/size.h"
16 #include "ui/gfx/geometry/vector2d_f.h" 15 #include "ui/gfx/geometry/vector2d_f.h"
17 16
18 namespace cc { 17 namespace cc {
19 18
20 class BrowserControlsOffsetManagerClient; 19 class BrowserControlsOffsetManagerClient;
21 20
22 // Manages the position of the browser controls. 21 // Manages the position of the browser controls.
23 class CC_EXPORT BrowserControlsOffsetManager 22 class CC_EXPORT BrowserControlsOffsetManager {
24 : public base::SupportsWeakPtr<BrowserControlsOffsetManager> {
25 public: 23 public:
26 enum AnimationDirection { NO_ANIMATION, SHOWING_CONTROLS, HIDING_CONTROLS }; 24 enum AnimationDirection { NO_ANIMATION, SHOWING_CONTROLS, HIDING_CONTROLS };
27 25
28 static std::unique_ptr<BrowserControlsOffsetManager> Create( 26 static std::unique_ptr<BrowserControlsOffsetManager> Create(
29 BrowserControlsOffsetManagerClient* client, 27 BrowserControlsOffsetManagerClient* client,
30 float controls_show_threshold, 28 float controls_show_threshold,
31 float controls_hide_threshold); 29 float controls_hide_threshold);
32 virtual ~BrowserControlsOffsetManager(); 30 virtual ~BrowserControlsOffsetManager();
33 31
34 // The offset from the window top to the top edge of the controls. Runs from 0 32 // The offset from the window top to the top edge of the controls. Runs from 0
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 float controls_hide_threshold_; 105 float controls_hide_threshold_;
108 106
109 bool pinch_gesture_active_; 107 bool pinch_gesture_active_;
110 108
111 DISALLOW_COPY_AND_ASSIGN(BrowserControlsOffsetManager); 109 DISALLOW_COPY_AND_ASSIGN(BrowserControlsOffsetManager);
112 }; 110 };
113 111
114 } // namespace cc 112 } // namespace cc
115 113
116 #endif // CC_INPUT_BROWSER_CONTROLS_OFFSET_MANAGER_H_ 114 #endif // CC_INPUT_BROWSER_CONTROLS_OFFSET_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698