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

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

Issue 261013005: BrowserPlugin: Move CreateGuest to chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@guestview_manager_simplify_api
Patch Set: Fixed content_browsertests after a change Created 6 years, 7 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_PUBLIC_BROWSER_WEB_CONTENTS_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 12 matching lines...) Expand all
23 #include "third_party/skia/include/core/SkColor.h" 23 #include "third_party/skia/include/core/SkColor.h"
24 #include "ui/base/window_open_disposition.h" 24 #include "ui/base/window_open_disposition.h"
25 #include "ui/gfx/native_widget_types.h" 25 #include "ui/gfx/native_widget_types.h"
26 #include "ui/gfx/rect.h" 26 #include "ui/gfx/rect.h"
27 27
28 #if defined(OS_ANDROID) 28 #if defined(OS_ANDROID)
29 #include "base/android/scoped_java_ref.h" 29 #include "base/android/scoped_java_ref.h"
30 #endif 30 #endif
31 31
32 namespace base { 32 namespace base {
33 class DictionaryValue;
33 class TimeTicks; 34 class TimeTicks;
34 } 35 }
35 36
36 namespace blink { 37 namespace blink {
37 struct WebFindOptions; 38 struct WebFindOptions;
38 } 39 }
39 40
40 namespace net { 41 namespace net {
41 struct LoadStateWithParam; 42 struct LoadStateWithParam;
42 } 43 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // NavigationController belongs to one WebContents. The NavigationController can 76 // NavigationController belongs to one WebContents. The NavigationController can
76 // be obtained from GetController(), and is used to load URLs into the 77 // be obtained from GetController(), and is used to load URLs into the
77 // WebContents, navigate it backwards/forwards, etc. See navigation_controller.h 78 // WebContents, navigate it backwards/forwards, etc. See navigation_controller.h
78 // for more details. 79 // for more details.
79 class WebContents : public PageNavigator, 80 class WebContents : public PageNavigator,
80 public IPC::Sender, 81 public IPC::Sender,
81 public base::SupportsUserData { 82 public base::SupportsUserData {
82 public: 83 public:
83 struct CONTENT_EXPORT CreateParams { 84 struct CONTENT_EXPORT CreateParams {
84 explicit CreateParams(BrowserContext* context); 85 explicit CreateParams(BrowserContext* context);
86 ~CreateParams();
85 CreateParams(BrowserContext* context, SiteInstance* site); 87 CreateParams(BrowserContext* context, SiteInstance* site);
86 88
87 BrowserContext* browser_context; 89 BrowserContext* browser_context;
88 90
89 // Specifying a SiteInstance here is optional. It can be set to avoid an 91 // Specifying a SiteInstance here is optional. It can be set to avoid an
90 // extra process swap if the first navigation is expected to require a 92 // extra process swap if the first navigation is expected to require a
91 // privileged process. 93 // privileged process.
92 SiteInstance* site_instance; 94 SiteInstance* site_instance;
93 95
94 WebContents* opener; 96 WebContents* opener;
95 int routing_id; 97 int routing_id;
96 int main_frame_routing_id; 98 int main_frame_routing_id;
97 99
98 // Initial size of the new WebContent's view. Can be (0, 0) if not needed. 100 // Initial size of the new WebContent's view. Can be (0, 0) if not needed.
99 gfx::Size initial_size; 101 gfx::Size initial_size;
100 102
101 // True if the contents should be initially hidden. 103 // True if the contents should be initially hidden.
102 bool initially_hidden; 104 bool initially_hidden;
103 105
106 // If this instance ID is non-zero then it indicates that this WebContents
107 // should behave as a guest.
108 int guest_instance_id;
109
110 // TODO(fsamuel): This is temporary. Remove this once all guests are created
111 // from the content embedder.
112 scoped_ptr<base::DictionaryValue> guest_extra_params;
113
104 // Used to specify the location context which display the new view should 114 // Used to specify the location context which display the new view should
105 // belong. This can be NULL if not needed. 115 // belong. This can be NULL if not needed.
106 gfx::NativeView context; 116 gfx::NativeView context;
107 }; 117 };
108 118
109 // Creates a new WebContents. 119 // Creates a new WebContents.
110 CONTENT_EXPORT static WebContents* Create(const CreateParams& params); 120 CONTENT_EXPORT static WebContents* Create(const CreateParams& params);
111 121
112 // Similar to Create() above but should be used when you need to prepopulate 122 // Similar to Create() above but should be used when you need to prepopulate
113 // the SessionStorageNamespaceMap of the WebContents. This can happen if 123 // the SessionStorageNamespaceMap of the WebContents. This can happen if
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 605
596 private: 606 private:
597 // This interface should only be implemented inside content. 607 // This interface should only be implemented inside content.
598 friend class WebContentsImpl; 608 friend class WebContentsImpl;
599 WebContents() {} 609 WebContents() {}
600 }; 610 };
601 611
602 } // namespace content 612 } // namespace content
603 613
604 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ 614 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_
OLDNEW
« no previous file with comments | « content/public/browser/browser_plugin_guest_manager_delegate.cc ('k') | content/public/browser/web_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698