diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-07 23:51:54 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-07 23:51:54 +0000 |
commit | 60465a3807e53f10327b57e94b14bfb7fbda092d (patch) | |
tree | 12336323e452bea4c8321f8693f8cfb6aaf14a8c | |
parent | 12ba1b584182822ed84ad8e6b97183fc4e05f9c7 (diff) | |
download | chromium_src-60465a3807e53f10327b57e94b14bfb7fbda092d.zip chromium_src-60465a3807e53f10327b57e94b14bfb7fbda092d.tar.gz chromium_src-60465a3807e53f10327b57e94b14bfb7fbda092d.tar.bz2 |
Rename webNavigation.onBeforeRetarget to webNavigation.onCreateNavigationTarget
BUG=93709
TEST=existing tests
Review URL: http://codereview.chromium.org/7837011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100053 0039d316-1c4b-4281-b951-d872f2087c98
13 files changed, 138 insertions, 132 deletions
diff --git a/chrome/browser/extensions/extension_webnavigation_api.cc b/chrome/browser/extensions/extension_webnavigation_api.cc index aa6fbc7..f79a2af 100644 --- a/chrome/browser/extensions/extension_webnavigation_api.cc +++ b/chrome/browser/extensions/extension_webnavigation_api.cc @@ -159,13 +159,14 @@ void DispatchOnCompleted(TabContents* tab_contents, DispatchEvent(tab_contents->browser_context(), keys::kOnCompleted, json_args); } -// Constructs and dispatches an onBeforeRetarget event. -void DispatchOnBeforeRetarget(TabContents* tab_contents, - content::BrowserContext* browser_context, - int64 source_frame_id, - bool source_frame_is_main_frame, - TabContents* target_tab_contents, - const GURL& target_url) { +// Constructs and dispatches an onBeforeCreateNavigationTarget event. +void DispatchOnBeforeCreateNavigationTarget( + TabContents* tab_contents, + content::BrowserContext* browser_context, + int64 source_frame_id, + bool source_frame_is_main_frame, + TabContents* target_tab_contents, + const GURL& target_url) { ListValue args; DictionaryValue* dict = new DictionaryValue(); dict->SetInteger(keys::kSourceTabIdKey, @@ -180,7 +181,8 @@ void DispatchOnBeforeRetarget(TabContents* tab_contents, std::string json_args; base::JSONWriter::Write(&args, false, &json_args); - DispatchEvent(browser_context, keys::kOnBeforeRetarget, json_args); + DispatchEvent( + browser_context, keys::kOnBeforeCreateNavigationTarget, json_args); } // Constructs and dispatches an onErrorOccurred event. @@ -403,7 +405,7 @@ void ExtensionWebNavigationEventRouter::Retargeting( details->target_tab_contents, details->target_url); } else { - DispatchOnBeforeRetarget( + DispatchOnBeforeCreateNavigationTarget( details->source_tab_contents, details->target_tab_contents->browser_context(), details->source_frame_id, @@ -419,12 +421,13 @@ void ExtensionWebNavigationEventRouter::TabAdded(TabContents* tab_contents) { if (iter == pending_tab_contents_.end()) return; - DispatchOnBeforeRetarget(iter->second.source_tab_contents, - iter->second.target_tab_contents->browser_context(), - iter->second.source_frame_id, - iter->second.source_frame_is_main_frame, - iter->second.target_tab_contents, - iter->second.target_url); + DispatchOnBeforeCreateNavigationTarget( + iter->second.source_tab_contents, + iter->second.target_tab_contents->browser_context(), + iter->second.source_frame_id, + iter->second.source_frame_is_main_frame, + iter->second.target_tab_contents, + iter->second.target_url); pending_tab_contents_.erase(iter); } diff --git a/chrome/browser/extensions/extension_webnavigation_api_constants.cc b/chrome/browser/extensions/extension_webnavigation_api_constants.cc index a79930a..dcf83f9 100644 --- a/chrome/browser/extensions/extension_webnavigation_api_constants.cc +++ b/chrome/browser/extensions/extension_webnavigation_api_constants.cc @@ -18,7 +18,8 @@ const char kTransitionQualifiersKey[] = "transitionQualifiers"; const char kUrlKey[] = "url"; const char kOnBeforeNavigate[] = "experimental.webNavigation.onBeforeNavigate"; -const char kOnBeforeRetarget[] = "experimental.webNavigation.onBeforeRetarget"; +const char kOnBeforeCreateNavigationTarget[] = + "experimental.webNavigation.onBeforeCreateNavigationTarget"; const char kOnCommitted[] = "experimental.webNavigation.onCommitted"; const char kOnCompleted[] = "experimental.webNavigation.onCompleted"; const char kOnDOMContentLoaded[] = diff --git a/chrome/browser/extensions/extension_webnavigation_api_constants.h b/chrome/browser/extensions/extension_webnavigation_api_constants.h index 8c84380..dc142d6 100644 --- a/chrome/browser/extensions/extension_webnavigation_api_constants.h +++ b/chrome/browser/extensions/extension_webnavigation_api_constants.h @@ -23,8 +23,8 @@ extern const char kTransitionQualifiersKey[]; extern const char kUrlKey[]; // Events. +extern const char kOnBeforeCreateNavigationTarget[]; extern const char kOnBeforeNavigate[]; -extern const char kOnBeforeRetarget[]; extern const char kOnCommitted[]; extern const char kOnCompleted[]; extern const char kOnDOMContentLoaded[]; diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json index 83a7c75..3c9d5ad 100644 --- a/chrome/common/extensions/api/extension_api.json +++ b/chrome/common/extensions/api/extension_api.json @@ -5323,7 +5323,7 @@ ] }, { - "name": "onBeforeRetarget", + "name": "onBeforeCreateNavigationTarget", "type": "function", "description": "Fired when a new window, or a new tab in an existing window, is about to be created to host a navigation.", "parameters": [ diff --git a/chrome/common/extensions/docs/examples/api/webNavigation/basic/background.html b/chrome/common/extensions/docs/examples/api/webNavigation/basic/background.html index 138e8d0..4cf0f56 100644 --- a/chrome/common/extensions/docs/examples/api/webNavigation/basic/background.html +++ b/chrome/common/extensions/docs/examples/api/webNavigation/basic/background.html @@ -13,8 +13,9 @@ <script> var nav = new NavigationCollector(); - var eventList = ['onBeforeNavigate', 'onBeforeRetarget', 'onCommitted', - 'onCompleted', 'onDOMContentLoaded', 'onErrorOccurred']; + var eventList = ['onBeforeNavigate', 'onBeforeCreateNavigationTarget', + 'onCommitted', 'onCompleted', 'onDOMContentLoaded', + 'onErrorOccurred']; eventList.forEach(function(e) { chrome.experimental.webNavigation[e].addListener(function(data) { diff --git a/chrome/common/extensions/docs/examples/api/webNavigation/basic/navigation_collector.js b/chrome/common/extensions/docs/examples/api/webNavigation/basic/navigation_collector.js index b33d58c..d4bcf32 100644 --- a/chrome/common/extensions/docs/examples/api/webNavigation/basic/navigation_collector.js +++ b/chrome/common/extensions/docs/examples/api/webNavigation/basic/navigation_collector.js @@ -48,8 +48,8 @@ function NavigationCollector() { // Bind handlers to the 'webNavigation' events that we're interested // in handling in order to build up a complete picture of the whole // navigation event. - chrome.experimental.webNavigation.onBeforeRetarget.addListener( - this.onBeforeRetargetListener_.bind(this)); + chrome.experimental.webNavigation.onBeforeCreateNavigationTarget.addListener( + this.onBeforeCreateNavigationTargetListener_.bind(this)); chrome.experimental.webNavigation.onBeforeNavigate.addListener( this.onBeforeNavigateListener_.bind(this)); chrome.experimental.webNavigation.onCompleted.addListener( @@ -157,8 +157,9 @@ NavigationCollector.prototype = { /** - * Handler for the 'onBeforeRetarget' event. Updates the pending request - * with a source frame/tab, and notes that it was opened in a new tab. + * Handler for the 'onBeforeCreateNavigationTarget' event. Updates the + * pending request with a source frame/tab, and notes that it was opened in a + * new tab. * * Pushes the request onto the * 'pending_' object, and stores it for later use. @@ -166,7 +167,7 @@ NavigationCollector.prototype = { * @param {!Object} data The event data generated for this request. * @private */ - onBeforeRetargetListener_: function(data) { + onBeforeCreateNavigationTargetListener_: function(data) { var id = this.parseId_(data); this.prepareDataStorage_(id, data.url); this.pending_[id].openedInNewTab = data.tabId; diff --git a/chrome/common/extensions/docs/experimental.webNavigation.html b/chrome/common/extensions/docs/experimental.webNavigation.html index 4b99ab4..489359b 100644 --- a/chrome/common/extensions/docs/experimental.webNavigation.html +++ b/chrome/common/extensions/docs/experimental.webNavigation.html @@ -288,9 +288,9 @@ <a href="#global-events">Events</a> <ol> <li> - <a href="#event-onBeforeNavigate">onBeforeNavigate</a> + <a href="#event-onBeforeCreateNavigationTarget">onBeforeCreateNavigationTarget</a> </li><li> - <a href="#event-onBeforeRetarget">onBeforeRetarget</a> + <a href="#event-onBeforeNavigate">onBeforeNavigate</a> </li><li> <a href="#event-onCommitted">onCommitted</a> </li><li> @@ -919,17 +919,17 @@ unexpected results. <h3>Events</h3> <!-- iterates over all events --> <div class="apiItem"> - <a name="event-onBeforeNavigate"></a> - <h4>onBeforeNavigate</h4> + <a name="event-onBeforeCreateNavigationTarget"></a> + <h4>onBeforeCreateNavigationTarget</h4> <div class="summary"> <!-- Note: intentionally longer 80 columns --> - <span class="subdued">chrome.experimental.webNavigation.</span><span>onBeforeNavigate</span><span class="subdued">.addListener</span>(function(<span>object details</span>) <span class="subdued">{...}</span><span></span>); + <span class="subdued">chrome.experimental.webNavigation.</span><span>onBeforeCreateNavigationTarget</span><span class="subdued">.addListener</span>(function(<span>object details</span>) <span class="subdued">{...}</span><span></span>); </div> <div class="description"> <p class="todo" style="display: none; ">Undocumented.</p> - <p>Fired when a navigation is about to occur.</p> + <p>Fired when a new window, or a new tab in an existing window, is about to be created to host a navigation.</p> <!-- LISTENER PARAMETERS --> <div> @@ -985,7 +985,7 @@ unexpected results. <div> <div> <dt> - <var>tabId</var> + <var>sourceTabId</var> <em> <!-- TYPE --> @@ -1013,7 +1013,7 @@ unexpected results. <dd class="todo" style="display: none; "> Undocumented. </dd> - <dd>The ID of the tab in which the navigation is about to occur.</dd> + <dd>The ID of the tab in which the navigation is triggered.</dd> <dd style="display: none; "> This parameter was added in version <b><span></span></b>. @@ -1053,7 +1053,7 @@ unexpected results. </div><div> <div> <dt> - <var>url</var> + <var>sourceFrameId</var> <em> <!-- TYPE --> @@ -1069,7 +1069,7 @@ unexpected results. <span style="display: none; "> array of <span><span></span></span> </span> - <span>string</span> + <span>integer</span> <span style="display: none; "></span> </span> </span> @@ -1078,12 +1078,78 @@ unexpected results. </em> </dt> - <dd class="todo"> + <dd class="todo" style="display: none; "> Undocumented. </dd> + <dd>The ID of the frame with sourceTabId in which the navigation is triggered. 0 indicates the main frame.</dd> <dd style="display: none; "> - Description of this parameter from the json schema. + This parameter was added in version + <b><span></span></b>. + You must omit this parameter in earlier versions, + and you may omit it in any version. If you require this + parameter, the manifest key + <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a> + can ensure that your extension won't be run in an earlier browser version. + </dd> + + <!-- OBJECT PROPERTIES --> + <dd style="display: none; "> + <dl> + <div> + <div> + </div> + </div> + </dl> + </dd> + + <!-- OBJECT METHODS --> + <dd style="display: none; "> + <div></div> + </dd> + + <!-- OBJECT EVENT FIELDS --> + <dd style="display: none; "> + <div></div> </dd> + + <!-- FUNCTION PARAMETERS --> + <dd style="display: none; "> + <div></div> + </dd> + + </div> + </div><div> + <div> + <dt> + <var>url</var> + <em> + + <!-- TYPE --> + <div style="display:inline"> + ( + <span class="optional" style="display: none; ">optional</span> + <span class="enum" style="display: none; ">enumerated</span> + <span id="typeTemplate"> + <span style="display: none; "> + <a> Type</a> + </span> + <span> + <span style="display: none; "> + array of <span><span></span></span> + </span> + <span>string</span> + <span style="display: none; "></span> + </span> + </span> + ) + </div> + + </em> + </dt> + <dd class="todo" style="display: none; "> + Undocumented. + </dd> + <dd>The URL to be opened in the new window.</dd> <dd style="display: none; "> This parameter was added in version <b><span></span></b>. @@ -1123,7 +1189,7 @@ unexpected results. </div><div> <div> <dt> - <var>frameId</var> + <var>tabId</var> <em> <!-- TYPE --> @@ -1151,7 +1217,7 @@ unexpected results. <dd class="todo" style="display: none; "> Undocumented. </dd> - <dd>0 indicates the navigation happens in the tab content window; a positive value indicates navigation in a subframe. Frame IDs are unique within a tab.</dd> + <dd>The ID of the tab in which the url is opened</dd> <dd style="display: none; "> This parameter was added in version <b><span></span></b>. @@ -1219,7 +1285,7 @@ unexpected results. <dd class="todo" style="display: none; "> Undocumented. </dd> - <dd>The time when the browser was about to start the navigation, in milliseconds since the epoch.</dd> + <dd>The time when the browser was about to create a new view, in milliseconds since the epoch.</dd> <dd style="display: none; "> This parameter was added in version <b><span></span></b>. @@ -1302,17 +1368,17 @@ unexpected results. </div> <!-- /description --> </div><div class="apiItem"> - <a name="event-onBeforeRetarget"></a> - <h4>onBeforeRetarget</h4> + <a name="event-onBeforeNavigate"></a> + <h4>onBeforeNavigate</h4> <div class="summary"> <!-- Note: intentionally longer 80 columns --> - <span class="subdued">chrome.experimental.webNavigation.</span><span>onBeforeRetarget</span><span class="subdued">.addListener</span>(function(<span>object details</span>) <span class="subdued">{...}</span><span></span>); + <span class="subdued">chrome.experimental.webNavigation.</span><span>onBeforeNavigate</span><span class="subdued">.addListener</span>(function(<span>object details</span>) <span class="subdued">{...}</span><span></span>); </div> <div class="description"> <p class="todo" style="display: none; ">Undocumented.</p> - <p>Fired when a new window, or a new tab in an existing window, is about to be created to host a navigation.</p> + <p>Fired when a navigation is about to occur.</p> <!-- LISTENER PARAMETERS --> <div> @@ -1368,75 +1434,7 @@ unexpected results. <div> <div> <dt> - <var>sourceTabId</var> - <em> - - <!-- TYPE --> - <div style="display:inline"> - ( - <span class="optional" style="display: none; ">optional</span> - <span class="enum" style="display: none; ">enumerated</span> - <span id="typeTemplate"> - <span style="display: none; "> - <a> Type</a> - </span> - <span> - <span style="display: none; "> - array of <span><span></span></span> - </span> - <span>integer</span> - <span style="display: none; "></span> - </span> - </span> - ) - </div> - - </em> - </dt> - <dd class="todo" style="display: none; "> - Undocumented. - </dd> - <dd>The ID of the tab in which the navigation is triggered.</dd> - <dd style="display: none; "> - This parameter was added in version - <b><span></span></b>. - You must omit this parameter in earlier versions, - and you may omit it in any version. If you require this - parameter, the manifest key - <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a> - can ensure that your extension won't be run in an earlier browser version. - </dd> - - <!-- OBJECT PROPERTIES --> - <dd style="display: none; "> - <dl> - <div> - <div> - </div> - </div> - </dl> - </dd> - - <!-- OBJECT METHODS --> - <dd style="display: none; "> - <div></div> - </dd> - - <!-- OBJECT EVENT FIELDS --> - <dd style="display: none; "> - <div></div> - </dd> - - <!-- FUNCTION PARAMETERS --> - <dd style="display: none; "> - <div></div> - </dd> - - </div> - </div><div> - <div> - <dt> - <var>sourceFrameId</var> + <var>tabId</var> <em> <!-- TYPE --> @@ -1464,7 +1462,7 @@ unexpected results. <dd class="todo" style="display: none; "> Undocumented. </dd> - <dd>The ID of the frame with sourceTabId in which the navigation is triggered. 0 indicates the main frame.</dd> + <dd>The ID of the tab in which the navigation is about to occur.</dd> <dd style="display: none; "> This parameter was added in version <b><span></span></b>. @@ -1529,10 +1527,12 @@ unexpected results. </em> </dt> - <dd class="todo" style="display: none; "> + <dd class="todo"> Undocumented. </dd> - <dd>The URL to be opened in the new window.</dd> + <dd style="display: none; "> + Description of this parameter from the json schema. + </dd> <dd style="display: none; "> This parameter was added in version <b><span></span></b>. @@ -1572,7 +1572,7 @@ unexpected results. </div><div> <div> <dt> - <var>tabId</var> + <var>frameId</var> <em> <!-- TYPE --> @@ -1600,7 +1600,7 @@ unexpected results. <dd class="todo" style="display: none; "> Undocumented. </dd> - <dd>The ID of the tab in which the url is opened</dd> + <dd>0 indicates the navigation happens in the tab content window; a positive value indicates navigation in a subframe. Frame IDs are unique within a tab.</dd> <dd style="display: none; "> This parameter was added in version <b><span></span></b>. @@ -1668,7 +1668,7 @@ unexpected results. <dd class="todo" style="display: none; "> Undocumented. </dd> - <dd>The time when the browser was about to create a new view, in milliseconds since the epoch.</dd> + <dd>The time when the browser was about to start the navigation, in milliseconds since the epoch.</dd> <dd style="display: none; "> This parameter was added in version <b><span></span></b>. diff --git a/chrome/common/extensions/docs/samples.html b/chrome/common/extensions/docs/samples.html index 495429c..1381d36 100644 --- a/chrome/common/extensions/docs/samples.html +++ b/chrome/common/extensions/docs/samples.html @@ -368,7 +368,7 @@ "230463f2d5c3d4d0ca13c230e1f00f2aae0a8a64": "TAB INSPECTOR UTILITY FOR WORKING WITH THE EXTENSION TABS API BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.ONCLICKED CHROME.EXTENSION.GETURL CHROME.TABS.CREATE CHROME.TABS.GET CHROME.TABS.GETALLINWINDOW CHROME.TABS.GETSELECTED CHROME.TABS.MOVE CHROME.TABS.ONATTACHED CHROME.TABS.ONCREATED CHROME.TABS.ONDETACHED CHROME.TABS.ONMOVED CHROME.TABS.ONREMOVED CHROME.TABS.ONSELECTIONCHANGED CHROME.TABS.ONUPDATED CHROME.TABS.REMOVE CHROME.TABS.UPDATE CHROME.WINDOWS.CREATE CHROME.WINDOWS.GET CHROME.WINDOWS.GETALL CHROME.WINDOWS.GETCURRENT CHROME.WINDOWS.GETLASTFOCUSED CHROME.WINDOWS.ONCREATED CHROME.WINDOWS.ONFOCUSCHANGED CHROME.WINDOWS.ONREMOVED CHROME.WINDOWS.REMOVE CHROME.WINDOWS.UPDATE", "e1697cacebad05218798bf3e8a0f724517f0e8c3": "TEST SCREENSHOT EXTENSION DEMONSTRATE SCREENSHOT FUNCTIONALITY IN THE CHROME.TABS API. NOTE: ONLY WORKS FOR CODE.GOOGLE.COM BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.ONCLICKED CHROME.EXTENSION.GETURL CHROME.EXTENSION.GETVIEWS CHROME.TABS.CAPTUREVISIBLETAB CHROME.TABS.CREATE CHROME.TABS.ONUPDATED", "b3de91ab04b7d7a2670ca7ee9d740eb42cead0b6": "TYPED URL HISTORY READS YOUR HISTORY, AND SHOWS THE TOP TEN PAGES YOU GO TO BY TYPING THE URL. BROWSER_ACTION HISTORY TABS CHROME.HISTORY.GETVISITS CHROME.HISTORY.SEARCH CHROME.TABS.CREATE", - "a3c674f7eb93621c590562ad3fa04de4f03f53a0": "WEBNAVIGATION TECH DEMO DEMONSTRATION OF THE WEBNAVIGATION EXTENSION API. BACKGROUND_PAGE BROWSER_ACTION EXPERIMENTAL EXTENSION POPUP WEBNAVIGATION CHROME.EXPERIMENTAL.WEBNAVIGATION.ONBEFORENAVIGATE CHROME.EXPERIMENTAL.WEBNAVIGATION.ONBEFORERETARGET CHROME.EXPERIMENTAL.WEBNAVIGATION.ONCOMMITTED CHROME.EXPERIMENTAL.WEBNAVIGATION.ONCOMPLETED CHROME.EXPERIMENTAL.WEBNAVIGATION.ONERROROCCURRED CHROME.EXTENSION.ONREQUEST CHROME.EXTENSION.SENDREQUEST CHROME.I18N.GETMESSAGE", + "a3c674f7eb93621c590562ad3fa04de4f03f53a0": "WEBNAVIGATION TECH DEMO DEMONSTRATION OF THE WEBNAVIGATION EXTENSION API. BACKGROUND_PAGE BROWSER_ACTION EXPERIMENTAL EXTENSION POPUP WEBNAVIGATION CHROME.EXPERIMENTAL.WEBNAVIGATION.ONBEFORECREATENAVIGATIONTARGET CHROME.EXPERIMENTAL.WEBNAVIGATION.ONBEFORENAVIGATE CHROME.EXPERIMENTAL.WEBNAVIGATION.ONCOMMITTED CHROME.EXPERIMENTAL.WEBNAVIGATION.ONCOMPLETED CHROME.EXPERIMENTAL.WEBNAVIGATION.ONERROROCCURRED CHROME.EXTENSION.ONREQUEST CHROME.EXTENSION.SENDREQUEST CHROME.I18N.GETMESSAGE", "0fa4abe6545f0316fea7cfa07c53aa48c4f3d018": "`EXTENSION.ISALLOWED???ACCESS` EXAMPLE DEMONSTRATES THE `EXTENSION.ISALLOWED???ACCESS` APIS BROWSER_ACTION CHROME.EXTENSION.ISALLOWEDFILESCHEMEACCESS CHROME.EXTENSION.ISALLOWEDINCOGNITOACCESS" }; </script> @@ -3401,9 +3401,9 @@ <div class="apicalls"><strong>Calls:</strong> <ul> <li> - <code><a href="experimental.webNavigation.html#event-onBeforeNavigate">chrome.experimental.webNavigation.onBeforeNavigate</a></code> + <code><a href="experimental.webNavigation.html#event-onBeforeCreateNavigationTarget">chrome.experimental.webNavigation.onBeforeCreateNavigationTarget</a></code> </li><li> - <code><a href="experimental.webNavigation.html#event-onBeforeRetarget">chrome.experimental.webNavigation.onBeforeRetarget</a></code> + <code><a href="experimental.webNavigation.html#event-onBeforeNavigate">chrome.experimental.webNavigation.onBeforeNavigate</a></code> </li><li> <code><a href="experimental.webNavigation.html#event-onCommitted">chrome.experimental.webNavigation.onCommitted</a></code> </li><li> diff --git a/chrome/common/extensions/docs/samples.json b/chrome/common/extensions/docs/samples.json index 23a88d8..602dc03 100644 --- a/chrome/common/extensions/docs/samples.json +++ b/chrome/common/extensions/docs/samples.json @@ -71,8 +71,8 @@ "chrome.experimental.settings.remove": "experimental.settings.html#method-remove", "chrome.experimental.settings.set": "experimental.settings.html#method-set", "chrome.experimental.webNavigation.getFrame": "experimental.webNavigation.html#method-getFrame", + "chrome.experimental.webNavigation.onBeforeCreateNavigationTarget": "experimental.webNavigation.html#event-onBeforeCreateNavigationTarget", "chrome.experimental.webNavigation.onBeforeNavigate": "experimental.webNavigation.html#event-onBeforeNavigate", - "chrome.experimental.webNavigation.onBeforeRetarget": "experimental.webNavigation.html#event-onBeforeRetarget", "chrome.experimental.webNavigation.onCommitted": "experimental.webNavigation.html#event-onCommitted", "chrome.experimental.webNavigation.onCompleted": "experimental.webNavigation.html#event-onCompleted", "chrome.experimental.webNavigation.onDOMContentLoaded": "experimental.webNavigation.html#event-onDOMContentLoaded", @@ -1893,8 +1893,8 @@ }, { "api_calls": [ + "chrome.experimental.webNavigation.onBeforeCreateNavigationTarget", "chrome.experimental.webNavigation.onBeforeNavigate", - "chrome.experimental.webNavigation.onBeforeRetarget", "chrome.experimental.webNavigation.onCommitted", "chrome.experimental.webNavigation.onCompleted", "chrome.experimental.webNavigation.onErrorOccurred", @@ -1916,7 +1916,7 @@ "name": "WebNavigation Tech Demo", "path": "examples\/api\/webNavigation\/basic\/", "protocols": [], - "search_string": "WEBNAVIGATION TECH DEMO DEMONSTRATION OF THE WEBNAVIGATION EXTENSION API. BACKGROUND_PAGE BROWSER_ACTION EXPERIMENTAL EXTENSION POPUP WEBNAVIGATION CHROME.EXPERIMENTAL.WEBNAVIGATION.ONBEFORENAVIGATE CHROME.EXPERIMENTAL.WEBNAVIGATION.ONBEFORERETARGET CHROME.EXPERIMENTAL.WEBNAVIGATION.ONCOMMITTED CHROME.EXPERIMENTAL.WEBNAVIGATION.ONCOMPLETED CHROME.EXPERIMENTAL.WEBNAVIGATION.ONERROROCCURRED CHROME.EXTENSION.ONREQUEST CHROME.EXTENSION.SENDREQUEST CHROME.I18N.GETMESSAGE", + "search_string": "WEBNAVIGATION TECH DEMO DEMONSTRATION OF THE WEBNAVIGATION EXTENSION API. BACKGROUND_PAGE BROWSER_ACTION EXPERIMENTAL EXTENSION POPUP WEBNAVIGATION CHROME.EXPERIMENTAL.WEBNAVIGATION.ONBEFORECREATENAVIGATIONTARGET CHROME.EXPERIMENTAL.WEBNAVIGATION.ONBEFORENAVIGATE CHROME.EXPERIMENTAL.WEBNAVIGATION.ONCOMMITTED CHROME.EXPERIMENTAL.WEBNAVIGATION.ONCOMPLETED CHROME.EXPERIMENTAL.WEBNAVIGATION.ONERROROCCURRED CHROME.EXTENSION.ONREQUEST CHROME.EXTENSION.SENDREQUEST CHROME.I18N.GETMESSAGE", "source_files": [ "_locales\/en\/messages.json", "background.html", @@ -1924,7 +1924,7 @@ "navigation_collector.js", "popup.html" ], - "source_hash": "34eab42d863313843fd491a468274fc2c208da05", + "source_hash": "7a5020bb7e6f9fc7e1403e422bf34cf62e753f6d", "zip_path": "examples\/api\/webNavigation\/basic.zip" }, { diff --git a/chrome/test/data/extensions/api_test/webnavigation/framework.js b/chrome/test/data/extensions/api_test/webnavigation/framework.js index 4b508a9..d3bdb10 100644 --- a/chrome/test/data/extensions/api_test/webnavigation/framework.js +++ b/chrome/test/data/extensions/api_test/webnavigation/framework.js @@ -86,9 +86,9 @@ function initListeners() { function(details) { captureEvent("onCompleted", details); }); - chrome.experimental.webNavigation.onBeforeRetarget.addListener( + chrome.experimental.webNavigation.onBeforeCreateNavigationTarget.addListener( function(details) { - captureEvent("onBeforeRetarget", details); + captureEvent("onBeforeCreateNavigationTarget", details); }); chrome.experimental.webNavigation.onErrorOccurred.addListener( function(details) { diff --git a/chrome/test/data/extensions/api_test/webnavigation/test_api.html b/chrome/test/data/extensions/api_test/webnavigation/test_api.html index 03c70a5..576e612 100644 --- a/chrome/test/data/extensions/api_test/webnavigation/test_api.html +++ b/chrome/test/data/extensions/api_test/webnavigation/test_api.html @@ -9,7 +9,7 @@ chrome.experimental.webNavigation.onCompleted.addListener( function(details) {}); chrome.experimental.webNavigation.onErrorOccurred.addListener( function(details) {}); -chrome.experimental.webNavigation.onBeforeRetarget.addListener( +chrome.experimental.webNavigation.onBeforeCreateNavigationTarget.addListener( function(details) {}); chrome.test.notifyPass(); </script> diff --git a/chrome/test/data/extensions/api_test/webnavigation/test_openTab.js b/chrome/test/data/extensions/api_test/webnavigation/test_openTab.js index 93d37e6..36a12fa 100644 --- a/chrome/test/data/extensions/api_test/webnavigation/test_openTab.js +++ b/chrome/test/data/extensions/api_test/webnavigation/test_openTab.js @@ -33,7 +33,7 @@ function runTests() { tabId: 0, timeStamp: 0, url: getURL('openTab/a.html') }], - [ "onBeforeRetarget", + [ "onBeforeCreateNavigationTarget", { sourceFrameId: 0, sourceTabId: 0, tabId: 1, @@ -111,7 +111,7 @@ function runTests() { tabId: 0, timeStamp: 0, url: getURL('openTab/c.html') }], - [ "onBeforeRetarget", + [ "onBeforeCreateNavigationTarget", { sourceFrameId: 1, sourceTabId: 0, tabId: 1, diff --git a/chrome/test/data/extensions/api_test/webnavigation/test_userAction.js b/chrome/test/data/extensions/api_test/webnavigation/test_userAction.js index 8dc5391..4927c63 100644 --- a/chrome/test/data/extensions/api_test/webnavigation/test_userAction.js +++ b/chrome/test/data/extensions/api_test/webnavigation/test_userAction.js @@ -33,7 +33,7 @@ function runTests() { tabId: 0, timeStamp: 0, url: getURL('userAction/a.html') }], - [ "onBeforeRetarget", + [ "onBeforeCreateNavigationTarget", { sourceFrameId: 0, sourceTabId: 0, tabId: 1, |