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

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

Issue 10868012: Browser Plugin: New Implementation (Browser Side) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master-trial-obrowser
Patch Set: Fixed tests. Also fixed a case where UpdateRect was being sent from bp renderer before NavigateGues… Created 8 years, 4 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 (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 <string> 9 #include <string>
10 10
(...skipping 21 matching lines...) Expand all
32 #include "base/win/scoped_handle.h" 32 #include "base/win/scoped_handle.h"
33 #endif 33 #endif
34 34
35 class InterstitialPageImpl; 35 class InterstitialPageImpl;
36 class SavePackage; 36 class SavePackage;
37 class SessionStorageNamespaceImpl; 37 class SessionStorageNamespaceImpl;
38 class WebContentsImpl; 38 class WebContentsImpl;
39 struct ViewMsg_PostMessage_Params; 39 struct ViewMsg_PostMessage_Params;
40 40
41 namespace content { 41 namespace content {
42 class BrowserPluginHostEmbedderRole;
43 class BrowserPluginHostGuestRole;
42 class ColorChooser; 44 class ColorChooser;
43 class DownloadItem; 45 class DownloadItem;
44 class JavaScriptDialogCreator; 46 class JavaScriptDialogCreator;
45 class RenderViewHost; 47 class RenderViewHost;
46 class RenderViewHostDelegateView; 48 class RenderViewHostDelegateView;
47 class RenderViewHostImpl; 49 class RenderViewHostImpl;
48 class SiteInstance; 50 class SiteInstance;
49 class TestWebContents; 51 class TestWebContents;
50 class WebContentsDelegate; 52 class WebContentsDelegate;
51 class WebContentsObserver; 53 class WebContentsObserver;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 content::old::BrowserPluginHost* old_browser_plugin_host() const { 147 content::old::BrowserPluginHost* old_browser_plugin_host() const {
146 return old_browser_plugin_host_.get(); 148 return old_browser_plugin_host_.get();
147 } 149 }
148 150
149 // Like GetController from WebContents, but returns the concrete object. 151 // Like GetController from WebContents, but returns the concrete object.
150 NavigationControllerImpl& GetControllerImpl(); 152 NavigationControllerImpl& GetControllerImpl();
151 153
152 // Expose the render manager for testing. 154 // Expose the render manager for testing.
153 RenderViewHostManager* GetRenderManagerForTesting(); 155 RenderViewHostManager* GetRenderManagerForTesting();
154 156
157 // Adds browser plugin 'guest' role to this class.
158 content::BrowserPluginHostGuestRole* AddGuestRole(
159 int instance_id,
160 content::RenderProcessHost* render_process_host);
161 // Exposes guest/embedder role so browser plugin delegates are accessible from
rjkroege 2012/08/22 21:57:38 It's worth noting that having these indicates that
lazyboy 2012/08/23 00:45:22 Done.
162 // a WebContents instance.
163 content::BrowserPluginHostGuestRole* GetGuestRole();
164 content::BrowserPluginHostEmbedderRole* GetEmbedderRole();
165
155 // content::WebContents ------------------------------------------------------ 166 // content::WebContents ------------------------------------------------------
156 virtual const base::PropertyBag* GetPropertyBag() const OVERRIDE; 167 virtual const base::PropertyBag* GetPropertyBag() const OVERRIDE;
157 virtual base::PropertyBag* GetPropertyBag() OVERRIDE; 168 virtual base::PropertyBag* GetPropertyBag() OVERRIDE;
158 virtual content::WebContentsDelegate* GetDelegate() OVERRIDE; 169 virtual content::WebContentsDelegate* GetDelegate() OVERRIDE;
159 virtual void SetDelegate(content::WebContentsDelegate* delegate) OVERRIDE; 170 virtual void SetDelegate(content::WebContentsDelegate* delegate) OVERRIDE;
160 virtual content::NavigationController& GetController() OVERRIDE; 171 virtual content::NavigationController& GetController() OVERRIDE;
161 virtual const content::NavigationController& GetController() const OVERRIDE; 172 virtual const content::NavigationController& GetController() const OVERRIDE;
162 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; 173 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE;
163 virtual content::RenderProcessHost* GetRenderProcessHost() const OVERRIDE; 174 virtual content::RenderProcessHost* GetRenderProcessHost() const OVERRIDE;
164 virtual content::RenderViewHost* GetRenderViewHost() const OVERRIDE; 175 virtual content::RenderViewHost* GetRenderViewHost() const OVERRIDE;
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); 523 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy);
513 void OnOpenColorChooser(int color_chooser_id, SkColor color); 524 void OnOpenColorChooser(int color_chooser_id, SkColor color);
514 void OnEndColorChooser(int color_chooser_id); 525 void OnEndColorChooser(int color_chooser_id);
515 void OnSetSelectedColorInColorChooser(int color_chooser_id, SkColor color); 526 void OnSetSelectedColorInColorChooser(int color_chooser_id, SkColor color);
516 void OnPepperPluginHung(int plugin_child_id, 527 void OnPepperPluginHung(int plugin_child_id,
517 const FilePath& path, 528 const FilePath& path,
518 bool is_hung); 529 bool is_hung);
519 void OnWebUISend(const GURL& source_url, 530 void OnWebUISend(const GURL& source_url,
520 const std::string& name, 531 const std::string& name,
521 const base::ListValue& args); 532 const base::ListValue& args);
533 void OnBrowserPluginNavigateGuest(int instance_id,
534 int64 frame_id,
535 std::string src,
536 gfx::Size size);
522 537
523 // Changes the IsLoading state and notifies delegate as needed 538 // Changes the IsLoading state and notifies delegate as needed
524 // |details| is used to provide details on the load that just finished 539 // |details| is used to provide details on the load that just finished
525 // (but can be null if not applicable). Can be overridden. 540 // (but can be null if not applicable). Can be overridden.
526 void SetIsLoading(bool is_loading, 541 void SetIsLoading(bool is_loading,
527 content::LoadNotificationDetails* details); 542 content::LoadNotificationDetails* details);
528 543
529 // Called by derived classes to indicate that we're no longer waiting for a 544 // Called by derived classes to indicate that we're no longer waiting for a
530 // response. This won't actually update the throbber, but it will get picked 545 // response. This won't actually update the throbber, but it will get picked
531 // up at the next animation step if the throbber is going. 546 // up at the next animation step if the throbber is going.
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 683
669 // Manages creation and swapping of render views. 684 // Manages creation and swapping of render views.
670 RenderViewHostManager render_manager_; 685 RenderViewHostManager render_manager_;
671 686
672 // Manages injecting Java objects into all RenderViewHosts associated with 687 // Manages injecting Java objects into all RenderViewHosts associated with
673 // this WebContentsImpl. 688 // this WebContentsImpl.
674 scoped_ptr<JavaBridgeDispatcherHostManager> 689 scoped_ptr<JavaBridgeDispatcherHostManager>
675 java_bridge_dispatcher_host_manager_; 690 java_bridge_dispatcher_host_manager_;
676 691
677 // TODO(fsamuel): Remove this once upstreaming of the new browser plugin 692 // TODO(fsamuel): Remove this once upstreaming of the new browser plugin
678 // implmentation is complete. 693 // implementation is complete.
679 // Manages the browser plugin instances hosted by this WebContents. 694 // Manages the browser plugin instances hosted by this WebContents.
680 scoped_ptr<content::old::BrowserPluginHost> old_browser_plugin_host_; 695 scoped_ptr<content::old::BrowserPluginHost> old_browser_plugin_host_;
681 696
682 // SavePackage, lazily created. 697 // SavePackage, lazily created.
683 scoped_refptr<SavePackage> save_package_; 698 scoped_refptr<SavePackage> save_package_;
684 699
685 // Data for loading state ---------------------------------------------------- 700 // Data for loading state ----------------------------------------------------
686 701
687 // Indicates whether we're currently loading a resource. 702 // Indicates whether we're currently loading a resource.
688 bool is_loading_; 703 bool is_loading_;
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 // The intrinsic size of the page. 802 // The intrinsic size of the page.
788 gfx::Size preferred_size_; 803 gfx::Size preferred_size_;
789 804
790 // Content restrictions, used to disable print/copy etc based on content's 805 // Content restrictions, used to disable print/copy etc based on content's
791 // (full-page plugins for now only) permissions. 806 // (full-page plugins for now only) permissions.
792 int content_restrictions_; 807 int content_restrictions_;
793 808
794 // Color chooser that was opened by this tab. 809 // Color chooser that was opened by this tab.
795 content::ColorChooser* color_chooser_; 810 content::ColorChooser* color_chooser_;
796 811
812 // Roles for WebContents to act as guest and/or embedder.
813 scoped_ptr<content::BrowserPluginHostEmbedderRole> embedder_role_;
814 scoped_ptr<content::BrowserPluginHostGuestRole> guest_role_;
815
797 // This must be at the end, or else we might get notifications and use other 816 // This must be at the end, or else we might get notifications and use other
798 // member variables that are gone. 817 // member variables that are gone.
799 content::NotificationRegistrar registrar_; 818 content::NotificationRegistrar registrar_;
800 819
801 // Used during IPC message dispatching so that the handlers can get a pointer 820 // Used during IPC message dispatching so that the handlers can get a pointer
802 // to the RVH through which the message was received. 821 // to the RVH through which the message was received.
803 content::RenderViewHost* message_source_; 822 content::RenderViewHost* message_source_;
804 823
805 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); 824 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl);
806 }; 825 };
807 826
808 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 827 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698