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

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

Issue 811263002: Queue postMessage messages destined for a MimeHandlerView guest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@postMessage1
Patch Set: Created 6 years 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 bool attached() const { 204 bool attached() const {
205 return element_instance_id_ != guestview::kInstanceIDNone; 205 return element_instance_id_ != guestview::kInstanceIDNone;
206 } 206 }
207 207
208 // Returns the instance ID of the <*view> element. 208 // Returns the instance ID of the <*view> element.
209 int view_instance_id() const { return view_instance_id_; } 209 int view_instance_id() const { return view_instance_id_; }
210 210
211 // Returns the instance ID of this GuestViewBase. 211 // Returns the instance ID of this GuestViewBase.
212 int guest_instance_id() const { return guest_instance_id_; } 212 int guest_instance_id() const { return guest_instance_id_; }
213 213
214 // Returns the instance ID of the GuestViewBase's element.
215 int element_instance_id() const { return element_instance_id_; }
216
214 // Returns the extension ID of the embedder. 217 // Returns the extension ID of the embedder.
215 const std::string& owner_extension_id() const { 218 const std::string& owner_extension_id() const {
216 return owner_extension_id_; 219 return owner_extension_id_;
217 } 220 }
218 221
219 // Returns whether this GuestView is embedded in an extension/app. 222 // Returns whether this GuestView is embedded in an extension/app.
220 bool in_extension() const { return !owner_extension_id_.empty(); } 223 bool in_extension() const { return !owner_extension_id_.empty(); }
221 224
222 // Returns the user browser context of the embedder. 225 // Returns the user browser context of the embedder.
223 content::BrowserContext* browser_context() const { return browser_context_; } 226 content::BrowserContext* browser_context() const { return browser_context_; }
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 // This is used to ensure pending tasks will not fire after this object is 371 // This is used to ensure pending tasks will not fire after this object is
369 // destroyed. 372 // destroyed.
370 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_; 373 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_;
371 374
372 DISALLOW_COPY_AND_ASSIGN(GuestViewBase); 375 DISALLOW_COPY_AND_ASSIGN(GuestViewBase);
373 }; 376 };
374 377
375 } // namespace extensions 378 } // namespace extensions
376 379
377 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ 380 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698