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_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <functional> | 10 #include <functional> |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 bool IsFullscreenForCurrentTab( | 600 bool IsFullscreenForCurrentTab( |
601 RenderWidgetHostImpl* render_widget_host) const override; | 601 RenderWidgetHostImpl* render_widget_host) const override; |
602 blink::WebDisplayMode GetDisplayMode( | 602 blink::WebDisplayMode GetDisplayMode( |
603 RenderWidgetHostImpl* render_widget_host) const override; | 603 RenderWidgetHostImpl* render_widget_host) const override; |
604 void LostCapture(RenderWidgetHostImpl* render_widget_host) override; | 604 void LostCapture(RenderWidgetHostImpl* render_widget_host) override; |
605 void LostMouseLock(RenderWidgetHostImpl* render_widget_host) override; | 605 void LostMouseLock(RenderWidgetHostImpl* render_widget_host) override; |
606 void ForwardCompositorProto(RenderWidgetHostImpl* render_widget_host, | 606 void ForwardCompositorProto(RenderWidgetHostImpl* render_widget_host, |
607 const std::vector<uint8_t>& proto) override; | 607 const std::vector<uint8_t>& proto) override; |
608 void OnRenderFrameProxyVisibilityChanged(bool visible) override; | 608 void OnRenderFrameProxyVisibilityChanged(bool visible) override; |
609 void SendScreenRects() override; | 609 void SendScreenRects() override; |
| 610 const TextInputState* GetTextInputState() override; |
| 611 void UpdateTextInputState(RenderWidgetHostViewBase* rwhv, |
| 612 bool text_input_state_changed) override; |
610 | 613 |
611 // RenderFrameHostManager::Delegate ------------------------------------------ | 614 // RenderFrameHostManager::Delegate ------------------------------------------ |
612 | 615 |
613 bool CreateRenderViewForRenderManager( | 616 bool CreateRenderViewForRenderManager( |
614 RenderViewHost* render_view_host, | 617 RenderViewHost* render_view_host, |
615 int opener_frame_routing_id, | 618 int opener_frame_routing_id, |
616 int proxy_routing_id, | 619 int proxy_routing_id, |
617 const FrameReplicationState& replicated_frame_state) override; | 620 const FrameReplicationState& replicated_frame_state) override; |
618 void CreateRenderWidgetHostViewForRenderManager( | 621 void CreateRenderWidgetHostViewForRenderManager( |
619 RenderViewHost* render_view_host) override; | 622 RenderViewHost* render_view_host) override; |
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1319 | 1322 |
1320 // Manages media players, CDMs, and power save blockers for media. | 1323 // Manages media players, CDMs, and power save blockers for media. |
1321 scoped_ptr<MediaWebContentsObserver> media_web_contents_observer_; | 1324 scoped_ptr<MediaWebContentsObserver> media_web_contents_observer_; |
1322 | 1325 |
1323 scoped_ptr<RenderWidgetHostInputEventRouter> rwh_input_event_router_; | 1326 scoped_ptr<RenderWidgetHostInputEventRouter> rwh_input_event_router_; |
1324 | 1327 |
1325 PageImportanceSignals page_importance_signals_; | 1328 PageImportanceSignals page_importance_signals_; |
1326 | 1329 |
1327 bool page_scale_factor_is_one_; | 1330 bool page_scale_factor_is_one_; |
1328 | 1331 |
| 1332 // The RWHV which is currently focused. |
| 1333 base::WeakPtr<RenderWidgetHostViewBase> view_with_active_text_input_; |
| 1334 |
| 1335 // A copy of the text input state from |view_with_active_text_input_| when |
| 1336 // there exists one, or empty (type == ui::TEXT_INPUT_TYPE_NONE) if otherwise. |
| 1337 scoped_ptr<TextInputState> text_input_state_; |
| 1338 |
1329 base::WeakPtrFactory<WebContentsImpl> loading_weak_factory_; | 1339 base::WeakPtrFactory<WebContentsImpl> loading_weak_factory_; |
1330 base::WeakPtrFactory<WebContentsImpl> weak_factory_; | 1340 base::WeakPtrFactory<WebContentsImpl> weak_factory_; |
1331 | 1341 |
1332 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 1342 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
1333 }; | 1343 }; |
1334 | 1344 |
1335 // Dangerous methods which should never be made part of the public API, so we | 1345 // Dangerous methods which should never be made part of the public API, so we |
1336 // grant their use only to an explicit friend list (c++ attorney/client idiom). | 1346 // grant their use only to an explicit friend list (c++ attorney/client idiom). |
1337 class CONTENT_EXPORT WebContentsImpl::FriendZone { | 1347 class CONTENT_EXPORT WebContentsImpl::FriendZone { |
1338 private: | 1348 private: |
1339 friend class TestNavigationObserver; | 1349 friend class TestNavigationObserver; |
1340 friend class WebContentsAddedObserver; | 1350 friend class WebContentsAddedObserver; |
1341 friend class ContentBrowserSanityChecker; | 1351 friend class ContentBrowserSanityChecker; |
1342 | 1352 |
1343 FriendZone(); // Not instantiable. | 1353 FriendZone(); // Not instantiable. |
1344 | 1354 |
1345 // Adds/removes a callback called on creation of each new WebContents. | 1355 // Adds/removes a callback called on creation of each new WebContents. |
1346 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); | 1356 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); |
1347 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); | 1357 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); |
1348 | 1358 |
1349 DISALLOW_COPY_AND_ASSIGN(FriendZone); | 1359 DISALLOW_COPY_AND_ASSIGN(FriendZone); |
1350 }; | 1360 }; |
1351 | 1361 |
1352 } // namespace content | 1362 } // namespace content |
1353 | 1363 |
1354 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1364 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |