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

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: Initialize/Clear TextSelection for each view + make GetTextSelection() const. 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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 // While the mouse is locked, the cursor is hidden from the user. Mouse events 419 // While the mouse is locked, the cursor is hidden from the user. Mouse events
420 // are still generated. However, the position they report is the last known 420 // are still generated. However, the position they report is the last known
421 // mouse position just as mouse lock was entered; the movement they report 421 // mouse position just as mouse lock was entered; the movement they report
422 // indicates what the change in position of the mouse would be had it not been 422 // indicates what the change in position of the mouse would be had it not been
423 // locked. 423 // locked.
424 bool mouse_locked_; 424 bool mouse_locked_;
425 425
426 // Whether we are showing a context menu. 426 // Whether we are showing a context menu.
427 bool showing_context_menu_; 427 bool showing_context_menu_;
428 428
429 // TODO(ekaramad): In aura, text selection tracking for IME is done through the
430 // TextInputManager. We still need the following variables for other platforms.
431 // Remove them when tracking is done by TextInputManager on all platforms
432 // (https://crbug.com/578168 and https://crbug.com/602427).
433 #if !defined(USE_AURA)
429 // A buffer containing the text inside and around the current selection range. 434 // A buffer containing the text inside and around the current selection range.
430 base::string16 selection_text_; 435 base::string16 selection_text_;
431 436
432 // The offset of the text stored in |selection_text_| relative to the start of 437 // The offset of the text stored in |selection_text_| relative to the start of
433 // the web page. 438 // the web page.
434 size_t selection_text_offset_; 439 size_t selection_text_offset_;
435 440
436 // The current selection range relative to the start of the web page. 441 // The current selection range relative to the start of the web page.
437 gfx::Range selection_range_; 442 gfx::Range selection_range_;
443 #endif
438 444
439 // The scale factor of the display the renderer is currently on. 445 // The scale factor of the display the renderer is currently on.
440 float current_device_scale_factor_; 446 float current_device_scale_factor_;
441 447
442 // The orientation of the display the renderer is currently on. 448 // The orientation of the display the renderer is currently on.
443 display::Display::Rotation current_display_rotation_; 449 display::Display::Rotation current_display_rotation_;
444 450
445 // Whether pinch-to-zoom should be enabled and pinch events forwarded to the 451 // Whether pinch-to-zoom should be enabled and pinch events forwarded to the
446 // renderer. 452 // renderer.
447 bool pinch_zoom_enabled_; 453 bool pinch_zoom_enabled_;
(...skipping 16 matching lines...) Expand all
464 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; 470 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_;
465 471
466 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; 472 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_;
467 473
468 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); 474 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase);
469 }; 475 };
470 476
471 } // namespace content 477 } // namespace content
472 478
473 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ 479 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698