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; | |
613 | 610 |
614 // RenderFrameHostManager::Delegate ------------------------------------------ | 611 // RenderFrameHostManager::Delegate ------------------------------------------ |
615 | 612 |
616 bool CreateRenderViewForRenderManager( | 613 bool CreateRenderViewForRenderManager( |
617 RenderViewHost* render_view_host, | 614 RenderViewHost* render_view_host, |
618 int opener_frame_routing_id, | 615 int opener_frame_routing_id, |
619 int proxy_routing_id, | 616 int proxy_routing_id, |
620 const FrameReplicationState& replicated_frame_state) override; | 617 const FrameReplicationState& replicated_frame_state) override; |
621 void CreateRenderWidgetHostViewForRenderManager( | 618 void CreateRenderWidgetHostViewForRenderManager( |
622 RenderViewHost* render_view_host) override; | 619 RenderViewHost* render_view_host) override; |
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1322 | 1319 |
1323 // Manages media players, CDMs, and power save blockers for media. | 1320 // Manages media players, CDMs, and power save blockers for media. |
1324 scoped_ptr<MediaWebContentsObserver> media_web_contents_observer_; | 1321 scoped_ptr<MediaWebContentsObserver> media_web_contents_observer_; |
1325 | 1322 |
1326 scoped_ptr<RenderWidgetHostInputEventRouter> rwh_input_event_router_; | 1323 scoped_ptr<RenderWidgetHostInputEventRouter> rwh_input_event_router_; |
1327 | 1324 |
1328 PageImportanceSignals page_importance_signals_; | 1325 PageImportanceSignals page_importance_signals_; |
1329 | 1326 |
1330 bool page_scale_factor_is_one_; | 1327 bool page_scale_factor_is_one_; |
1331 | 1328 |
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 | |
1339 base::WeakPtrFactory<WebContentsImpl> loading_weak_factory_; | 1329 base::WeakPtrFactory<WebContentsImpl> loading_weak_factory_; |
1340 base::WeakPtrFactory<WebContentsImpl> weak_factory_; | 1330 base::WeakPtrFactory<WebContentsImpl> weak_factory_; |
1341 | 1331 |
1342 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 1332 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
1343 }; | 1333 }; |
1344 | 1334 |
1345 // Dangerous methods which should never be made part of the public API, so we | 1335 // Dangerous methods which should never be made part of the public API, so we |
1346 // grant their use only to an explicit friend list (c++ attorney/client idiom). | 1336 // grant their use only to an explicit friend list (c++ attorney/client idiom). |
1347 class CONTENT_EXPORT WebContentsImpl::FriendZone { | 1337 class CONTENT_EXPORT WebContentsImpl::FriendZone { |
1348 private: | 1338 private: |
1349 friend class TestNavigationObserver; | 1339 friend class TestNavigationObserver; |
1350 friend class WebContentsAddedObserver; | 1340 friend class WebContentsAddedObserver; |
1351 friend class ContentBrowserSanityChecker; | 1341 friend class ContentBrowserSanityChecker; |
1352 | 1342 |
1353 FriendZone(); // Not instantiable. | 1343 FriendZone(); // Not instantiable. |
1354 | 1344 |
1355 // Adds/removes a callback called on creation of each new WebContents. | 1345 // Adds/removes a callback called on creation of each new WebContents. |
1356 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); | 1346 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); |
1357 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); | 1347 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); |
1358 | 1348 |
1359 DISALLOW_COPY_AND_ASSIGN(FriendZone); | 1349 DISALLOW_COPY_AND_ASSIGN(FriendZone); |
1360 }; | 1350 }; |
1361 | 1351 |
1362 } // namespace content | 1352 } // namespace content |
1363 | 1353 |
1364 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1354 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |