| 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 <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 // that a bit will only be turned off when all modes that depend on it | 206 // that a bit will only be turned off when all modes that depend on it |
| 207 // have been removed. | 207 // have been removed. |
| 208 void RemoveAccessibilityMode(AccessibilityMode mode); | 208 void RemoveAccessibilityMode(AccessibilityMode mode); |
| 209 | 209 |
| 210 // Request a one-time snapshot of the accessibility tree without changing | 210 // Request a one-time snapshot of the accessibility tree without changing |
| 211 // the accessibility mode. | 211 // the accessibility mode. |
| 212 typedef base::Callback<void(const ui::AXTreeUpdate&)> | 212 typedef base::Callback<void(const ui::AXTreeUpdate&)> |
| 213 AXTreeSnapshotCallback; | 213 AXTreeSnapshotCallback; |
| 214 void RequestAXTreeSnapshot(AXTreeSnapshotCallback callback); | 214 void RequestAXTreeSnapshot(AXTreeSnapshotCallback callback); |
| 215 | 215 |
| 216 // Clear the navigation transition data when the user navigates back to Chrome | |
| 217 // from a native app. | |
| 218 void ClearNavigationTransitionData(); | |
| 219 | |
| 220 // WebContents ------------------------------------------------------ | 216 // WebContents ------------------------------------------------------ |
| 221 WebContentsDelegate* GetDelegate() override; | 217 WebContentsDelegate* GetDelegate() override; |
| 222 void SetDelegate(WebContentsDelegate* delegate) override; | 218 void SetDelegate(WebContentsDelegate* delegate) override; |
| 223 NavigationControllerImpl& GetController() override; | 219 NavigationControllerImpl& GetController() override; |
| 224 const NavigationControllerImpl& GetController() const override; | 220 const NavigationControllerImpl& GetController() const override; |
| 225 BrowserContext* GetBrowserContext() const override; | 221 BrowserContext* GetBrowserContext() const override; |
| 226 const GURL& GetURL() const override; | 222 const GURL& GetURL() const override; |
| 227 const GURL& GetVisibleURL() const override; | 223 const GURL& GetVisibleURL() const override; |
| 228 const GURL& GetLastCommittedURL() const override; | 224 const GURL& GetLastCommittedURL() const override; |
| 229 RenderProcessHost* GetRenderProcessHost() const override; | 225 RenderProcessHost* GetRenderProcessHost() const override; |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 // Implementation of IPC::Sender. | 370 // Implementation of IPC::Sender. |
| 375 bool Send(IPC::Message* message) override; | 371 bool Send(IPC::Message* message) override; |
| 376 | 372 |
| 377 // RenderFrameHostDelegate --------------------------------------------------- | 373 // RenderFrameHostDelegate --------------------------------------------------- |
| 378 bool OnMessageReceived(RenderFrameHost* render_frame_host, | 374 bool OnMessageReceived(RenderFrameHost* render_frame_host, |
| 379 const IPC::Message& message) override; | 375 const IPC::Message& message) override; |
| 380 const GURL& GetMainFrameLastCommittedURL() const override; | 376 const GURL& GetMainFrameLastCommittedURL() const override; |
| 381 void RenderFrameCreated(RenderFrameHost* render_frame_host) override; | 377 void RenderFrameCreated(RenderFrameHost* render_frame_host) override; |
| 382 void RenderFrameDeleted(RenderFrameHost* render_frame_host) override; | 378 void RenderFrameDeleted(RenderFrameHost* render_frame_host) override; |
| 383 void SwappedOut(RenderFrameHost* render_frame_host) override; | 379 void SwappedOut(RenderFrameHost* render_frame_host) override; |
| 384 void DidDeferAfterResponseStarted( | |
| 385 const TransitionLayerData& transition_data) override; | |
| 386 bool WillHandleDeferAfterResponseStarted() override; | |
| 387 void WorkerCrashed(RenderFrameHost* render_frame_host) override; | 380 void WorkerCrashed(RenderFrameHost* render_frame_host) override; |
| 388 void ShowContextMenu(RenderFrameHost* render_frame_host, | 381 void ShowContextMenu(RenderFrameHost* render_frame_host, |
| 389 const ContextMenuParams& params) override; | 382 const ContextMenuParams& params) override; |
| 390 void RunJavaScriptMessage(RenderFrameHost* render_frame_host, | 383 void RunJavaScriptMessage(RenderFrameHost* render_frame_host, |
| 391 const base::string16& message, | 384 const base::string16& message, |
| 392 const base::string16& default_prompt, | 385 const base::string16& default_prompt, |
| 393 const GURL& frame_url, | 386 const GURL& frame_url, |
| 394 JavaScriptMessageType type, | 387 JavaScriptMessageType type, |
| 395 IPC::Message* reply_msg) override; | 388 IPC::Message* reply_msg) override; |
| 396 void RunBeforeUnloadConfirm(RenderFrameHost* render_frame_host, | 389 void RunBeforeUnloadConfirm(RenderFrameHost* render_frame_host, |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 void SetIsVirtualKeyboardRequested(bool requested) override; | 498 void SetIsVirtualKeyboardRequested(bool requested) override; |
| 506 bool IsVirtualKeyboardRequested() override; | 499 bool IsVirtualKeyboardRequested() override; |
| 507 | 500 |
| 508 | 501 |
| 509 // NavigatorDelegate --------------------------------------------------------- | 502 // NavigatorDelegate --------------------------------------------------------- |
| 510 | 503 |
| 511 void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, | 504 void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, |
| 512 const GURL& validated_url, | 505 const GURL& validated_url, |
| 513 bool is_error_page, | 506 bool is_error_page, |
| 514 bool is_iframe_srcdoc) override; | 507 bool is_iframe_srcdoc) override; |
| 515 void DidStartNavigationTransition( | |
| 516 RenderFrameHostImpl* render_frame_host) override; | |
| 517 void DidFailProvisionalLoadWithError( | 508 void DidFailProvisionalLoadWithError( |
| 518 RenderFrameHostImpl* render_frame_host, | 509 RenderFrameHostImpl* render_frame_host, |
| 519 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) | 510 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) |
| 520 override; | 511 override; |
| 521 void DidFailLoadWithError(RenderFrameHostImpl* render_frame_host, | 512 void DidFailLoadWithError(RenderFrameHostImpl* render_frame_host, |
| 522 const GURL& url, | 513 const GURL& url, |
| 523 int error_code, | 514 int error_code, |
| 524 const base::string16& error_description) override; | 515 const base::string16& error_description) override; |
| 525 void DidCommitProvisionalLoad(RenderFrameHostImpl* render_frame_host, | 516 void DidCommitProvisionalLoad(RenderFrameHostImpl* render_frame_host, |
| 526 const GURL& url, | 517 const GURL& url, |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 | 667 |
| 677 typedef base::Callback<void(WebContents*)> CreatedCallback; | 668 typedef base::Callback<void(WebContents*)> CreatedCallback; |
| 678 | 669 |
| 679 // Requests the renderer to move the selection extent to a new position. | 670 // Requests the renderer to move the selection extent to a new position. |
| 680 void MoveRangeSelectionExtent(const gfx::Point& extent); | 671 void MoveRangeSelectionExtent(const gfx::Point& extent); |
| 681 | 672 |
| 682 // Requests the renderer to select the region between two points in the | 673 // Requests the renderer to select the region between two points in the |
| 683 // currently focused frame. | 674 // currently focused frame. |
| 684 void SelectRange(const gfx::Point& base, const gfx::Point& extent); | 675 void SelectRange(const gfx::Point& base, const gfx::Point& extent); |
| 685 | 676 |
| 686 // Notifies the main frame that it can continue navigation (if it was deferred | |
| 687 // immediately at first response). | |
| 688 void ResumeResponseDeferredAtStart(); | |
| 689 | |
| 690 // Forces overscroll to be disabled (used by touch emulation). | 677 // Forces overscroll to be disabled (used by touch emulation). |
| 691 void SetForceDisableOverscrollContent(bool force_disable); | 678 void SetForceDisableOverscrollContent(bool force_disable); |
| 692 | 679 |
| 693 AudioStateProvider* audio_state_provider() { | 680 AudioStateProvider* audio_state_provider() { |
| 694 return audio_state_provider_.get(); | 681 return audio_state_provider_.get(); |
| 695 } | 682 } |
| 696 | 683 |
| 697 bool has_audio_power_save_blocker_for_testing() const { | 684 bool has_audio_power_save_blocker_for_testing() const { |
| 698 return audio_power_save_blocker_; | 685 return audio_power_save_blocker_; |
| 699 } | 686 } |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1285 // Adds/removes a callback called on creation of each new WebContents. | 1272 // Adds/removes a callback called on creation of each new WebContents. |
| 1286 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); | 1273 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); |
| 1287 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); | 1274 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); |
| 1288 | 1275 |
| 1289 DISALLOW_COPY_AND_ASSIGN(FriendZone); | 1276 DISALLOW_COPY_AND_ASSIGN(FriendZone); |
| 1290 }; | 1277 }; |
| 1291 | 1278 |
| 1292 } // namespace content | 1279 } // namespace content |
| 1293 | 1280 |
| 1294 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1281 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
| OLD | NEW |