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

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: 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 GuestView(content::WebContents* guest_web_contents, 110 GuestView(content::WebContents* guest_web_contents,
110 const std::string& extension_id); 111 const std::string& extension_id);
111 virtual ~GuestView(); 112 virtual ~GuestView();
112 113
113 // Dispatches an event |event_name| to the embedder with the |event| fields. 114 // Dispatches an event |event_name| to the embedder with the |event| fields.
114 void DispatchEvent(Event* event); 115 void DispatchEvent(Event* event);
115 116
116 private: 117 private:
117 void SendQueuedEvents(); 118 void SendQueuedEvents();
118 119
120 base::WeakPtrFactory<GuestView> weak_ptr_factory_;
sadrul 2014/01/15 17:04:22 This should be at the end (https://groups.google.c
Fady Samuel 2014/01/15 17:34:14 Done. I've changed a couple of places to match the
119 content::WebContents* const guest_web_contents_; 121 content::WebContents* const guest_web_contents_;
120 content::WebContents* embedder_web_contents_; 122 content::WebContents* embedder_web_contents_;
121 const std::string extension_id_; 123 const std::string extension_id_;
122 int embedder_render_process_id_; 124 int embedder_render_process_id_;
123 content::BrowserContext* const browser_context_; 125 content::BrowserContext* const browser_context_;
124 // |guest_instance_id_| is a profile-wide unique identifier for a guest 126 // |guest_instance_id_| is a profile-wide unique identifier for a guest
125 // WebContents. 127 // WebContents.
126 const int guest_instance_id_; 128 const int guest_instance_id_;
127 // |view_instance_id_| is an identifier that's unique within a particular 129 // |view_instance_id_| is an identifier that's unique within a particular
128 // embedder RenderViewHost for a particular <*view> instance. 130 // embedder RenderViewHost for a particular <*view> instance.
129 int view_instance_id_; 131 int view_instance_id_;
130 132
131 // This is a queue of Events that are destined to be sent to the embedder once 133 // 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. 134 // the guest is attached to a particular embedder.
133 std::queue<Event*> pending_events_; 135 std::queue<Event*> pending_events_;
134 136
135 DISALLOW_COPY_AND_ASSIGN(GuestView); 137 DISALLOW_COPY_AND_ASSIGN(GuestView);
136 }; 138 };
137 139
138 #endif // CHROME_BROWSER_GUESTVIEW_GUESTVIEW_H_ 140 #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