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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.h

Issue 1123783002: Add ExecuteJavaScriptForTest and make all tests use it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 months 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 RenderFrameHost* GetParent() override; 132 RenderFrameHost* GetParent() override;
133 const std::string& GetFrameName() override; 133 const std::string& GetFrameName() override;
134 bool IsCrossProcessSubframe() override; 134 bool IsCrossProcessSubframe() override;
135 GURL GetLastCommittedURL() override; 135 GURL GetLastCommittedURL() override;
136 gfx::NativeView GetNativeView() override; 136 gfx::NativeView GetNativeView() override;
137 void AddMessageToConsole(ConsoleMessageLevel level, 137 void AddMessageToConsole(ConsoleMessageLevel level,
138 const std::string& message) override; 138 const std::string& message) override;
139 void ExecuteJavaScript(const base::string16& javascript) override; 139 void ExecuteJavaScript(const base::string16& javascript) override;
140 void ExecuteJavaScript(const base::string16& javascript, 140 void ExecuteJavaScript(const base::string16& javascript,
141 const JavaScriptResultCallback& callback) override; 141 const JavaScriptResultCallback& callback) override;
142 void ExecuteJavaScriptForTests(const base::string16& javascript) override;
143 void ExecuteJavaScriptForTests(
144 const base::string16& javascript,
145 const JavaScriptResultCallback& callback) override;
142 void ExecuteJavaScriptWithUserGestureForTests( 146 void ExecuteJavaScriptWithUserGestureForTests(
143 const base::string16& javascript) override; 147 const base::string16& javascript) override;
144 void ExecuteJavaScriptInIsolatedWorld( 148 void ExecuteJavaScriptInIsolatedWorld(
145 const base::string16& javascript, 149 const base::string16& javascript,
146 const JavaScriptResultCallback& callback, 150 const JavaScriptResultCallback& callback,
147 int world_id) override; 151 int world_id) override;
148 void ActivateFindInPageResultForAccessibility(int request_id) override; 152 void ActivateFindInPageResultForAccessibility(int request_id) override;
149 RenderViewHost* GetRenderViewHost() override; 153 RenderViewHost* GetRenderViewHost() override;
150 ServiceRegistry* GetServiceRegistry() override; 154 ServiceRegistry* GetServiceRegistry() override;
151 blink::WebPageVisibilityState GetVisibilityState() override; 155 blink::WebPageVisibilityState GetVisibilityState() override;
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 // part of the same site instance. 581 // part of the same site instance.
578 bool IsSameSiteInstance(RenderFrameHostImpl* other_render_frame_host); 582 bool IsSameSiteInstance(RenderFrameHostImpl* other_render_frame_host);
579 583
580 // Informs the content client that geolocation permissions were used. 584 // Informs the content client that geolocation permissions were used.
581 void DidUseGeolocationPermission(); 585 void DidUseGeolocationPermission();
582 586
583 void UpdatePermissionsForNavigation( 587 void UpdatePermissionsForNavigation(
584 const CommonNavigationParams& common_params, 588 const CommonNavigationParams& common_params,
585 const RequestNavigationParams& request_params); 589 const RequestNavigationParams& request_params);
586 590
591 // Returns true if the ExecuteJavaScript() API can be used on this host.
592 bool CanExecuteJavaScript();
593
587 // For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a 594 // For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a
588 // refcount that calls Shutdown when it reaches zero. This allows each 595 // refcount that calls Shutdown when it reaches zero. This allows each
589 // RenderFrameHostManager to just care about RenderFrameHosts, while ensuring 596 // RenderFrameHostManager to just care about RenderFrameHosts, while ensuring
590 // we have a RenderViewHost for each RenderFrameHost. 597 // we have a RenderViewHost for each RenderFrameHost.
591 // TODO(creis): RenderViewHost will eventually go away and be replaced with 598 // TODO(creis): RenderViewHost will eventually go away and be replaced with
592 // some form of page context. 599 // some form of page context.
593 RenderViewHostImpl* render_view_host_; 600 RenderViewHostImpl* render_view_host_;
594 601
595 RenderFrameHostDelegate* delegate_; 602 RenderFrameHostDelegate* delegate_;
596 603
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 754
748 // NOTE: This must be the last member. 755 // NOTE: This must be the last member.
749 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; 756 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_;
750 757
751 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); 758 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl);
752 }; 759 };
753 760
754 } // namespace content 761 } // namespace content
755 762
756 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 763 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698