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

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: Removed AddGuest/RemoveGuest from content API! w00t! 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/size.h" 26 #include "ui/gfx/size.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 gfx { 41 namespace gfx {
41 class Rect; 42 class Rect;
42 class Size; 43 class Size;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // NavigationController belongs to one WebContents. The NavigationController can 81 // NavigationController belongs to one WebContents. The NavigationController can
81 // be obtained from GetController(), and is used to load URLs into the 82 // be obtained from GetController(), and is used to load URLs into the
82 // WebContents, navigate it backwards/forwards, etc. See navigation_controller.h 83 // WebContents, navigate it backwards/forwards, etc. See navigation_controller.h
83 // for more details. 84 // for more details.
84 class WebContents : public PageNavigator, 85 class WebContents : public PageNavigator,
85 public IPC::Sender, 86 public IPC::Sender,
86 public base::SupportsUserData { 87 public base::SupportsUserData {
87 public: 88 public:
88 struct CONTENT_EXPORT CreateParams { 89 struct CONTENT_EXPORT CreateParams {
89 explicit CreateParams(BrowserContext* context); 90 explicit CreateParams(BrowserContext* context);
91 virtual ~CreateParams();
90 CreateParams(BrowserContext* context, SiteInstance* site); 92 CreateParams(BrowserContext* context, SiteInstance* site);
91 93
92 BrowserContext* browser_context; 94 BrowserContext* browser_context;
93 95
94 // Specifying a SiteInstance here is optional. It can be set to avoid an 96 // Specifying a SiteInstance here is optional. It can be set to avoid an
95 // extra process swap if the first navigation is expected to require a 97 // extra process swap if the first navigation is expected to require a
96 // privileged process. 98 // privileged process.
97 SiteInstance* site_instance; 99 SiteInstance* site_instance;
98 100
99 WebContents* opener; 101 WebContents* opener;
100 int routing_id; 102 int routing_id;
101 int main_frame_routing_id; 103 int main_frame_routing_id;
102 104
103 // Initial size of the new WebContent's view. Can be (0, 0) if not needed. 105 // Initial size of the new WebContent's view. Can be (0, 0) if not needed.
104 gfx::Size initial_size; 106 gfx::Size initial_size;
105 107
106 // True if the contents should be initially hidden. 108 // True if the contents should be initially hidden.
107 bool initially_hidden; 109 bool initially_hidden;
108 110
111 // The guest instance to use.
lazyboy 2014/05/02 19:52:52 Need more description about guest since it is in W
Fady Samuel 2014/05/06 20:02:48 Done.
112 int guest_instance_id;
113
114 // TODO(fsmauel): This is temporary. Remove this when WebContents is
115 // created from the chrome layer.
116 scoped_ptr<base::DictionaryValue> guest_extra_params;
117
109 // Used to specify the location context which display the new view should 118 // Used to specify the location context which display the new view should
110 // belong. This can be NULL if not needed. 119 // belong. This can be NULL if not needed.
111 gfx::NativeView context; 120 gfx::NativeView context;
112 }; 121 };
113 122
114 // Creates a new WebContents. 123 // Creates a new WebContents.
115 CONTENT_EXPORT static WebContents* Create(const CreateParams& params); 124 CONTENT_EXPORT static WebContents* Create(const CreateParams& params);
116 125
117 // Similar to Create() above but should be used when you need to prepopulate 126 // Similar to Create() above but should be used when you need to prepopulate
118 // the SessionStorageNamespaceMap of the WebContents. This can happen if 127 // the SessionStorageNamespaceMap of the WebContents. This can happen if
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 558
550 private: 559 private:
551 // This interface should only be implemented inside content. 560 // This interface should only be implemented inside content.
552 friend class WebContentsImpl; 561 friend class WebContentsImpl;
553 WebContents() {} 562 WebContents() {}
554 }; 563 };
555 564
556 } // namespace content 565 } // namespace content
557 566
558 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ 567 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698