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

Side by Side Diff: extensions/common/extension_messages.h

Issue 288053002: Block content scripts from executing until user grants permission (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase after ScriptInjection refactor Created 6 years, 7 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 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 // IPC messages for extensions. 5 // IPC messages for extensions.
6 // Multiply-included message file, hence no include guard. 6 // Multiply-included message file, hence no include guard.
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 // extension ids 352 // extension ids
353 extensions::ExtensionsClient::ScriptingWhitelist) 353 extensions::ExtensionsClient::ScriptingWhitelist)
354 354
355 // Notification that renderer should run some JavaScript code. 355 // Notification that renderer should run some JavaScript code.
356 IPC_MESSAGE_ROUTED1(ExtensionMsg_ExecuteCode, 356 IPC_MESSAGE_ROUTED1(ExtensionMsg_ExecuteCode,
357 ExtensionMsg_ExecuteCode_Params) 357 ExtensionMsg_ExecuteCode_Params)
358 358
359 // Notification that the user scripts have been updated. It has one 359 // Notification that the user scripts have been updated. It has one
360 // SharedMemoryHandle argument consisting of the pickled script data. This 360 // SharedMemoryHandle argument consisting of the pickled script data. This
361 // handle is valid in the context of the renderer. 361 // handle is valid in the context of the renderer.
362 IPC_MESSAGE_CONTROL1(ExtensionMsg_UpdateUserScripts, 362 IPC_MESSAGE_CONTROL2(ExtensionMsg_UpdateUserScripts,
363 base::SharedMemoryHandle) 363 base::SharedMemoryHandle,
364 std::set<std::string> /* changed extensions */)
364 365
365 // Tell the render view which browser window it's being attached to. 366 // Tell the render view which browser window it's being attached to.
366 IPC_MESSAGE_ROUTED1(ExtensionMsg_UpdateBrowserWindowId, 367 IPC_MESSAGE_ROUTED1(ExtensionMsg_UpdateBrowserWindowId,
367 int /* id of browser window */) 368 int /* id of browser window */)
368 369
369 // Tell the render view what its tab ID is. 370 // Tell the render view what its tab ID is.
370 IPC_MESSAGE_ROUTED1(ExtensionMsg_SetTabId, 371 IPC_MESSAGE_ROUTED1(ExtensionMsg_SetTabId,
371 int /* id of tab */) 372 int /* id of tab */)
372 373
373 // Tell the renderer to update an extension's permission set. 374 // Tell the renderer to update an extension's permission set.
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 // Sent from the renderer to the browser to notify that content scripts are 566 // Sent from the renderer to the browser to notify that content scripts are
566 // running in the renderer that the IPC originated from. 567 // running in the renderer that the IPC originated from.
567 // Note that the page_id is for the parent (or more accurately the topmost) 568 // Note that the page_id is for the parent (or more accurately the topmost)
568 // frame (e.g. if executing in an iframe this is the page ID of the parent, 569 // frame (e.g. if executing in an iframe this is the page ID of the parent,
569 // unless the parent is an iframe... etc). 570 // unless the parent is an iframe... etc).
570 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_ContentScriptsExecuting, 571 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_ContentScriptsExecuting,
571 ExecutingScriptsMap, 572 ExecutingScriptsMap,
572 int32 /* page_id of the _topmost_ frame */, 573 int32 /* page_id of the _topmost_ frame */,
573 GURL /* url of the _topmost_ frame */) 574 GURL /* url of the _topmost_ frame */)
574 575
575 IPC_MESSAGE_ROUTED2(ExtensionHostMsg_NotifyExtensionScriptExecution, 576 // Sent from the renderer to the browser to request permission for a content
577 // script to execute on a given page.
578 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_RequestContentScriptPermission,
576 std::string /* extension id */, 579 std::string /* extension id */,
577 int /* page id */) 580 int /* page id */,
581 int /* request id */)
582
583 // Sent from the browser to the renderer in reply to a
584 // RequestContentScriptPermission message, granting permission for a content
585 // script to run.
586 IPC_MESSAGE_ROUTED1(ExtensionMsg_GrantContentScriptPermission,
587 int /* request id */)
578 588
579 // Sent by the renderer when a web page is checking if its app is installed. 589 // Sent by the renderer when a web page is checking if its app is installed.
580 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_GetAppInstallState, 590 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_GetAppInstallState,
581 GURL /* requestor_url */, 591 GURL /* requestor_url */,
582 int32 /* return_route_id */, 592 int32 /* return_route_id */,
583 int32 /* callback_id */) 593 int32 /* callback_id */)
584 594
585 // Optional Ack message sent to the browser to notify that the response to a 595 // Optional Ack message sent to the browser to notify that the response to a
586 // function has been processed. 596 // function has been processed.
587 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_ResponseAck, 597 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_ResponseAck,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 // certain conditions. This message is sent in response to several events: 645 // certain conditions. This message is sent in response to several events:
636 // 646 //
637 // * ExtensionMsg_WatchPages was received, updating the set of conditions. 647 // * ExtensionMsg_WatchPages was received, updating the set of conditions.
638 // * A new page is loaded. This will be sent after 648 // * A new page is loaded. This will be sent after
639 // FrameHostMsg_DidCommitProvisionalLoad. Currently this only fires for the 649 // FrameHostMsg_DidCommitProvisionalLoad. Currently this only fires for the
640 // main frame. 650 // main frame.
641 // * Something changed on an existing frame causing the set of matching searches 651 // * Something changed on an existing frame causing the set of matching searches
642 // to change. 652 // to change.
643 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_OnWatchedPageChange, 653 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_OnWatchedPageChange,
644 std::vector<std::string> /* Matching CSS selectors */) 654 std::vector<std::string> /* Matching CSS selectors */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698