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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_base.h

Issue 2208093004: Use focused RenderWidgetHostImpl instead of TextInputManager::GetActiveWidget() to obtain TextSelec… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed some crashes Created 4 years, 4 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 CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 class SurfaceHittestDelegate; 57 class SurfaceHittestDelegate;
58 } 58 }
59 59
60 namespace ui { 60 namespace ui {
61 class LatencyInfo; 61 class LatencyInfo;
62 } 62 }
63 63
64 namespace content { 64 namespace content {
65 class BrowserAccessibilityDelegate; 65 class BrowserAccessibilityDelegate;
66 class BrowserAccessibilityManager; 66 class BrowserAccessibilityManager;
67 class RenderWidgetHostImpl;
67 class RenderWidgetHostViewBaseObserver; 68 class RenderWidgetHostViewBaseObserver;
68 class SyntheticGesture; 69 class SyntheticGesture;
69 class SyntheticGestureTarget; 70 class SyntheticGestureTarget;
70 class TextInputManager; 71 class TextInputManager;
71 class WebCursor; 72 class WebCursor;
72 struct DidOverscrollParams; 73 struct DidOverscrollParams;
73 struct NativeWebKeyboardEvent; 74 struct NativeWebKeyboardEvent;
74 struct TextInputState; 75 struct TextInputState;
75 76
76 // Basic implementation shared by concrete RenderWidgetHostView subclasses. 77 // Basic implementation shared by concrete RenderWidgetHostView subclasses.
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 // null reference is obtained, its value is cached in |text_input_manager_| 411 // null reference is obtained, its value is cached in |text_input_manager_|
411 // and this view is registered with it. The RWHV will unregister from the 412 // and this view is registered with it. The RWHV will unregister from the
412 // TextInputManager if it is destroyed or if the TextInputManager itself is 413 // TextInputManager if it is destroyed or if the TextInputManager itself is
413 // destroyed. The unregistration of the RWHV from TextInputManager is 414 // destroyed. The unregistration of the RWHV from TextInputManager is
414 // necessary and must be done by explicitly calling 415 // necessary and must be done by explicitly calling
415 // TextInputManager::Unregister. 416 // TextInputManager::Unregister.
416 // It is safer to use this method rather than directly dereferencing 417 // It is safer to use this method rather than directly dereferencing
417 // |text_input_manager_|. 418 // |text_input_manager_|.
418 TextInputManager* GetTextInputManager(); 419 TextInputManager* GetTextInputManager();
419 420
421 // This method returns the active widget form TextInputManager. If there are
Charlie Reis 2016/08/04 19:56:50 s/form/from/ Also, do you mean "If there are no a
EhsanK 2016/08/04 22:29:55 I removed this from patch. But why I had it: GetAc
422 // active widgets, this method will return the focused widget instead.
423 RenderWidgetHostImpl* ActiveOrFocusedWidget() const;
424
420 // Whether this view is a popup and what kind of popup it is (select, 425 // Whether this view is a popup and what kind of popup it is (select,
421 // autofill...). 426 // autofill...).
422 blink::WebPopupType popup_type_; 427 blink::WebPopupType popup_type_;
423 428
424 // The background color of the web content. 429 // The background color of the web content.
425 SkColor background_color_; 430 SkColor background_color_;
426 431
427 // While the mouse is locked, the cursor is hidden from the user. Mouse events 432 // While the mouse is locked, the cursor is hidden from the user. Mouse events
428 // are still generated. However, the position they report is the last known 433 // are still generated. However, the position they report is the last known
429 // mouse position just as mouse lock was entered; the movement they report 434 // mouse position just as mouse lock was entered; the movement they report
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; 483 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_;
479 484
480 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; 485 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_;
481 486
482 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); 487 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase);
483 }; 488 };
484 489
485 } // namespace content 490 } // namespace content
486 491
487 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ 492 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698