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

Side by Side Diff: content/browser/web_contents/aura/gesture_nav_simple.h

Issue 2986483002: Adding metrics logging for Simplified Gesture Navigation. (Closed)
Patch Set: Fixing tests. Created 3 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CONTENT_BROWSER_WEB_CONTENTS_AURA_GESTURE_NAV_SIMPLE_H_ 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_AURA_GESTURE_NAV_SIMPLE_H_
6 #define CONTENT_BROWSER_WEB_CONTENTS_AURA_GESTURE_NAV_SIMPLE_H_ 6 #define CONTENT_BROWSER_WEB_CONTENTS_AURA_GESTURE_NAV_SIMPLE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "content/browser/renderer_host/overscroll_controller_delegate.h" 11 #include "content/browser/renderer_host/overscroll_controller_delegate.h"
12 #include "content/browser/web_contents/aura/types.h"
12 13
13 namespace content { 14 namespace content {
14 15
15 class Affordance; 16 class Affordance;
16 class WebContentsImpl; 17 class WebContentsImpl;
17 18
18 // A simple delegate for the overscroll controller that paints an arrow on top 19 // A simple delegate for the overscroll controller that paints an arrow on top
19 // of the web-contents as a hint for pending navigations from overscroll. 20 // of the web-contents as a hint for pending navigations from overscroll.
20 class GestureNavSimple : public OverscrollControllerDelegate { 21 class GestureNavSimple : public OverscrollControllerDelegate {
21 public: 22 public:
(...skipping 14 matching lines...) Expand all
36 bool OnOverscrollUpdate(float delta_x, float delta_y) override; 37 bool OnOverscrollUpdate(float delta_x, float delta_y) override;
37 void OnOverscrollComplete(OverscrollMode overscroll_mode) override; 38 void OnOverscrollComplete(OverscrollMode overscroll_mode) override;
38 void OnOverscrollModeChange(OverscrollMode old_mode, 39 void OnOverscrollModeChange(OverscrollMode old_mode,
39 OverscrollMode new_mode, 40 OverscrollMode new_mode,
40 OverscrollSource source) override; 41 OverscrollSource source) override;
41 base::Optional<float> GetMaxOverscrollDelta() const override; 42 base::Optional<float> GetMaxOverscrollDelta() const override;
42 43
43 WebContentsImpl* web_contents_; 44 WebContentsImpl* web_contents_;
44 std::unique_ptr<Affordance> affordance_; 45 std::unique_ptr<Affordance> affordance_;
45 float completion_threshold_; 46 float completion_threshold_;
47 NavigationDirection direction_ = NavigationDirection::NONE;
mohsen 2017/07/20 18:00:41 Instead of adding |direction_|, can you use Oversc
mfomitchev 2017/07/21 00:10:07 Got rid of direction. I left NavigationDirection,
48 OverscrollSource source_ = OverscrollSource::NONE;
46 49
47 DISALLOW_COPY_AND_ASSIGN(GestureNavSimple); 50 DISALLOW_COPY_AND_ASSIGN(GestureNavSimple);
48 }; 51 };
49 52
50 } // namespace content 53 } // namespace content
51 54
52 #endif // CONTENT_BROWSER_WEB_CONTENTS_AURA_GESTURE_NAV_SIMPLE_H_ 55 #endif // CONTENT_BROWSER_WEB_CONTENTS_AURA_GESTURE_NAV_SIMPLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698