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

Side by Side Diff: extensions/browser/guest_view/guest_view_base.h

Issue 525793002: Make WebContentsObserver::web_contents() public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed Created 6 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_
7 7
8 #include <queue> 8 #include <queue>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 const gfx::Size& max_size); 185 const gfx::Size& max_size);
186 186
187 base::WeakPtr<GuestViewBase> AsWeakPtr(); 187 base::WeakPtr<GuestViewBase> AsWeakPtr();
188 188
189 bool initialized() const { return initialized_; } 189 bool initialized() const { return initialized_; }
190 190
191 content::WebContents* embedder_web_contents() const { 191 content::WebContents* embedder_web_contents() const {
192 return embedder_web_contents_; 192 return embedder_web_contents_;
193 } 193 }
194 194
195 // Returns the guest WebContents.
196 content::WebContents* guest_web_contents() const {
197 return web_contents();
198 }
199
200 // Returns the parameters associated with the element hosting this GuestView 195 // Returns the parameters associated with the element hosting this GuestView
201 // passed in from JavaScript. 196 // passed in from JavaScript.
202 base::DictionaryValue* attach_params() const { return attach_params_.get(); } 197 base::DictionaryValue* attach_params() const { return attach_params_.get(); }
203 198
204 // Returns whether this guest has an associated embedder. 199 // Returns whether this guest has an associated embedder.
205 bool attached() const { return !!embedder_web_contents_; } 200 bool attached() const { return !!embedder_web_contents_; }
206 201
207 // Returns the instance ID of the <*view> element. 202 // Returns the instance ID of the <*view> element.
208 int view_instance_id() const { return view_instance_id_; } 203 int view_instance_id() const { return view_instance_id_; }
209 204
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 // This is used to ensure pending tasks will not fire after this object is 327 // This is used to ensure pending tasks will not fire after this object is
333 // destroyed. 328 // destroyed.
334 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_; 329 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_;
335 330
336 DISALLOW_COPY_AND_ASSIGN(GuestViewBase); 331 DISALLOW_COPY_AND_ASSIGN(GuestViewBase);
337 }; 332 };
338 333
339 } // namespace extensions 334 } // namespace extensions
340 335
341 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ 336 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_
OLDNEW
« no previous file with comments | « extensions/browser/guest_view/app_view/app_view_guest.cc ('k') | extensions/browser/guest_view/guest_view_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698