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