Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Side by Side Diff: content/browser/web_contents/web_contents_impl.h

Issue 2506183002: Make window.open() IPCs be frame-based (Closed)
Patch Set: Compile fix. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 ScreenOrientationProvider* GetScreenOrientationProvider() override; 484 ScreenOrientationProvider* GetScreenOrientationProvider() override;
485 void EnterFullscreenMode(const GURL& origin) override; 485 void EnterFullscreenMode(const GURL& origin) override;
486 void ExitFullscreenMode(bool will_cause_resize) override; 486 void ExitFullscreenMode(bool will_cause_resize) override;
487 bool ShouldRouteMessageEvent( 487 bool ShouldRouteMessageEvent(
488 RenderFrameHost* target_rfh, 488 RenderFrameHost* target_rfh,
489 SiteInstance* source_site_instance) const override; 489 SiteInstance* source_site_instance) const override;
490 void EnsureOpenerProxiesExist(RenderFrameHost* source_rfh) override; 490 void EnsureOpenerProxiesExist(RenderFrameHost* source_rfh) override;
491 std::unique_ptr<WebUIImpl> CreateWebUIForRenderFrameHost( 491 std::unique_ptr<WebUIImpl> CreateWebUIForRenderFrameHost(
492 const GURL& url) override; 492 const GURL& url) override;
493 void SetFocusedFrame(FrameTreeNode* node, SiteInstance* source) override; 493 void SetFocusedFrame(FrameTreeNode* node, SiteInstance* source) override;
494 void CreateNewWindow(
495 SiteInstance* source_site_instance,
496 int32_t route_id,
alexmos 2016/12/13 18:41:41 render_view_route_id?
ncarter (slow) 2016/12/15 00:33:17 Done.
497 int32_t main_frame_route_id,
498 int32_t main_frame_widget_route_id,
499 const mojom::CreateNewWindowParams& params,
500 SessionStorageNamespace* session_storage_namespace) override;
501 void ShowCreatedWindow(int process_id,
502 int main_frame_widget_route_id,
503 WindowOpenDisposition disposition,
504 const gfx::Rect& initial_rect,
505 bool user_gesture) override;
494 506
495 // RenderViewHostDelegate ---------------------------------------------------- 507 // RenderViewHostDelegate ----------------------------------------------------
496 RenderViewHostDelegateView* GetDelegateView() override; 508 RenderViewHostDelegateView* GetDelegateView() override;
497 bool OnMessageReceived(RenderViewHost* render_view_host, 509 bool OnMessageReceived(RenderViewHost* render_view_host,
498 const IPC::Message& message) override; 510 const IPC::Message& message) override;
499 // RenderFrameHostDelegate has the same method, so list it there because this 511 // RenderFrameHostDelegate has the same method, so list it there because this
500 // interface is going away. 512 // interface is going away.
501 // WebContents* GetAsWebContents() override; 513 // WebContents* GetAsWebContents() override;
502 void RenderViewCreated(RenderViewHost* render_view_host) override; 514 void RenderViewCreated(RenderViewHost* render_view_host) override;
503 void RenderViewReady(RenderViewHost* render_view_host) override; 515 void RenderViewReady(RenderViewHost* render_view_host) override;
(...skipping 14 matching lines...) Expand all
518 const base::string16& message, 530 const base::string16& message,
519 int32_t line_no, 531 int32_t line_no,
520 const base::string16& source_id) override; 532 const base::string16& source_id) override;
521 RendererPreferences GetRendererPrefs( 533 RendererPreferences GetRendererPrefs(
522 BrowserContext* browser_context) const override; 534 BrowserContext* browser_context) const override;
523 void OnUserInteraction(RenderWidgetHostImpl* render_widget_host, 535 void OnUserInteraction(RenderWidgetHostImpl* render_widget_host,
524 const blink::WebInputEvent::Type type) override; 536 const blink::WebInputEvent::Type type) override;
525 void OnIgnoredUIEvent() override; 537 void OnIgnoredUIEvent() override;
526 void Activate() override; 538 void Activate() override;
527 void UpdatePreferredSize(const gfx::Size& pref_size) override; 539 void UpdatePreferredSize(const gfx::Size& pref_size) override;
528 void CreateNewWindow(
529 SiteInstance* source_site_instance,
530 int32_t route_id,
531 int32_t main_frame_route_id,
532 int32_t main_frame_widget_route_id,
533 const mojom::CreateNewWindowParams& params,
534 SessionStorageNamespace* session_storage_namespace) override;
535 void CreateNewWidget(int32_t render_process_id, 540 void CreateNewWidget(int32_t render_process_id,
536 int32_t route_id, 541 int32_t route_id,
537 blink::WebPopupType popup_type) override; 542 blink::WebPopupType popup_type) override;
538 void CreateNewFullscreenWidget(int32_t render_process_id, 543 void CreateNewFullscreenWidget(int32_t render_process_id,
539 int32_t route_id) override; 544 int32_t route_id) override;
540 void ShowCreatedWindow(int process_id,
541 int route_id,
542 WindowOpenDisposition disposition,
543 const gfx::Rect& initial_rect,
544 bool user_gesture) override;
545 void ShowCreatedWidget(int process_id, 545 void ShowCreatedWidget(int process_id,
546 int route_id, 546 int route_id,
547 const gfx::Rect& initial_rect) override; 547 const gfx::Rect& initial_rect) override;
548 void ShowCreatedFullscreenWidget(int process_id, int route_id) override; 548 void ShowCreatedFullscreenWidget(int process_id, int route_id) override;
549 void RequestMediaAccessPermission( 549 void RequestMediaAccessPermission(
550 const MediaStreamRequest& request, 550 const MediaStreamRequest& request,
551 const MediaResponseCallback& callback) override; 551 const MediaResponseCallback& callback) override;
552 bool CheckMediaAccessPermission(const GURL& security_origin, 552 bool CheckMediaAccessPermission(const GURL& security_origin,
553 MediaStreamType type) override; 553 MediaStreamType type) override;
554 SessionStorageNamespace* GetSessionStorageNamespace( 554 SessionStorageNamespace* GetSessionStorageNamespace(
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 800
801 private: 801 private:
802 friend class WebContentsObserver; 802 friend class WebContentsObserver;
803 friend class WebContents; // To implement factory methods. 803 friend class WebContents; // To implement factory methods.
804 804
805 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, NoJSMessageOnInterstitials); 805 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, NoJSMessageOnInterstitials);
806 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, UpdateTitle); 806 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, UpdateTitle);
807 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, FindOpenerRVHWhenPending); 807 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, FindOpenerRVHWhenPending);
808 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, 808 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest,
809 CrossSiteCantPreemptAfterUnload); 809 CrossSiteCantPreemptAfterUnload);
810 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, PendingContents); 810 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, PendingContentsDestroyed);
811 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, PendingContentsShown);
811 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, FrameTreeShape); 812 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, FrameTreeShape);
812 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, GetLastActiveTime); 813 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, GetLastActiveTime);
813 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, 814 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest,
814 LoadResourceFromMemoryCacheWithBadSecurityInfo); 815 LoadResourceFromMemoryCacheWithBadSecurityInfo);
815 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, 816 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest,
816 LoadResourceWithEmptySecurityInfo); 817 LoadResourceWithEmptySecurityInfo);
817 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, 818 FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest,
818 ResetJavaScriptDialogOnUserNavigate); 819 ResetJavaScriptDialogOnUserNavigate);
819 FRIEND_TEST_ALL_PREFIXES(FormStructureBrowserTest, HTMLFiles); 820 FRIEND_TEST_ALL_PREFIXES(FormStructureBrowserTest, HTMLFiles);
820 FRIEND_TEST_ALL_PREFIXES(NavigationControllerTest, HistoryNavigate); 821 FRIEND_TEST_ALL_PREFIXES(NavigationControllerTest, HistoryNavigate);
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 // Helper for ShowCreatedWidget/ShowCreatedFullscreenWidget. 1062 // Helper for ShowCreatedWidget/ShowCreatedFullscreenWidget.
1062 void ShowCreatedWidget(int process_id, 1063 void ShowCreatedWidget(int process_id,
1063 int route_id, 1064 int route_id,
1064 bool is_fullscreen, 1065 bool is_fullscreen,
1065 const gfx::Rect& initial_rect); 1066 const gfx::Rect& initial_rect);
1066 1067
1067 // Finds the new RenderWidgetHost and returns it. Note that this can only be 1068 // Finds the new RenderWidgetHost and returns it. Note that this can only be
1068 // called once as this call also removes it from the internal map. 1069 // called once as this call also removes it from the internal map.
1069 RenderWidgetHostView* GetCreatedWidget(int process_id, int route_id); 1070 RenderWidgetHostView* GetCreatedWidget(int process_id, int route_id);
1070 1071
1071 // Finds the new WebContentsImpl by route_id, initializes it for 1072 // Finds the new WebContentsImpl by |main_frame_widget_route_id|, initializes
1072 // renderer-initiated creation, and returns it. Note that this can only be 1073 // it for renderer-initiated creation, and returns it. Note that this can only
1073 // called once as this call also removes it from the internal map. 1074 // be called once as this call also removes it from the internal map.
1074 WebContentsImpl* GetCreatedWindow(int process_id, int route_id); 1075 WebContentsImpl* GetCreatedWindow(int process_id,
1076 int main_frame_widget_route_id);
1075 1077
1076 // Sends a Page message IPC. 1078 // Sends a Page message IPC.
1077 void SendPageMessage(IPC::Message* msg); 1079 void SendPageMessage(IPC::Message* msg);
1078 1080
1079 // Tracking loading progress ------------------------------------------------- 1081 // Tracking loading progress -------------------------------------------------
1080 1082
1081 // Resets the tracking state of the current load progress. 1083 // Resets the tracking state of the current load progress.
1082 void ResetLoadProgressState(); 1084 void ResetLoadProgressState();
1083 1085
1084 // Notifies the delegate that the load progress was updated. 1086 // Notifies the delegate that the load progress was updated.
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
1490 // Adds/removes a callback called on creation of each new WebContents. 1492 // Adds/removes a callback called on creation of each new WebContents.
1491 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); 1493 static void AddCreatedCallbackForTesting(const CreatedCallback& callback);
1492 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); 1494 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback);
1493 1495
1494 DISALLOW_COPY_AND_ASSIGN(FriendZone); 1496 DISALLOW_COPY_AND_ASSIGN(FriendZone);
1495 }; 1497 };
1496 1498
1497 } // namespace content 1499 } // namespace content
1498 1500
1499 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1501 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698