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

Side by Side Diff: extensions/browser/extension_web_contents_observer.h

Issue 1117023002: Keep event page alive when there's some Pepper plugin on it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove DCHECK. Created 5 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
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_EXTENSION_WEB_CONTENTS_OBSERVER_H_ 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_WEB_CONTENTS_OBSERVER_H_
6 #define EXTENSIONS_BROWSER_EXTENSION_WEB_CONTENTS_OBSERVER_H_ 6 #define EXTENSIONS_BROWSER_EXTENSION_WEB_CONTENTS_OBSERVER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override; 43 void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override;
44 44
45 // Per the documentation in WebContentsObserver, these two methods are 45 // Per the documentation in WebContentsObserver, these two methods are
46 // appropriate to track the set of current RenderFrameHosts. 46 // appropriate to track the set of current RenderFrameHosts.
47 // NOTE: FrameDeleted() != RenderFrameDeleted(). 47 // NOTE: FrameDeleted() != RenderFrameDeleted().
48 void FrameDeleted(content::RenderFrameHost* render_frame_host) override; 48 void FrameDeleted(content::RenderFrameHost* render_frame_host) override;
49 void RenderFrameHostChanged(content::RenderFrameHost* old_host, 49 void RenderFrameHostChanged(content::RenderFrameHost* old_host,
50 content::RenderFrameHost* new_host) override; 50 content::RenderFrameHost* new_host) override;
51 51
52 // Per the documentation in WebContentsObserver, these two methods are invoked
53 // when a Pepper plugin instance is attached/detached in the page DOM.
54 void PepperInstanceCreated() override;
55 void PepperInstanceDeleted() override;
56
52 // Returns the extension or app associated with a render view host. Returns 57 // Returns the extension or app associated with a render view host. Returns
53 // NULL if the render view host is not for a valid extension. 58 // NULL if the render view host is not for a valid extension.
54 const Extension* GetExtension(content::RenderViewHost* render_view_host); 59 const Extension* GetExtension(content::RenderViewHost* render_view_host);
55 60
56 // Updates ViewType for RenderViewHost based on GetViewType(web_contents()). 61 // Updates ViewType for RenderViewHost based on GetViewType(web_contents()).
57 void NotifyRenderViewType(content::RenderViewHost* render_view_host); 62 void NotifyRenderViewType(content::RenderViewHost* render_view_host);
58 63
59 // Returns the extension or app ID associated with a render view host. Returns 64 // Returns the extension or app ID associated with a render view host. Returns
60 // the empty string if the render view host is not for a valid extension. 65 // the empty string if the render view host is not for a valid extension.
61 static std::string GetExtensionId(content::RenderViewHost* render_view_host); 66 static std::string GetExtensionId(content::RenderViewHost* render_view_host);
62 67
63 private: 68 private:
64 // The BrowserContext associated with the WebContents being observed. 69 // The BrowserContext associated with the WebContents being observed.
65 content::BrowserContext* browser_context_; 70 content::BrowserContext* browser_context_;
66 71
67 DISALLOW_COPY_AND_ASSIGN(ExtensionWebContentsObserver); 72 DISALLOW_COPY_AND_ASSIGN(ExtensionWebContentsObserver);
68 }; 73 };
69 74
70 } // namespace extensions 75 } // namespace extensions
71 76
72 #endif // EXTENSIONS_BROWSER_EXTENSION_WEB_CONTENTS_OBSERVER_H_ 77 #endif // EXTENSIONS_BROWSER_EXTENSION_WEB_CONTENTS_OBSERVER_H_
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | extensions/browser/extension_web_contents_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698