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

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: CQ Time! Created 6 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 | 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 // If |changed_extensions| is not empty, only the extensions in that set will
363 base::SharedMemoryHandle) 363 // be updated. Otherwise, all extensions will be updated.
364 IPC_MESSAGE_CONTROL2(ExtensionMsg_UpdateUserScripts,
365 base::SharedMemoryHandle,
366 std::set<std::string> /* changed extensions */)
364 367
365 // Tell the render view which browser window it's being attached to. 368 // Tell the render view which browser window it's being attached to.
366 IPC_MESSAGE_ROUTED1(ExtensionMsg_UpdateBrowserWindowId, 369 IPC_MESSAGE_ROUTED1(ExtensionMsg_UpdateBrowserWindowId,
367 int /* id of browser window */) 370 int /* id of browser window */)
368 371
369 // Tell the render view what its tab ID is. 372 // Tell the render view what its tab ID is.
370 IPC_MESSAGE_ROUTED1(ExtensionMsg_SetTabId, 373 IPC_MESSAGE_ROUTED1(ExtensionMsg_SetTabId,
371 int /* id of tab */) 374 int /* id of tab */)
372 375
373 // Tell the renderer to update an extension's permission set. 376 // 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 568 // Sent from the renderer to the browser to notify that content scripts are
566 // running in the renderer that the IPC originated from. 569 // running in the renderer that the IPC originated from.
567 // Note that the page_id is for the parent (or more accurately the topmost) 570 // 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, 571 // frame (e.g. if executing in an iframe this is the page ID of the parent,
569 // unless the parent is an iframe... etc). 572 // unless the parent is an iframe... etc).
570 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_ContentScriptsExecuting, 573 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_ContentScriptsExecuting,
571 ExecutingScriptsMap, 574 ExecutingScriptsMap,
572 int32 /* page_id of the _topmost_ frame */, 575 int32 /* page_id of the _topmost_ frame */,
573 GURL /* url of the _topmost_ frame */) 576 GURL /* url of the _topmost_ frame */)
574 577
575 IPC_MESSAGE_ROUTED2(ExtensionHostMsg_NotifyExtensionScriptExecution, 578 // Sent from the renderer to the browser to request permission for a content
579 // script to execute on a given page.
580 // If request id is -1, this signals that the request has already ran, and this
581 // merely serves as a notification. This happens when the feature to disable
582 // scripts running without user consent is not enabled.
583 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_RequestContentScriptPermission,
576 std::string /* extension id */, 584 std::string /* extension id */,
577 int /* page id */) 585 int /* page id */,
586 int /* request id */)
587
588 // Sent from the browser to the renderer in reply to a
589 // RequestContentScriptPermission message, granting permission for a content
590 // script to run.
591 IPC_MESSAGE_ROUTED1(ExtensionMsg_GrantContentScriptPermission,
592 int /* request id */)
578 593
579 // Sent by the renderer when a web page is checking if its app is installed. 594 // Sent by the renderer when a web page is checking if its app is installed.
580 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_GetAppInstallState, 595 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_GetAppInstallState,
581 GURL /* requestor_url */, 596 GURL /* requestor_url */,
582 int32 /* return_route_id */, 597 int32 /* return_route_id */,
583 int32 /* callback_id */) 598 int32 /* callback_id */)
584 599
585 // Optional Ack message sent to the browser to notify that the response to a 600 // Optional Ack message sent to the browser to notify that the response to a
586 // function has been processed. 601 // function has been processed.
587 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_ResponseAck, 602 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: 650 // certain conditions. This message is sent in response to several events:
636 // 651 //
637 // * ExtensionMsg_WatchPages was received, updating the set of conditions. 652 // * ExtensionMsg_WatchPages was received, updating the set of conditions.
638 // * A new page is loaded. This will be sent after 653 // * A new page is loaded. This will be sent after
639 // FrameHostMsg_DidCommitProvisionalLoad. Currently this only fires for the 654 // FrameHostMsg_DidCommitProvisionalLoad. Currently this only fires for the
640 // main frame. 655 // main frame.
641 // * Something changed on an existing frame causing the set of matching searches 656 // * Something changed on an existing frame causing the set of matching searches
642 // to change. 657 // to change.
643 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_OnWatchedPageChange, 658 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_OnWatchedPageChange,
644 std::vector<std::string> /* Matching CSS selectors */) 659 std::vector<std::string> /* Matching CSS selectors */)
OLDNEW
« no previous file with comments | « chrome/browser/extensions/user_script_master.cc ('k') | extensions/common/permissions/permissions_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698