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

Side by Side Diff: chrome/browser/guest_view/ad_view/ad_view_guest.h

Issue 306003002: Move guest lifetime management to chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed content_browsertests crash Created 6 years, 6 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/guest_view/ad_view/ad_view_guest.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 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 CHROME_BROWSER_GUEST_VIEW_AD_VIEW_AD_VIEW_GUEST_H_ 5 #ifndef CHROME_BROWSER_GUEST_VIEW_AD_VIEW_AD_VIEW_GUEST_H_
6 #define CHROME_BROWSER_GUEST_VIEW_AD_VIEW_AD_VIEW_GUEST_H_ 6 #define CHROME_BROWSER_GUEST_VIEW_AD_VIEW_AD_VIEW_GUEST_H_
7 7
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/guest_view/guest_view.h" 9 #include "chrome/browser/guest_view/guest_view.h"
10 #include "content/public/browser/web_contents_observer.h"
11 10
12 // An AdViewGuest is a WebContentsObserver on the guest WebContents of a 11 // An AdViewGuest provides the browser-side implementation of the <adview> API
13 // <adview> tag. It provides the browser-side implementation of the <adview> 12 // and manages the dispatch of <adview> extension events. AdViewGuest is created
14 // API and manages the lifetime of <adview> extension events. AdViewGuest is 13 // on attachment. When a guest WebContents is associated with a particular
15 // created on attachment. When a guest WebContents is associated with 14 // embedder WebContents, we call this "attachment".
16 // a particular embedder WebContents, we call this "attachment".
17 // TODO(fsamuel): There might be an opportunity here to refactor and reuse code 15 // TODO(fsamuel): There might be an opportunity here to refactor and reuse code
18 // between AdViewGuest and WebViewGuest. 16 // between AdViewGuest and WebViewGuest.
19 class AdViewGuest : public GuestView<AdViewGuest>, 17 class AdViewGuest : public GuestView<AdViewGuest> {
20 public content::WebContentsObserver {
21 public: 18 public:
22 AdViewGuest(int guest_instance_id, 19 AdViewGuest(int guest_instance_id,
23 content::WebContents* guest_web_contents, 20 content::WebContents* guest_web_contents,
24 const std::string& extension_id); 21 const std::string& extension_id);
25 22
26 static const char Type[]; 23 static const char Type[];
27 24
28 private: 25 private:
29 virtual ~AdViewGuest(); 26 virtual ~AdViewGuest();
30 27
(...skipping 10 matching lines...) Expand all
41 bool is_main_frame, 38 bool is_main_frame,
42 const GURL& validated_url, 39 const GURL& validated_url,
43 int error_code, 40 int error_code,
44 const base::string16& error_description, 41 const base::string16& error_description,
45 content::RenderViewHost* render_view_host) OVERRIDE; 42 content::RenderViewHost* render_view_host) OVERRIDE;
46 43
47 DISALLOW_COPY_AND_ASSIGN(AdViewGuest); 44 DISALLOW_COPY_AND_ASSIGN(AdViewGuest);
48 }; 45 };
49 46
50 #endif // CHROME_BROWSER_GUEST_VIEW_AD_VIEW_AD_VIEW_GUEST_H_ 47 #endif // CHROME_BROWSER_GUEST_VIEW_AD_VIEW_AD_VIEW_GUEST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/guest_view/ad_view/ad_view_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698