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

Side by Side Diff: content/browser/renderer_host/input/touch_selection_controller_client_aura.h

Issue 2201853002: Blink handle selection handle visibility (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing clear handles Created 4 years, 1 month 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_RENDERER_HOST_INPUT_TOUCH_SELECTION_CONTROLLER_CLIENT_AU RA_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_SELECTION_CONTROLLER_CLIENT_AU RA_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_SELECTION_CONTROLLER_CLIENT_AU RA_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_SELECTION_CONTROLLER_CLIENT_AU RA_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // the quick menu instead, if appropriate. Returns |true| to indicate that no 43 // the quick menu instead, if appropriate. Returns |true| to indicate that no
44 // further handling is needed. 44 // further handling is needed.
45 // TODO(mohsen): This is to match Chrome on Android behavior. However, it is 45 // TODO(mohsen): This is to match Chrome on Android behavior. However, it is
46 // better not to send context menu request from the renderer in this case and 46 // better not to send context menu request from the renderer in this case and
47 // instead decide in the client about showing the quick menu in response to 47 // instead decide in the client about showing the quick menu in response to
48 // selection events. (http://crbug.com/548245) 48 // selection events. (http://crbug.com/548245)
49 bool HandleContextMenu(const ContextMenuParams& params); 49 bool HandleContextMenu(const ContextMenuParams& params);
50 50
51 private: 51 private:
52 friend class TestTouchSelectionControllerClientAura; 52 friend class TestTouchSelectionControllerClientAura;
53 class EnvPreTargetHandler;
54 53
55 bool IsQuickMenuAvailable() const; 54 bool IsQuickMenuAvailable() const;
56 void ShowQuickMenu(); 55 void ShowQuickMenu();
57 void UpdateQuickMenu(); 56 void UpdateQuickMenu();
58 57
59 // ui::TouchSelectionControllerClient: 58 // ui::TouchSelectionControllerClient:
60 bool SupportsAnimation() const override; 59 bool SupportsAnimation() const override;
61 void SetNeedsAnimate() override; 60 void SetNeedsAnimate() override;
62 void MoveCaret(const gfx::PointF& position) override; 61 void MoveCaret(const gfx::PointF& position) override;
63 void MoveRangeSelectionExtent(const gfx::PointF& extent) override; 62 void MoveRangeSelectionExtent(const gfx::PointF& extent) override;
(...skipping 11 matching lines...) Expand all
75 RenderWidgetHostViewAura* rwhva_; 74 RenderWidgetHostViewAura* rwhva_;
76 75
77 base::Timer quick_menu_timer_; 76 base::Timer quick_menu_timer_;
78 bool quick_menu_requested_; 77 bool quick_menu_requested_;
79 bool touch_down_; 78 bool touch_down_;
80 bool scroll_in_progress_; 79 bool scroll_in_progress_;
81 bool handle_drag_in_progress_; 80 bool handle_drag_in_progress_;
82 81
83 bool show_quick_menu_immediately_for_test_; 82 bool show_quick_menu_immediately_for_test_;
84 83
85 // A pre-target event handler for aura::Env which deactivates touch selection
86 // on mouse and keyboard events.
87 std::unique_ptr<EnvPreTargetHandler> env_pre_target_handler_;
88
89 DISALLOW_COPY_AND_ASSIGN(TouchSelectionControllerClientAura); 84 DISALLOW_COPY_AND_ASSIGN(TouchSelectionControllerClientAura);
90 }; 85 };
91 86
92 } // namespace content 87 } // namespace content
93 88
94 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_SELECTION_CONTROLLER_CLIENT _AURA_H_ 89 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_SELECTION_CONTROLLER_CLIENT _AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698