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

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

Issue 1312653003: Fix for WebView accessible resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments by kalman@. Created 5 years, 3 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 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 EXTENSIONS_RENDERER_EXTENSION_FRAME_HELPER_H_ 5 #ifndef EXTENSIONS_RENDERER_EXTENSION_FRAME_HELPER_H_
6 #define EXTENSIONS_RENDERER_EXTENSION_FRAME_HELPER_H_ 6 #define EXTENSIONS_RENDERER_EXTENSION_FRAME_HELPER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "content/public/common/console_message_level.h" 10 #include "content/public/common/console_message_level.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // isn't one in this process. 46 // isn't one in this process.
47 static content::RenderFrame* GetBackgroundPageFrame( 47 static content::RenderFrame* GetBackgroundPageFrame(
48 const std::string& extension_id); 48 const std::string& extension_id);
49 49
50 // Returns true if the given |context| is for any frame in the extension's 50 // Returns true if the given |context| is for any frame in the extension's
51 // event page. 51 // event page.
52 // TODO(devlin): This isn't really used properly, and should probably be 52 // TODO(devlin): This isn't really used properly, and should probably be
53 // deleted. 53 // deleted.
54 static bool IsContextForEventPage(const ScriptContext* context); 54 static bool IsContextForEventPage(const ScriptContext* context);
55 55
56 // If this renderer process is a WebView guest process, the WebView parition
57 // ID is returned. Otherwise, an empty string is returned.
58 static std::string GetWebViewPartitionID();
not at google - send to devlin 2015/08/31 18:31:44 unused?
paulmeyer 2015/08/31 21:40:08 Yes. Removed.
59
56 ViewType view_type() const { return view_type_; } 60 ViewType view_type() const { return view_type_; }
57 int tab_id() const { return tab_id_; } 61 int tab_id() const { return tab_id_; }
58 int browser_window_id() const { return browser_window_id_; } 62 int browser_window_id() const { return browser_window_id_; }
59 bool did_create_current_document_element() const { 63 bool did_create_current_document_element() const {
60 return did_create_current_document_element_; 64 return did_create_current_document_element_;
61 } 65 }
62 66
63 private: 67 private:
64 // RenderFrameObserver implementation. 68 // RenderFrameObserver implementation.
65 void DidCreateDocumentElement() override; 69 void DidCreateDocumentElement() override;
(...skipping 12 matching lines...) Expand all
78 void OnExtensionDispatchOnConnect( 82 void OnExtensionDispatchOnConnect(
79 int target_port_id, 83 int target_port_id,
80 const std::string& channel_name, 84 const std::string& channel_name,
81 const ExtensionMsg_TabConnectionInfo& source, 85 const ExtensionMsg_TabConnectionInfo& source,
82 const ExtensionMsg_ExternalConnectionInfo& info, 86 const ExtensionMsg_ExternalConnectionInfo& info,
83 const std::string& tls_channel_id); 87 const std::string& tls_channel_id);
84 void OnExtensionDeliverMessage(int target_port_id, 88 void OnExtensionDeliverMessage(int target_port_id,
85 const Message& message); 89 const Message& message);
86 void OnExtensionDispatchOnDisconnect(int port_id, 90 void OnExtensionDispatchOnDisconnect(int port_id,
87 const std::string& error_message); 91 const std::string& error_message);
92 void OnExtensionSetWebViewPartitionID(const std::string& parition_id);
88 void OnExtensionSetTabId(int tab_id); 93 void OnExtensionSetTabId(int tab_id);
89 void OnUpdateBrowserWindowId(int browser_window_id); 94 void OnUpdateBrowserWindowId(int browser_window_id);
90 void OnNotifyRendererViewType(ViewType view_type); 95 void OnNotifyRendererViewType(ViewType view_type);
91 void OnExtensionResponse(int request_id, 96 void OnExtensionResponse(int request_id,
92 bool success, 97 bool success,
93 const base::ListValue& response, 98 const base::ListValue& response,
94 const std::string& error); 99 const std::string& error);
95 void OnExtensionMessageInvoke(const std::string& extension_id, 100 void OnExtensionMessageInvoke(const std::string& extension_id,
96 const std::string& module_name, 101 const std::string& module_name,
97 const std::string& function_name, 102 const std::string& function_name,
(...skipping 13 matching lines...) Expand all
111 116
112 // Whether or not the current document element has been created. 117 // Whether or not the current document element has been created.
113 bool did_create_current_document_element_; 118 bool did_create_current_document_element_;
114 119
115 DISALLOW_COPY_AND_ASSIGN(ExtensionFrameHelper); 120 DISALLOW_COPY_AND_ASSIGN(ExtensionFrameHelper);
116 }; 121 };
117 122
118 } // namespace extensions 123 } // namespace extensions
119 124
120 #endif // EXTENSIONS_RENDERER_EXTENSION_FRAME_HELPER_H_ 125 #endif // EXTENSIONS_RENDERER_EXTENSION_FRAME_HELPER_H_
OLDNEW
« extensions/renderer/dispatcher.cc ('K') | « extensions/renderer/dispatcher_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698