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

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

Issue 2132633002: Tracking composition range on the browser side (Aura) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatting Fixes 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 265
266 // Notifies the view that the renderer selection bounds has changed. 266 // Notifies the view that the renderer selection bounds has changed.
267 // Selection bounds are described as a focus bound which is the current 267 // Selection bounds are described as a focus bound which is the current
268 // position of caret on the screen, as well as the anchor bound which is the 268 // position of caret on the screen, as well as the anchor bound which is the
269 // starting position of the selection. The coordinates are with respect to 269 // starting position of the selection. The coordinates are with respect to
270 // RenderWidget's window's origin. Focus and anchor bound are represented as 270 // RenderWidget's window's origin. Focus and anchor bound are represented as
271 // gfx::Rect. 271 // gfx::Rect.
272 virtual void SelectionBoundsChanged( 272 virtual void SelectionBoundsChanged(
273 const ViewHostMsg_SelectionBounds_Params& params); 273 const ViewHostMsg_SelectionBounds_Params& params);
274 274
275 // Updates the range of the marked text in an IME composition.
276 virtual void ImeCompositionRangeChanged(
277 const gfx::Range& range,
278 const std::vector<gfx::Rect>& character_bounds);
279
275 //---------------------------------------------------------------------------- 280 //----------------------------------------------------------------------------
276 // The following static methods are implemented by each platform. 281 // The following static methods are implemented by each platform.
277 282
278 static void GetDefaultScreenInfo(blink::WebScreenInfo* results); 283 static void GetDefaultScreenInfo(blink::WebScreenInfo* results);
279 284
280 //---------------------------------------------------------------------------- 285 //----------------------------------------------------------------------------
281 // The following pure virtual methods are implemented by derived classes. 286 // The following pure virtual methods are implemented by derived classes.
282 287
283 // Perform all the initialization steps necessary for this object to represent 288 // Perform all the initialization steps necessary for this object to represent
284 // a popup (such as a <select> dropdown), then shows the popup at |pos|. 289 // a popup (such as a <select> dropdown), then shows the popup at |pos|.
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 const SkBitmap& zoomed_bitmap); 380 const SkBitmap& zoomed_bitmap);
376 381
377 // Called by the WebContentsImpl when a user tries to navigate a new page on 382 // Called by the WebContentsImpl when a user tries to navigate a new page on
378 // main frame. 383 // main frame.
379 virtual void OnDidNavigateMainFrameToNewPage(); 384 virtual void OnDidNavigateMainFrameToNewPage();
380 385
381 // Instructs the view to not drop the surface even when the view is hidden. 386 // Instructs the view to not drop the surface even when the view is hidden.
382 virtual void LockCompositingSurface() = 0; 387 virtual void LockCompositingSurface() = 0;
383 virtual void UnlockCompositingSurface() = 0; 388 virtual void UnlockCompositingSurface() = 0;
384 389
385 // Updates the range of the marked text in an IME composition.
386 virtual void ImeCompositionRangeChanged(
387 const gfx::Range& range,
388 const std::vector<gfx::Rect>& character_bounds) = 0;
389
390 // Add and remove observers for lifetime event notifications. The order in 390 // Add and remove observers for lifetime event notifications. The order in
391 // which notifications are sent to observers is undefined. Clients must be 391 // which notifications are sent to observers is undefined. Clients must be
392 // sure to remove the observer before they go away. 392 // sure to remove the observer before they go away.
393 void AddObserver(RenderWidgetHostViewBaseObserver* observer); 393 void AddObserver(RenderWidgetHostViewBaseObserver* observer);
394 void RemoveObserver(RenderWidgetHostViewBaseObserver* observer); 394 void RemoveObserver(RenderWidgetHostViewBaseObserver* observer);
395 395
396 // Exposed for testing. 396 // Exposed for testing.
397 virtual bool IsChildFrameForTesting() const; 397 virtual bool IsChildFrameForTesting() const;
398 virtual cc::SurfaceId SurfaceIdForTesting() const; 398 virtual cc::SurfaceId SurfaceIdForTesting() const;
399 399
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; 470 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_;
471 471
472 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; 472 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_;
473 473
474 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); 474 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase);
475 }; 475 };
476 476
477 } // namespace content 477 } // namespace content
478 478
479 #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