Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 392 const SkBitmap& zoomed_bitmap); | 392 const SkBitmap& zoomed_bitmap); |
| 393 | 393 |
| 394 // Called by the WebContentsImpl when a user tries to navigate a new page on | 394 // Called by the WebContentsImpl when a user tries to navigate a new page on |
| 395 // main frame. | 395 // main frame. |
| 396 virtual void OnDidNavigateMainFrameToNewPage(); | 396 virtual void OnDidNavigateMainFrameToNewPage(); |
| 397 | 397 |
| 398 // Instructs the view to not drop the surface even when the view is hidden. | 398 // Instructs the view to not drop the surface even when the view is hidden. |
| 399 virtual void LockCompositingSurface() = 0; | 399 virtual void LockCompositingSurface() = 0; |
| 400 virtual void UnlockCompositingSurface() = 0; | 400 virtual void UnlockCompositingSurface() = 0; |
| 401 | 401 |
| 402 // Returns a reference to the current instance of TextInputManager. The | |
| 403 // reference is obtained from RenderWidgetHostDelegate. The first time a non- | |
| 404 // null reference is obtained, its value is cached in |text_input_manager_| | |
| 405 // and this view is registered with it. The RWHV will unregister from the | |
| 406 // TextInputManager if it is destroyed or if the TextInputManager itself is | |
| 407 // destroyed. The unregistration of the RWHV from TextInputManager is | |
| 408 // necessary and must be done by explicitly calling | |
| 409 // TextInputManager::Unregister. | |
| 410 // It is safer to use this method rather than directly dereferencing | |
| 411 // |text_input_manager_|. | |
| 412 TextInputManager* GetTextInputManager(); | |
|
EhsanK
2016/09/28 16:14:11
Why is this public now? I couldn't find the usage.
shaktisahu
2016/09/28 20:17:23
Oh. I will change it back to protected. I don't ne
| |
| 413 | |
| 402 // Add and remove observers for lifetime event notifications. The order in | 414 // Add and remove observers for lifetime event notifications. The order in |
| 403 // which notifications are sent to observers is undefined. Clients must be | 415 // which notifications are sent to observers is undefined. Clients must be |
| 404 // sure to remove the observer before they go away. | 416 // sure to remove the observer before they go away. |
| 405 void AddObserver(RenderWidgetHostViewBaseObserver* observer); | 417 void AddObserver(RenderWidgetHostViewBaseObserver* observer); |
| 406 void RemoveObserver(RenderWidgetHostViewBaseObserver* observer); | 418 void RemoveObserver(RenderWidgetHostViewBaseObserver* observer); |
| 407 | 419 |
| 408 // Exposed for testing. | 420 // Exposed for testing. |
| 409 virtual bool IsChildFrameForTesting() const; | 421 virtual bool IsChildFrameForTesting() const; |
| 410 virtual cc::SurfaceId SurfaceIdForTesting() const; | 422 virtual cc::SurfaceId SurfaceIdForTesting() const; |
| 411 | 423 |
| 412 protected: | 424 protected: |
| 413 // Interface class only, do not construct. | 425 // Interface class only, do not construct. |
| 414 RenderWidgetHostViewBase(); | 426 RenderWidgetHostViewBase(); |
| 415 | 427 |
| 416 void NotifyObserversAboutShutdown(); | 428 void NotifyObserversAboutShutdown(); |
| 417 | 429 |
| 418 // Returns a reference to the current instance of TextInputManager. The | |
| 419 // reference is obtained from RenderWidgetHostDelegate. The first time a non- | |
| 420 // null reference is obtained, its value is cached in |text_input_manager_| | |
| 421 // and this view is registered with it. The RWHV will unregister from the | |
| 422 // TextInputManager if it is destroyed or if the TextInputManager itself is | |
| 423 // destroyed. The unregistration of the RWHV from TextInputManager is | |
| 424 // necessary and must be done by explicitly calling | |
| 425 // TextInputManager::Unregister. | |
| 426 // It is safer to use this method rather than directly dereferencing | |
| 427 // |text_input_manager_|. | |
| 428 TextInputManager* GetTextInputManager(); | |
| 429 | |
| 430 // Whether this view is a popup and what kind of popup it is (select, | 430 // Whether this view is a popup and what kind of popup it is (select, |
| 431 // autofill...). | 431 // autofill...). |
| 432 blink::WebPopupType popup_type_; | 432 blink::WebPopupType popup_type_; |
| 433 | 433 |
| 434 // The background color of the web content. | 434 // The background color of the web content. |
| 435 SkColor background_color_; | 435 SkColor background_color_; |
| 436 | 436 |
| 437 // While the mouse is locked, the cursor is hidden from the user. Mouse events | 437 // While the mouse is locked, the cursor is hidden from the user. Mouse events |
| 438 // are still generated. However, the position they report is the last known | 438 // are still generated. However, the position they report is the last known |
| 439 // mouse position just as mouse lock was entered; the movement they report | 439 // mouse position just as mouse lock was entered; the movement they report |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 488 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; | 488 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; |
| 489 | 489 |
| 490 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; | 490 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; |
| 491 | 491 |
| 492 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); | 492 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); |
| 493 }; | 493 }; |
| 494 | 494 |
| 495 } // namespace content | 495 } // namespace content |
| 496 | 496 |
| 497 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 497 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
| OLD | NEW |