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

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

Issue 11361052: Browser Plugin: Implement autosize (Embedder-side code) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | Annotate | Revision Log
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 <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 14 matching lines...) Expand all
25 #include "content/public/common/renderer_preferences.h" 25 #include "content/public/common/renderer_preferences.h"
26 #include "net/base/load_states.h" 26 #include "net/base/load_states.h"
27 #include "ui/gfx/rect_f.h" 27 #include "ui/gfx/rect_f.h"
28 #include "ui/gfx/size.h" 28 #include "ui/gfx/size.h"
29 #include "webkit/glue/resource_type.h" 29 #include "webkit/glue/resource_type.h"
30 30
31 #if defined(OS_WIN) 31 #if defined(OS_WIN)
32 #include "base/win/scoped_handle.h" 32 #include "base/win/scoped_handle.h"
33 #endif 33 #endif
34 34
35 struct BrowserPluginHostMsg_CreateGuest_Params;
35 struct BrowserPluginHostMsg_ResizeGuest_Params; 36 struct BrowserPluginHostMsg_ResizeGuest_Params;
36 struct ViewMsg_PostMessage_Params; 37 struct ViewMsg_PostMessage_Params;
37 38
38 namespace webkit_glue { 39 namespace webkit_glue {
39 struct WebIntentData; 40 struct WebIntentData;
40 struct WebIntentServiceData; 41 struct WebIntentServiceData;
41 } 42 }
42 43
43 namespace content { 44 namespace content {
44 class BrowserPluginEmbedder; 45 class BrowserPluginEmbedder;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 const WebContentsImpl* base_web_contents); 86 const WebContentsImpl* base_web_contents);
86 87
87 static WebContentsImpl* CreateWithOpener( 88 static WebContentsImpl* CreateWithOpener(
88 BrowserContext* browser_context, 89 BrowserContext* browser_context,
89 SiteInstance* site_instance, 90 SiteInstance* site_instance,
90 int routing_id, 91 int routing_id,
91 const WebContentsImpl* base_web_contents, 92 const WebContentsImpl* base_web_contents,
92 WebContentsImpl* opener); 93 WebContentsImpl* opener);
93 94
94 // Creates a WebContents to be used as a browser plugin guest. 95 // Creates a WebContents to be used as a browser plugin guest.
95 static WebContentsImpl* CreateGuest(BrowserContext* browser_context, 96 static WebContentsImpl* CreateGuest(
96 const std::string& host, 97 BrowserContext* browser_context,
97 int guest_instance_id, 98 const std::string& host,
98 bool focused, 99 int guest_instance_id,
99 bool visible); 100 const BrowserPluginHostMsg_CreateGuest_Params& params);
100 101
101 // Returns the content specific prefs for the given RVH. 102 // Returns the content specific prefs for the given RVH.
102 static webkit_glue::WebPreferences GetWebkitPrefs( 103 static webkit_glue::WebPreferences GetWebkitPrefs(
103 RenderViewHost* rvh, const GURL& url); 104 RenderViewHost* rvh, const GURL& url);
104 105
105 // Creates a swapped out RenderView. This is used by the browser plugin to 106 // Creates a swapped out RenderView. This is used by the browser plugin to
106 // create a swapped out RenderView in the embedder render process for the 107 // create a swapped out RenderView in the embedder render process for the
107 // guest, to expose the guest's window object to the embedder. 108 // guest, to expose the guest's window object to the embedder.
108 // This returns the routing ID of the newly created swapped out RenderView. 109 // This returns the routing ID of the newly created swapped out RenderView.
109 int CreateSwappedOutRenderView(SiteInstance* instance); 110 int CreateSwappedOutRenderView(SiteInstance* instance);
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 void OnSetSelectedColorInColorChooser(int color_chooser_id, SkColor color); 557 void OnSetSelectedColorInColorChooser(int color_chooser_id, SkColor color);
557 void OnPepperPluginHung(int plugin_child_id, 558 void OnPepperPluginHung(int plugin_child_id,
558 const FilePath& path, 559 const FilePath& path,
559 bool is_hung); 560 bool is_hung);
560 void OnWebUISend(const GURL& source_url, 561 void OnWebUISend(const GURL& source_url,
561 const std::string& name, 562 const std::string& name,
562 const base::ListValue& args); 563 const base::ListValue& args);
563 void OnRequestPpapiBrokerPermission(int request_id, 564 void OnRequestPpapiBrokerPermission(int request_id,
564 const GURL& url, 565 const GURL& url,
565 const FilePath& plugin_path); 566 const FilePath& plugin_path);
566 void OnBrowserPluginCreateGuest(int instance_id, 567 void OnBrowserPluginCreateGuest(
567 const std::string& storage_partition_id, 568 int instance_id,
568 bool persist_storage, 569 const BrowserPluginHostMsg_CreateGuest_Params& params);
569 bool focused,
570 bool visible);
571 570
572 // Changes the IsLoading state and notifies delegate as needed 571 // Changes the IsLoading state and notifies delegate as needed
573 // |details| is used to provide details on the load that just finished 572 // |details| is used to provide details on the load that just finished
574 // (but can be null if not applicable). Can be overridden. 573 // (but can be null if not applicable). Can be overridden.
575 void SetIsLoading(bool is_loading, 574 void SetIsLoading(bool is_loading,
576 LoadNotificationDetails* details); 575 LoadNotificationDetails* details);
577 576
578 // Called by derived classes to indicate that we're no longer waiting for a 577 // Called by derived classes to indicate that we're no longer waiting for a
579 // response. This won't actually update the throbber, but it will get picked 578 // response. This won't actually update the throbber, but it will get picked
580 // up at the next animation step if the throbber is going. 579 // up at the next animation step if the throbber is going.
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 // All live RenderWidgetHostImpls that are created by this object and may 853 // All live RenderWidgetHostImpls that are created by this object and may
855 // outlive it. 854 // outlive it.
856 std::set<RenderWidgetHostImpl*> created_widgets_; 855 std::set<RenderWidgetHostImpl*> created_widgets_;
857 856
858 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); 857 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl);
859 }; 858 };
860 859
861 } // namespace content 860 } // namespace content
862 861
863 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 862 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698