| 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_VIEW_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 #endif | 411 #endif |
| 412 | 412 |
| 413 // User rotated the screen. Calls the "onorientationchange" Javascript hook. | 413 // User rotated the screen. Calls the "onorientationchange" Javascript hook. |
| 414 void SendOrientationChangeEvent(int orientation); | 414 void SendOrientationChangeEvent(int orientation); |
| 415 | 415 |
| 416 // TODO(creis): Remove this when we replace frame IDs with RenderFrameHost | 416 // TODO(creis): Remove this when we replace frame IDs with RenderFrameHost |
| 417 // routing IDs. | 417 // routing IDs. |
| 418 int64 main_frame_id() const { | 418 int64 main_frame_id() const { |
| 419 return main_frame_id_; | 419 return main_frame_id_; |
| 420 } | 420 } |
| 421 int main_frame_routing_id() const { |
| 422 return main_frame_routing_id_; |
| 423 } |
| 421 | 424 |
| 422 // Set the opener to null in the renderer process. | 425 // Set the opener to null in the renderer process. |
| 423 void DisownOpener(); | 426 void DisownOpener(); |
| 424 | 427 |
| 425 // Turn on accessibility testing. The given callback will be run | 428 // Turn on accessibility testing. The given callback will be run |
| 426 // every time an accessibility notification is received from the | 429 // every time an accessibility notification is received from the |
| 427 // renderer process, and the accessibility tree it sent can be | 430 // renderer process, and the accessibility tree it sent can be |
| 428 // retrieved using accessibility_tree_for_testing(). | 431 // retrieved using accessibility_tree_for_testing(). |
| 429 void SetAccessibilityCallbackForTesting( | 432 void SetAccessibilityCallbackForTesting( |
| 430 const base::Callback<void(ui::AXEvent)>& callback); | 433 const base::Callback<void(ui::AXEvent)>& callback); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 447 const base::Closure& callback); | 450 const base::Closure& callback); |
| 448 | 451 |
| 449 bool is_waiting_for_beforeunload_ack() { | 452 bool is_waiting_for_beforeunload_ack() { |
| 450 return is_waiting_for_beforeunload_ack_; | 453 return is_waiting_for_beforeunload_ack_; |
| 451 } | 454 } |
| 452 | 455 |
| 453 bool is_waiting_for_unload_ack() { | 456 bool is_waiting_for_unload_ack() { |
| 454 return is_waiting_for_unload_ack_; | 457 return is_waiting_for_unload_ack_; |
| 455 } | 458 } |
| 456 | 459 |
| 457 // Returns whether the given URL is allowed to commit in the current process. | |
| 458 // This is a more conservative check than RenderProcessHost::FilterURL, since | |
| 459 // it will be used to kill processes that commit unauthorized URLs. | |
| 460 bool CanCommitURL(const GURL& url); | |
| 461 | |
| 462 // Update the FrameTree to use this RenderViewHost's main frame | 460 // Update the FrameTree to use this RenderViewHost's main frame |
| 463 // RenderFrameHost. Called when the RenderViewHost is committed. | 461 // RenderFrameHost. Called when the RenderViewHost is committed. |
| 464 // | 462 // |
| 465 // TODO(ajwong): Remove once RenderViewHost no longer owns the main frame | 463 // TODO(ajwong): Remove once RenderViewHost no longer owns the main frame |
| 466 // RenderFrameHost. | 464 // RenderFrameHost. |
| 467 void AttachToFrameTree(); | 465 void AttachToFrameTree(); |
| 468 | 466 |
| 469 // The following IPC handlers are public so RenderFrameHost can call them, | 467 // The following IPC handlers are public so RenderFrameHost can call them, |
| 470 // while we transition the code to not use RenderViewHost. | 468 // while we transition the code to not use RenderViewHost. |
| 471 // | 469 // |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 void OnDidAccessInitialDocument(); | 578 void OnDidAccessInitialDocument(); |
| 581 void OnDomOperationResponse(const std::string& json_string, | 579 void OnDomOperationResponse(const std::string& json_string, |
| 582 int automation_id); | 580 int automation_id); |
| 583 void OnFocusedNodeTouched(bool editable); | 581 void OnFocusedNodeTouched(bool editable); |
| 584 | 582 |
| 585 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 583 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
| 586 void OnShowPopup(const ViewHostMsg_ShowPopup_Params& params); | 584 void OnShowPopup(const ViewHostMsg_ShowPopup_Params& params); |
| 587 #endif | 585 #endif |
| 588 | 586 |
| 589 private: | 587 private: |
| 588 // TODO(nasko): Temporarily friend RenderFrameHostImpl, so we don't duplicate |
| 589 // utility functions and state needed in both classes, while we move frame |
| 590 // specific code away from this class. |
| 591 friend class RenderFrameHostImpl; |
| 590 friend class TestRenderViewHost; | 592 friend class TestRenderViewHost; |
| 591 FRIEND_TEST_ALL_PREFIXES(RenderViewHostTest, BasicRenderFrameHost); | 593 FRIEND_TEST_ALL_PREFIXES(RenderViewHostTest, BasicRenderFrameHost); |
| 592 FRIEND_TEST_ALL_PREFIXES(RenderViewHostTest, RoutingIdSane); | 594 FRIEND_TEST_ALL_PREFIXES(RenderViewHostTest, RoutingIdSane); |
| 593 | 595 |
| 594 // Sets whether this RenderViewHost is swapped out in favor of another, | 596 // Sets whether this RenderViewHost is swapped out in favor of another, |
| 595 // and clears any waiting state that is no longer relevant. | 597 // and clears any waiting state that is no longer relevant. |
| 596 void SetSwappedOut(bool is_swapped_out); | 598 void SetSwappedOut(bool is_swapped_out); |
| 597 | 599 |
| 598 bool CanAccessFilesOfPageState(const PageState& state) const; | 600 bool CanAccessFilesOfPageState(const PageState& state) const; |
| 599 | 601 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 703 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); | 705 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); |
| 704 }; | 706 }; |
| 705 | 707 |
| 706 #if defined(COMPILER_MSVC) | 708 #if defined(COMPILER_MSVC) |
| 707 #pragma warning(pop) | 709 #pragma warning(pop) |
| 708 #endif | 710 #endif |
| 709 | 711 |
| 710 } // namespace content | 712 } // namespace content |
| 711 | 713 |
| 712 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 714 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
| OLD | NEW |