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

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

Issue 2130133004: Tracking text selection on the browser side in OOPIF. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase added GetSelectedText() and its unit test back Created 4 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 (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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 // While the mouse is locked, the cursor is hidden from the user. Mouse events 425 // While the mouse is locked, the cursor is hidden from the user. Mouse events
426 // are still generated. However, the position they report is the last known 426 // are still generated. However, the position they report is the last known
427 // mouse position just as mouse lock was entered; the movement they report 427 // mouse position just as mouse lock was entered; the movement they report
428 // indicates what the change in position of the mouse would be had it not been 428 // indicates what the change in position of the mouse would be had it not been
429 // locked. 429 // locked.
430 bool mouse_locked_; 430 bool mouse_locked_;
431 431
432 // Whether we are showing a context menu. 432 // Whether we are showing a context menu.
433 bool showing_context_menu_; 433 bool showing_context_menu_;
434 434
435 // TODO(ekaramad): In aura, text selection tracking for IME is done through the
436 // TextInputManager. We still need the following variables for other platforms.
437 // Remove them when tracking is done by TextInputManager on all platforms
438 // (https://crbug.com/578168).
439 #if !defined(USE_AURA)
435 // A buffer containing the text inside and around the current selection range. 440 // A buffer containing the text inside and around the current selection range.
436 base::string16 selection_text_; 441 base::string16 selection_text_;
437 442
438 // The offset of the text stored in |selection_text_| relative to the start of 443 // The offset of the text stored in |selection_text_| relative to the start of
439 // the web page. 444 // the web page.
440 size_t selection_text_offset_; 445 size_t selection_text_offset_;
441 446
442 // The current selection range relative to the start of the web page. 447 // The current selection range relative to the start of the web page.
443 gfx::Range selection_range_; 448 gfx::Range selection_range_;
449 #endif
444 450
445 // The scale factor of the display the renderer is currently on. 451 // The scale factor of the display the renderer is currently on.
446 float current_device_scale_factor_; 452 float current_device_scale_factor_;
447 453
448 // The orientation of the display the renderer is currently on. 454 // The orientation of the display the renderer is currently on.
449 display::Display::Rotation current_display_rotation_; 455 display::Display::Rotation current_display_rotation_;
450 456
451 // Whether pinch-to-zoom should be enabled and pinch events forwarded to the 457 // Whether pinch-to-zoom should be enabled and pinch events forwarded to the
452 // renderer. 458 // renderer.
453 bool pinch_zoom_enabled_; 459 bool pinch_zoom_enabled_;
(...skipping 16 matching lines...) Expand all
470 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; 476 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_;
471 477
472 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; 478 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_;
473 479
474 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); 480 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase);
475 }; 481 };
476 482
477 } // namespace content 483 } // namespace content
478 484
479 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ 485 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698