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

Side by Side Diff: chrome/renderer/extensions/extension_helper.h

Issue 10114015: Fix bug where transient pages would miss events dispatched while it was (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_RENDERER_EXTENSIONS_EXTENSION_HELPER_H_ 5 #ifndef CHROME_RENDERER_EXTENSIONS_EXTENSION_HELPER_H_
6 #define CHROME_RENDERER_EXTENSIONS_EXTENSION_HELPER_H_ 6 #define CHROME_RENDERER_EXTENSIONS_EXTENSION_HELPER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 18 matching lines...) Expand all
29 namespace webkit_glue { 29 namespace webkit_glue {
30 class ResourceFetcher; 30 class ResourceFetcher;
31 class ImageResourceFetcher; 31 class ImageResourceFetcher;
32 } 32 }
33 33
34 // RenderView-level plumbing for extension features. 34 // RenderView-level plumbing for extension features.
35 class ExtensionHelper 35 class ExtensionHelper
36 : public content::RenderViewObserver, 36 : public content::RenderViewObserver,
37 public content::RenderViewObserverTracker<ExtensionHelper> { 37 public content::RenderViewObserverTracker<ExtensionHelper> {
38 public: 38 public:
39 // Returns a list of extension RenderViews that match the given filter
40 // criteria. If |browser_window_id| is not extension_misc::kUnknownWindowId,
41 // the list is restricted to views in that browser window.
42 static std::vector<content::RenderView*> GetExtensionViews(
43 const std::string& extension_id,
44 int browser_window_id,
45 content::ViewType view_type);
46
47 // Returns the given extension's background page, or NULL if none.
48 static content::RenderView* GetBackgroundPage(
49 const std::string& extension_id);
50
39 ExtensionHelper(content::RenderView* render_view, 51 ExtensionHelper(content::RenderView* render_view,
40 ExtensionDispatcher* extension_dispatcher); 52 ExtensionDispatcher* extension_dispatcher);
41 virtual ~ExtensionHelper(); 53 virtual ~ExtensionHelper();
42 54
43 // Starts installation of the page in the specified frame as a web app. The 55 // Starts installation of the page in the specified frame as a web app. The
44 // page must link to an external 'definition file'. This is different from 56 // page must link to an external 'definition file'. This is different from
45 // the 'application shortcuts' feature where we pull the application 57 // the 'application shortcuts' feature where we pull the application
46 // definition out of optional meta tags in the page. 58 // definition out of optional meta tags in the page.
47 bool InstallWebApplicationUsingDefinitionFile(WebKit::WebFrame* frame, 59 bool InstallWebApplicationUsingDefinitionFile(WebKit::WebFrame* frame,
48 string16* error); 60 string16* error);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // Type of view attached with RenderView. 129 // Type of view attached with RenderView.
118 content::ViewType view_type_; 130 content::ViewType view_type_;
119 131
120 // Id number of browser window which RenderView is attached to. 132 // Id number of browser window which RenderView is attached to.
121 int browser_window_id_; 133 int browser_window_id_;
122 134
123 DISALLOW_COPY_AND_ASSIGN(ExtensionHelper); 135 DISALLOW_COPY_AND_ASSIGN(ExtensionHelper);
124 }; 136 };
125 137
126 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_HELPER_H_ 138 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698