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

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

Issue 708713003: Don't crash when granting permissions to active tab. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change for with iterators to a foreach. Created 6 years, 1 month 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 | « extensions/renderer/dispatcher_delegate.h ('k') | extensions/renderer/extension_helper.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 EXTENSIONS_RENDERER_EXTENSION_HELPER_H_ 5 #ifndef EXTENSIONS_RENDERER_EXTENSION_HELPER_H_
6 #define EXTENSIONS_RENDERER_EXTENSION_HELPER_H_ 6 #define EXTENSIONS_RENDERER_EXTENSION_HELPER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "content/public/common/console_message_level.h" 11 #include "content/public/common/console_message_level.h"
12 #include "content/public/renderer/render_view_observer.h" 12 #include "content/public/renderer/render_view_observer.h"
13 #include "content/public/renderer/render_view_observer_tracker.h" 13 #include "content/public/renderer/render_view_observer_tracker.h"
14 #include "extensions/common/view_type.h" 14 #include "extensions/common/view_type.h"
15 15
16 class GURL; 16 class GURL;
17 class SkBitmap; 17 class SkBitmap;
18 struct ExtensionMsg_ExternalConnectionInfo; 18 struct ExtensionMsg_ExternalConnectionInfo;
19 19
20 namespace base { 20 namespace base {
21 class DictionaryValue; 21 class DictionaryValue;
22 class ListValue; 22 class ListValue;
23 } 23 }
24 24
25 namespace extensions { 25 namespace extensions {
26 class AutomationApiHelper; 26 class AutomationApiHelper;
27 class Dispatcher; 27 class Dispatcher;
28 class URLPatternSet;
28 29
29 struct Message; 30 struct Message;
30 31
31 // RenderView-level plumbing for extension features. 32 // RenderView-level plumbing for extension features.
32 class ExtensionHelper 33 class ExtensionHelper
33 : public content::RenderViewObserver, 34 : public content::RenderViewObserver,
34 public content::RenderViewObserverTracker<ExtensionHelper> { 35 public content::RenderViewObserverTracker<ExtensionHelper> {
35 public: 36 public:
36 // Returns a list of extension RenderViews that match the given filter 37 // Returns a list of extension RenderViews that match the given filter
37 // criteria. If |browser_window_id| is not extension_misc::kUnknownWindowId, 38 // criteria. If |browser_window_id| is not extension_misc::kUnknownWindowId,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 const Message& message); 83 const Message& message);
83 void OnExtensionDispatchOnDisconnect(int port_id, 84 void OnExtensionDispatchOnDisconnect(int port_id,
84 const std::string& error_message); 85 const std::string& error_message);
85 void OnNotifyRendererViewType(ViewType view_type); 86 void OnNotifyRendererViewType(ViewType view_type);
86 void OnSetTabId(int tab_id); 87 void OnSetTabId(int tab_id);
87 void OnUpdateBrowserWindowId(int window_id); 88 void OnUpdateBrowserWindowId(int window_id);
88 void OnAddMessageToConsole(content::ConsoleMessageLevel level, 89 void OnAddMessageToConsole(content::ConsoleMessageLevel level,
89 const std::string& message); 90 const std::string& message);
90 void OnAppWindowClosed(); 91 void OnAppWindowClosed();
91 void OnSetFrameName(const std::string& name); 92 void OnSetFrameName(const std::string& name);
93 void OnUpdateTabSpecificPermissions(
94 const GURL& url,
95 const std::string& extension_id,
96 const URLPatternSet& origin_set);
97 void OnClearTabSpecificPermissions(
98 const std::vector<std::string>& extension_ids);
92 99
93 Dispatcher* dispatcher_; 100 Dispatcher* dispatcher_;
94 101
95 // Type of view attached with RenderView. 102 // Type of view attached with RenderView.
96 ViewType view_type_; 103 ViewType view_type_;
97 104
98 // Id of the tab which the RenderView is attached to. 105 // Id of the tab which the RenderView is attached to.
99 int tab_id_; 106 int tab_id_;
100 107
101 // Id number of browser window which RenderView is attached to. 108 // Id number of browser window which RenderView is attached to.
102 int browser_window_id_; 109 int browser_window_id_;
103 110
104 DISALLOW_COPY_AND_ASSIGN(ExtensionHelper); 111 DISALLOW_COPY_AND_ASSIGN(ExtensionHelper);
105 }; 112 };
106 113
107 } // namespace extensions 114 } // namespace extensions
108 115
109 #endif // EXTENSIONS_RENDERER_EXTENSION_HELPER_H_ 116 #endif // EXTENSIONS_RENDERER_EXTENSION_HELPER_H_
OLDNEW
« no previous file with comments | « extensions/renderer/dispatcher_delegate.h ('k') | extensions/renderer/extension_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698