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

Side by Side Diff: chrome/browser/guestview/guestview.h

Issue 139603002: <webview>: Speculative crash fix (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adddressed comment Created 6 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/guestview/guestview.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CHROME_BROWSER_GUESTVIEW_GUESTVIEW_H_ 5 #ifndef CHROME_BROWSER_GUESTVIEW_GUESTVIEW_H_
6 #define CHROME_BROWSER_GUESTVIEW_GUESTVIEW_H_ 6 #define CHROME_BROWSER_GUESTVIEW_GUESTVIEW_H_
7 7
8 #include <queue> 8 #include <queue>
9 9
10 #include "base/memory/weak_ptr.h"
10 #include "base/values.h" 11 #include "base/values.h"
11 #include "content/public/browser/browser_plugin_guest_delegate.h" 12 #include "content/public/browser/browser_plugin_guest_delegate.h"
12 #include "content/public/browser/web_contents.h" 13 #include "content/public/browser/web_contents.h"
13 14
14 class AdViewGuest; 15 class AdViewGuest;
15 class WebViewGuest; 16 class WebViewGuest;
16 struct RendererContentSettingRules; 17 struct RendererContentSettingRules;
17 18
18 // A GuestView is the base class browser-side API implementation for a <*view> 19 // A GuestView is the base class browser-side API implementation for a <*view>
19 // tag. GuestView maintains an association between a guest WebContents and an 20 // tag. GuestView maintains an association between a guest WebContents and an
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // WebContents. 126 // WebContents.
126 const int guest_instance_id_; 127 const int guest_instance_id_;
127 // |view_instance_id_| is an identifier that's unique within a particular 128 // |view_instance_id_| is an identifier that's unique within a particular
128 // embedder RenderViewHost for a particular <*view> instance. 129 // embedder RenderViewHost for a particular <*view> instance.
129 int view_instance_id_; 130 int view_instance_id_;
130 131
131 // This is a queue of Events that are destined to be sent to the embedder once 132 // This is a queue of Events that are destined to be sent to the embedder once
132 // the guest is attached to a particular embedder. 133 // the guest is attached to a particular embedder.
133 std::queue<Event*> pending_events_; 134 std::queue<Event*> pending_events_;
134 135
136 // This is used to ensure pending tasks will not fire after this object is
137 // destroyed.
138 base::WeakPtrFactory<GuestView> weak_ptr_factory_;
139
135 DISALLOW_COPY_AND_ASSIGN(GuestView); 140 DISALLOW_COPY_AND_ASSIGN(GuestView);
136 }; 141 };
137 142
138 #endif // CHROME_BROWSER_GUESTVIEW_GUESTVIEW_H_ 143 #endif // CHROME_BROWSER_GUESTVIEW_GUESTVIEW_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/guestview/guestview.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698