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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 // RenderWidgetHostView implementation. | 86 // RenderWidgetHostView implementation. |
87 void SetBackgroundColor(SkColor color) override; | 87 void SetBackgroundColor(SkColor color) override; |
88 void SetBackgroundColorToDefault() final; | 88 void SetBackgroundColorToDefault() final; |
89 bool GetBackgroundOpaque() override; | 89 bool GetBackgroundOpaque() override; |
90 ui::TextInputClient* GetTextInputClient() override; | 90 ui::TextInputClient* GetTextInputClient() override; |
91 void WasUnOccluded() override {} | 91 void WasUnOccluded() override {} |
92 void WasOccluded() override {} | 92 void WasOccluded() override {} |
93 bool IsShowingContextMenu() const override; | 93 bool IsShowingContextMenu() const override; |
94 void SetShowingContextMenu(bool showing_menu) override; | 94 void SetShowingContextMenu(bool showing_menu) override; |
95 base::string16 GetSelectedText() const override; | |
96 bool IsMouseLocked() override; | 95 bool IsMouseLocked() override; |
97 gfx::Size GetVisibleViewportSize() const override; | 96 gfx::Size GetVisibleViewportSize() const override; |
98 void SetInsets(const gfx::Insets& insets) override; | 97 void SetInsets(const gfx::Insets& insets) override; |
99 void BeginFrameSubscription( | 98 void BeginFrameSubscription( |
100 std::unique_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override; | 99 std::unique_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override; |
101 void EndFrameSubscription() override; | 100 void EndFrameSubscription() override; |
102 void FocusedNodeTouched(const gfx::Point& location_dips_screen, | 101 void FocusedNodeTouched(const gfx::Point& location_dips_screen, |
103 bool editable) override; | 102 bool editable) override; |
104 | 103 |
105 // This only needs to be overridden by RenderWidgetHostViewBase subclasses | 104 // This only needs to be overridden by RenderWidgetHostViewBase subclasses |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 // Add and remove observers for lifetime event notifications. The order in | 389 // Add and remove observers for lifetime event notifications. The order in |
391 // which notifications are sent to observers is undefined. Clients must be | 390 // which notifications are sent to observers is undefined. Clients must be |
392 // sure to remove the observer before they go away. | 391 // sure to remove the observer before they go away. |
393 void AddObserver(RenderWidgetHostViewBaseObserver* observer); | 392 void AddObserver(RenderWidgetHostViewBaseObserver* observer); |
394 void RemoveObserver(RenderWidgetHostViewBaseObserver* observer); | 393 void RemoveObserver(RenderWidgetHostViewBaseObserver* observer); |
395 | 394 |
396 // Exposed for testing. | 395 // Exposed for testing. |
397 virtual bool IsChildFrameForTesting() const; | 396 virtual bool IsChildFrameForTesting() const; |
398 virtual cc::SurfaceId SurfaceIdForTesting() const; | 397 virtual cc::SurfaceId SurfaceIdForTesting() const; |
399 | 398 |
| 399 base::string16 GetSelectedTextForTesting(); |
| 400 |
400 protected: | 401 protected: |
401 // Interface class only, do not construct. | 402 // Interface class only, do not construct. |
402 RenderWidgetHostViewBase(); | 403 RenderWidgetHostViewBase(); |
403 | 404 |
404 void NotifyObserversAboutShutdown(); | 405 void NotifyObserversAboutShutdown(); |
405 | 406 |
406 // Returns a reference to the current instance of TextInputManager. The | 407 // Returns a reference to the current instance of TextInputManager. The |
407 // reference is obtained from RenderWidgetHostDelegate. The first time a non- | 408 // reference is obtained from RenderWidgetHostDelegate. The first time a non- |
408 // null reference is obtained, its value is cached in |text_input_manager_| | 409 // null reference is obtained, its value is cached in |text_input_manager_| |
409 // and this view is registered with it. The RWHV will unregister from the | 410 // and this view is registered with it. The RWHV will unregister from the |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; | 471 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; |
471 | 472 |
472 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; | 473 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; |
473 | 474 |
474 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); | 475 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); |
475 }; | 476 }; |
476 | 477 |
477 } // namespace content | 478 } // namespace content |
478 | 479 |
479 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 480 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
OLD | NEW |