summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/common')
-rwxr-xr-xchrome/common/extensions/api/extension_api.json14
-rw-r--r--chrome/common/extensions/docs/api_index.html3
-rw-r--r--chrome/common/extensions/docs/api_other.html1
-rw-r--r--chrome/common/extensions/docs/autoupdate.html1
-rw-r--r--chrome/common/extensions/docs/background_pages.html1
-rw-r--r--chrome/common/extensions/docs/bookmarks.html1
-rw-r--r--chrome/common/extensions/docs/browserAction.html1
-rw-r--r--chrome/common/extensions/docs/content_scripts.html1
-rw-r--r--chrome/common/extensions/docs/devguide.html1
-rw-r--r--chrome/common/extensions/docs/docs.html1
-rw-r--r--chrome/common/extensions/docs/events.html1
-rw-r--r--chrome/common/extensions/docs/experimental.clipboard.html1
-rw-r--r--chrome/common/extensions/docs/experimental.contextMenu.html1
-rw-r--r--chrome/common/extensions/docs/experimental.html7
-rw-r--r--chrome/common/extensions/docs/experimental.infobars.html1
-rw-r--r--chrome/common/extensions/docs/experimental.processes.html1
-rw-r--r--chrome/common/extensions/docs/extension.html1
-rw-r--r--chrome/common/extensions/docs/external_extensions.html1
-rw-r--r--chrome/common/extensions/docs/faq.html1
-rw-r--r--chrome/common/extensions/docs/getstarted.html1
-rw-r--r--chrome/common/extensions/docs/history.html (renamed from chrome/common/extensions/docs/experimental.history.html)135
-rw-r--r--chrome/common/extensions/docs/hosting.html1
-rw-r--r--chrome/common/extensions/docs/i18n-messages.html1
-rw-r--r--chrome/common/extensions/docs/i18n.html1
-rw-r--r--chrome/common/extensions/docs/index.html1
-rw-r--r--chrome/common/extensions/docs/manifest.html1
-rw-r--r--chrome/common/extensions/docs/match_patterns.html1
-rw-r--r--chrome/common/extensions/docs/messaging.html1
-rw-r--r--chrome/common/extensions/docs/npapi.html1
-rw-r--r--chrome/common/extensions/docs/options.html1
-rw-r--r--chrome/common/extensions/docs/override.html43
-rw-r--r--chrome/common/extensions/docs/overview.html1
-rw-r--r--chrome/common/extensions/docs/packaging.html1
-rw-r--r--chrome/common/extensions/docs/pageAction.html1
-rw-r--r--chrome/common/extensions/docs/samples.html1
-rw-r--r--chrome/common/extensions/docs/static/experimental.html3
-rw-r--r--chrome/common/extensions/docs/static/history.html (renamed from chrome/common/extensions/docs/static/experimental.history.html)84
-rw-r--r--chrome/common/extensions/docs/static/override.html42
-rw-r--r--chrome/common/extensions/docs/tabs.html1
-rw-r--r--chrome/common/extensions/docs/template/api_template.html1
-rw-r--r--chrome/common/extensions/docs/themes.html1
-rw-r--r--chrome/common/extensions/docs/tut_analytics.html1
-rw-r--r--chrome/common/extensions/docs/tut_debugging.html1
-rw-r--r--chrome/common/extensions/docs/tut_oauth.html1
-rw-r--r--chrome/common/extensions/docs/tutorials.html1
-rw-r--r--chrome/common/extensions/docs/windows.html1
-rw-r--r--chrome/common/extensions/docs/xhr.html1
-rw-r--r--chrome/common/extensions/extension.cc17
-rw-r--r--chrome/common/extensions/extension.h1
-rw-r--r--chrome/common/extensions/extension_constants.cc2
-rw-r--r--chrome/common/extensions/extension_constants.h1
-rw-r--r--chrome/common/extensions/extension_manifests_unittest.cc18
-rw-r--r--chrome/common/page_transition_types.cc22
-rw-r--r--chrome/common/page_transition_types.h7
54 files changed, 282 insertions, 156 deletions
diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json
index 50d1491..f9a8b3b 100755
--- a/chrome/common/extensions/api/extension_api.json
+++ b/chrome/common/extensions/api/extension_api.json
@@ -1758,7 +1758,7 @@
]
},
{
- "namespace": "experimental.history",
+ "namespace": "history",
"types": [
{
"id": "HistoryItem",
@@ -1782,7 +1782,11 @@
"visitId": {"type": "string", "description": "The unique identifier for this visit."},
"visitTime": {"type": "number", "optional": true, "description": "When this visit occurred, represented in milliseconds since the epoch."},
"referringVisitId": {"type": "string", "description": "The visit_id of the referrer."},
- "transition": {"type": "integer", "minimum": 0, "maximum": 10, "description": "The <a href='#transition_types'>transition type</a> for this visit from its referrer."}
+ "transition": {
+ "type": "string",
+ "enum": ["link", "typed", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "start_page", "form_submit", "reload", "keyword", "keyword_generated"],
+ "description": "The <a href='#transition_types'>transition type</a> for this visit from its referrer."
+ }
}
}
],
@@ -1817,6 +1821,7 @@
"description": "Retrieve information about visits to a URL.",
"parameters": [
{
+ "name": "details",
"type": "object",
"properties": {
"url": {"type": "string", "description": "The URL for which to retrieve visit information. It must be in the format as returned from a call to history.search."}
@@ -1834,9 +1839,10 @@
{
"name": "addUrl",
"type": "function",
- "description": "Adds a URL to the history at the current time with a <a href='#transition_types'>transition type</a> of LINK.",
+ "description": "Adds a URL to the history at the current time with a <a href='#transition_types'>transition type</a> of \"link\".",
"parameters": [
{
+ "name": "details",
"type": "object",
"properties": {
"url": {"type": "string", "description": "The URL to add."}
@@ -1850,6 +1856,7 @@
"description": "Removes all occurrences of the given URL from the history.",
"parameters": [
{
+ "name": "details",
"type": "object",
"properties": {
"url": {"type": "string", "description": "The URL to remove."}
@@ -1863,6 +1870,7 @@
"description": "Removes all items within the specified date range from the history. Pages will not be removed from the history unless all visits fall within the range.",
"parameters": [
{
+ "name": "range",
"type": "object",
"properties": {
"startTime": { "type": "number", "description": "Items added to history after this date, represented in milliseconds since the epoch." },
diff --git a/chrome/common/extensions/docs/api_index.html b/chrome/common/extensions/docs/api_index.html
index effbedb..9b2a5f8 100644
--- a/chrome/common/extensions/docs/api_index.html
+++ b/chrome/common/extensions/docs/api_index.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
@@ -280,7 +281,7 @@ Here are the supported chrome.* APIs:
</p>
<ul>
- <li><a href="bookmarks.html" js="">bookmarks</a></li><li><a href="browserAction.html" js="">browserAction</a></li><li><a href="extension.html" js="">extension</a></li><li><a href="i18n.html" js="">i18n</a></li><li><a href="pageAction.html" js="">pageAction</a></li><li><a href="tabs.html" js="">tabs</a></li><li><a href="windows.html" js="">windows</a></li>
+ <li><a href="bookmarks.html" js="">bookmarks</a></li><li><a href="browserAction.html" js="">browserAction</a></li><li><a href="extension.html" js="">extension</a></li><li><a href="history.html" js="">history</a></li><li><a href="i18n.html" js="">i18n</a></li><li><a href="pageAction.html" js="">pageAction</a></li><li><a href="tabs.html" js="">tabs</a></li><li><a href="windows.html" js="">windows</a></li>
</ul>
<h2 id="experimental">Experimental APIs</h2>
diff --git a/chrome/common/extensions/docs/api_other.html b/chrome/common/extensions/docs/api_other.html
index 8681a86..55cf6ca 100644
--- a/chrome/common/extensions/docs/api_other.html
+++ b/chrome/common/extensions/docs/api_other.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/autoupdate.html b/chrome/common/extensions/docs/autoupdate.html
index 2544c2b..cee4da5 100644
--- a/chrome/common/extensions/docs/autoupdate.html
+++ b/chrome/common/extensions/docs/autoupdate.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/background_pages.html b/chrome/common/extensions/docs/background_pages.html
index 061d274..1522f26 100644
--- a/chrome/common/extensions/docs/background_pages.html
+++ b/chrome/common/extensions/docs/background_pages.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/bookmarks.html b/chrome/common/extensions/docs/bookmarks.html
index 6401670..011feeb 100644
--- a/chrome/common/extensions/docs/bookmarks.html
+++ b/chrome/common/extensions/docs/bookmarks.html
@@ -145,6 +145,7 @@
<ul>
<li class="leftNavSelected">Bookmarks</li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/browserAction.html b/chrome/common/extensions/docs/browserAction.html
index 16cddfa..f73c836 100644
--- a/chrome/common/extensions/docs/browserAction.html
+++ b/chrome/common/extensions/docs/browserAction.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/content_scripts.html b/chrome/common/extensions/docs/content_scripts.html
index 04ab106..8796370 100644
--- a/chrome/common/extensions/docs/content_scripts.html
+++ b/chrome/common/extensions/docs/content_scripts.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/devguide.html b/chrome/common/extensions/docs/devguide.html
index ad58f84..43fd3fc 100644
--- a/chrome/common/extensions/docs/devguide.html
+++ b/chrome/common/extensions/docs/devguide.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/docs.html b/chrome/common/extensions/docs/docs.html
index a630af4..ffb51c3 100644
--- a/chrome/common/extensions/docs/docs.html
+++ b/chrome/common/extensions/docs/docs.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/events.html b/chrome/common/extensions/docs/events.html
index da852b9..0d9df92 100644
--- a/chrome/common/extensions/docs/events.html
+++ b/chrome/common/extensions/docs/events.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li class="leftNavSelected">Events</li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/experimental.clipboard.html b/chrome/common/extensions/docs/experimental.clipboard.html
index 303c711..cca046e 100644
--- a/chrome/common/extensions/docs/experimental.clipboard.html
+++ b/chrome/common/extensions/docs/experimental.clipboard.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/experimental.contextMenu.html b/chrome/common/extensions/docs/experimental.contextMenu.html
index 3599eb3..ad5793a 100644
--- a/chrome/common/extensions/docs/experimental.contextMenu.html
+++ b/chrome/common/extensions/docs/experimental.contextMenu.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/experimental.html b/chrome/common/extensions/docs/experimental.html
index 354a741..8b52636 100644
--- a/chrome/common/extensions/docs/experimental.html
+++ b/chrome/common/extensions/docs/experimental.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
@@ -258,7 +259,11 @@ on the following experimental APIs:
</p>
<ul>
- <li><a href="experimental.clipboard.html" js="">experimental.clipboard</a></li><li><a href="experimental.contextMenu.html" js="">experimental.contextMenu</a></li><li><a href="experimental.history.html" js="">experimental.history</a></li><li><a href="experimental.infobars.html" js="">experimental.infobars</a></li><li><a href="experimental.processes.html" js="">experimental.processes</a></li>
+ <li>
+ <a href="experimental.clipboard.html">experimental.clipboard</a></li><li>
+ <a href="experimental.contextMenu.html">experimental.contextMenu</a></li><li>
+ <a href="experimental.infobars.html">experimental.infobars</a></li><li>
+ <a href="experimental.processes.html">experimental.processes</a></li>
</ul>
<p class="caution">
diff --git a/chrome/common/extensions/docs/experimental.infobars.html b/chrome/common/extensions/docs/experimental.infobars.html
index a15eb83..db8a82c 100644
--- a/chrome/common/extensions/docs/experimental.infobars.html
+++ b/chrome/common/extensions/docs/experimental.infobars.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/experimental.processes.html b/chrome/common/extensions/docs/experimental.processes.html
index ec63518..226ea0d 100644
--- a/chrome/common/extensions/docs/experimental.processes.html
+++ b/chrome/common/extensions/docs/experimental.processes.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/extension.html b/chrome/common/extensions/docs/extension.html
index f4ba4dd..113b81a 100644
--- a/chrome/common/extensions/docs/extension.html
+++ b/chrome/common/extensions/docs/extension.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/external_extensions.html b/chrome/common/extensions/docs/external_extensions.html
index 57dc10d..ce832c3 100644
--- a/chrome/common/extensions/docs/external_extensions.html
+++ b/chrome/common/extensions/docs/external_extensions.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/faq.html b/chrome/common/extensions/docs/faq.html
index 7c5a86d..a76fd86 100644
--- a/chrome/common/extensions/docs/faq.html
+++ b/chrome/common/extensions/docs/faq.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/getstarted.html b/chrome/common/extensions/docs/getstarted.html
index 0ab221c..769a212 100644
--- a/chrome/common/extensions/docs/getstarted.html
+++ b/chrome/common/extensions/docs/getstarted.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/experimental.history.html b/chrome/common/extensions/docs/history.html
index 85a2397..be98deb 100644
--- a/chrome/common/extensions/docs/experimental.history.html
+++ b/chrome/common/extensions/docs/history.html
@@ -15,7 +15,7 @@
</script>
<script type="text/javascript" src="js/api_page_generator.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
- <title>chrome.experimental.history - Google Chrome Extensions - Google Code</title></head><body> <div id="gc-container" class="labs">
+ <title>chrome.history - Google Chrome Extensions - Google Code</title></head><body> <div id="gc-container" class="labs">
<div id="devModeWarning">
You are viewing extension docs in chrome via the 'file:' scheme: are you expecting to see local changes when you refresh? You'll need run chrome with --allow-file-access-from-files.
</div>
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li class="leftNavSelected">History</li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
@@ -194,7 +195,7 @@
<div class="g-unit" id="gc-pagecontent">
<div id="pageTitle">
- <h1 class="page_title">chrome.experimental.history</h1>
+ <h1 class="page_title">chrome.history</h1>
</div>
<!-- TABLE OF CONTENTS -->
<div id="toc">
@@ -216,7 +217,7 @@
</ol>
</li>
<li>
- <a href="#apiReference">API reference: chrome.experimental.history</a>
+ <a href="#apiReference">API reference: chrome.history</a>
<ol>
<li style="display: none; ">
<a href="#properties">Properties</a>
@@ -273,8 +274,13 @@
<!-- STATIC CONTENT PLACEHOLDER -->
<div id="static"><!-- BEGIN AUTHORED CONTENT -->
<p id="classSummary">
-For information on how to use experimental APIs,
-see the <a href="experimental.html">chrome.experimental.* APIs</a> page.
+Use the <code>chrome.history</code> module to interact with the
+browser's record of visited pages. You can add, remove, and query
+for URLs in the browser's history.
+
+To override the history page with your own version, see
+<a href="override.html">Override Pages</a>.
+
</p>
<h2 id="transition_types">Transition types</h2>
@@ -285,55 +291,42 @@ how the browser navigated to a particular URL
on a particular visit.
For example, if a user visits a page
by clicking a link on another page,
-the transition type is LINK.
-To be precise,
-the type is
-<a href="#LINK"><code>chrome.experimental.history.transitionType.LINK</code></a>,
-which has an integer value of 0.
-</p>
-
-<p class="note">
-<b>Note:</b>
-The spelling of
-<code>transitionType</code> changed in
-<a href="http://src.chromium.org/viewvc/chrome?view=rev&amp;revision=38850">revision 38850</a>.
-Previously, it was <code>transistionType</code>.
+the transition type is "link".
</p>
<p>
-The following table describes each transition type defined by
-<code>chrome.experimental.history.transitionType</code>.
+The following table describes each transition type.
</p>
<table>
<tbody><tr>
- <th> Transition type </th> <th> Value </th> <th> Description </th>
+ <th> Transition type </th> <th> Description </th>
</tr>
-<tr id="LINK">
- <td>LINK</td> <td>0</td>
+<tr id="tt_link">
+ <td>"link"</td>
<td>
The user got to this page by clicking a link on another page.
</td>
</tr>
-<tr id="TYPED">
- <td>TYPED</td> <td>1</td>
+<tr id="tt_typed">
+ <td>"typed"</td>
<td>
The user got this page by typing the URL in the address bar.
Also used for other explicit navigation actions.
- See also <a href="#GENERATED">GENERATED</a>,
+ See also <a href="#tt_generated">generated</a>,
which is used for cases where the user selected a choice
that didn't look at all like a URL.
</td>
</tr>
-<tr id="AUTO_BOOKMARK">
- <td>AUTO_BOOKMARK</td><td>2</td>
+<tr id="tt_auto_bookmark">
+ <td>"auto_bookmark"</td>
<td>
The user got to this page through a suggestion in the UI —
for example, through a menu item.
</td>
</tr>
-<tr id="AUTO_SUBFRAME">
- <td>AUTO_SUBFRAME</td><td>3</td>
+<tr id="tt_auto_subframe">
+ <td>"auto_subframe"</td>
<td>
Subframe navigation.
This is any content that is automatically
@@ -343,11 +336,11 @@ The following table describes each transition type defined by
those ad URLs have this transition type.
The user may not even realize the content in these pages
is a separate frame, and so may not care about the URL
- (see also <a href="#MANUAL_SUBFRAME">MANUAL_SUBFRAME</a>).
+ (see also <a href="#tt_manual_subframe">manual_subframe</a>).
</td>
</tr>
-<tr id="MANUAL_SUBFRAME">
- <td>MANUAL_SUBFRAME</td><td>4</td>
+<tr id="tt_manual_subframe">
+ <td>"manual_subframe"</td>
<td>
For subframe navigations that are explicitly requested by the user
and generate new navigation entries in the back/forward list.
@@ -357,26 +350,26 @@ The following table describes each transition type defined by
the requested frame was loaded.
</td>
</tr>
-<tr id="GENERATED">
- <td>GENERATED</td><td>5</td>
+<tr id="tt_generated">
+ <td>"generated"</td>
<td>
The user got to this page by typing in the address bar
and selecting an entry that did not look like a URL.
For example, a match might have the URL of a Google search result page,
but it might appear to the user as "Search Google for ...".
- These are not quite the same as <a href="#TYPED">TYPED</a> navigations
+ These are not quite the same as <a href="#tt_typed">typed</a> navigations
because the user didn't type or see the destination URL.
- See also <a href="#KEYWORD">KEYWORD</a>.
+ See also <a href="#tt_keyword">keyword</a>.
</td>
</tr>
-<tr id="START_PAGE">
- <td>START_PAGE</td><td>6</td>
+<tr id="tt_start_page">
+ <td>"start_page"</td>
<td>
The page was specified in the command line or is the start page.
</td>
</tr>
-<tr id="FORM_SUBMIT">
- <td>FORM_SUBMIT</td><td>7</td>
+<tr id="tt_form_submit">
+ <td>"form_submit"</td>
<td>
The user filled out values in a form and submitted it.
Note that in some situations —
@@ -384,8 +377,8 @@ The following table describes each transition type defined by
submitting a form does not result in this transition type.
</td>
</tr>
-<tr id="RELOAD">
- <td>RELOAD</td><td>8</td>
+<tr id="tt_reload">
+ <td>"reload"</td>
<td>
The user reloaded the page,
either by clicking the reload button
@@ -393,20 +386,20 @@ The following table describes each transition type defined by
Session restore and Reopen closed tab use this transition type, too.
</td>
</tr>
-<tr id="KEYWORD">
- <td>KEYWORD</td><td>9</td>
+<tr id="tt_keyword">
+ <td>"keyword"</td>
<td>
The URL was generated from a replaceable keyword
other than the default search provider.
See also
- <a href="#KEYWORD_GENERATED">KEYWORD_GENERATED</a>.
+ <a href="#tt_keyword_generated">keyword_generated</a>.
</td>
</tr>
-<tr id="KEYWORD_GENERATED">
- <td>KEYWORD_GENERATED</td><td>10</td>
+<tr id="tt_keyword_generated">
+ <td>"keyword_generated"</td>
<td>
Corresponds to a visit generated for a keyword.
- See also <a href="#KEYWORD">KEYWORD</a>.
+ See also <a href="#tt_keyword">keyword</a>.
</td>
</tr>
</tbody></table>
@@ -424,7 +417,7 @@ For an example of using this API, see the
<!-- API PAGE -->
<div class="apiPage">
<a name="apiReference"></a>
- <h2>API reference: chrome.experimental.history</h2>
+ <h2>API reference: chrome.history</h2>
<!-- PROPERTIES -->
<div class="apiGroup" style="display: none; ">
@@ -456,12 +449,12 @@ For an example of using this API, see the
<div class="summary"><span style="display: none; ">void</span>
<!-- Note: intentionally longer 80 columns -->
- <span>chrome.experimental.history.addUrl</span>(<span class="null"><span style="display: none; ">, </span><span>object</span>
- <var><span>undefined</span></var></span>)</div>
+ <span>chrome.history.addUrl</span>(<span class="null"><span style="display: none; ">, </span><span>object</span>
+ <var><span>details</span></var></span>)</div>
<div class="description">
<p class="todo" style="display: none; ">Undocumented.</p>
- <p>Adds a URL to the history at the current time with a <a href="#transition_types">transition type</a> of LINK.</p>
+ <p>Adds a URL to the history at the current time with a <a href="#transition_types">transition type</a> of "link".</p>
<!-- PARAMETERS -->
<h4>Parameters</h4>
@@ -469,7 +462,7 @@ For an example of using this API, see the
<div>
<div>
<dt>
- <var style="display: none; ">paramName</var>
+ <var>details</var>
<em>
<!-- TYPE -->
@@ -591,7 +584,7 @@ For an example of using this API, see the
<div class="summary"><span style="display: none; ">void</span>
<!-- Note: intentionally longer 80 columns -->
- <span>chrome.experimental.history.deleteAll</span>(<span class="null"><span style="display: none; ">, </span><span>function</span>
+ <span>chrome.history.deleteAll</span>(<span class="null"><span style="display: none; ">, </span><span>function</span>
<var><span>callback</span></var></span>)</div>
<div class="description">
@@ -688,8 +681,8 @@ For an example of using this API, see the
<div class="summary"><span style="display: none; ">void</span>
<!-- Note: intentionally longer 80 columns -->
- <span>chrome.experimental.history.deleteRange</span>(<span class="null"><span style="display: none; ">, </span><span>object</span>
- <var><span>undefined</span></var></span><span class="null"><span>, </span><span>function</span>
+ <span>chrome.history.deleteRange</span>(<span class="null"><span style="display: none; ">, </span><span>object</span>
+ <var><span>range</span></var></span><span class="null"><span>, </span><span>function</span>
<var><span>callback</span></var></span>)</div>
<div class="description">
@@ -702,7 +695,7 @@ For an example of using this API, see the
<div>
<div>
<dt>
- <var style="display: none; ">paramName</var>
+ <var>range</var>
<em>
<!-- TYPE -->
@@ -908,8 +901,8 @@ For an example of using this API, see the
<div class="summary"><span style="display: none; ">void</span>
<!-- Note: intentionally longer 80 columns -->
- <span>chrome.experimental.history.deleteUrl</span>(<span class="null"><span style="display: none; ">, </span><span>object</span>
- <var><span>undefined</span></var></span>)</div>
+ <span>chrome.history.deleteUrl</span>(<span class="null"><span style="display: none; ">, </span><span>object</span>
+ <var><span>details</span></var></span>)</div>
<div class="description">
<p class="todo" style="display: none; ">Undocumented.</p>
@@ -921,7 +914,7 @@ For an example of using this API, see the
<div>
<div>
<dt>
- <var style="display: none; ">paramName</var>
+ <var>details</var>
<em>
<!-- TYPE -->
@@ -1043,8 +1036,8 @@ For an example of using this API, see the
<div class="summary"><span style="display: none; ">void</span>
<!-- Note: intentionally longer 80 columns -->
- <span>chrome.experimental.history.getVisits</span>(<span class="null"><span style="display: none; ">, </span><span>object</span>
- <var><span>undefined</span></var></span><span class="null"><span>, </span><span>function</span>
+ <span>chrome.history.getVisits</span>(<span class="null"><span style="display: none; ">, </span><span>object</span>
+ <var><span>details</span></var></span><span class="null"><span>, </span><span>function</span>
<var><span>callback</span></var></span>)</div>
<div class="description">
@@ -1057,7 +1050,7 @@ For an example of using this API, see the
<div>
<div>
<dt>
- <var style="display: none; ">paramName</var>
+ <var>details</var>
<em>
<!-- TYPE -->
@@ -1224,7 +1217,7 @@ For an example of using this API, see the
<span>
array of <span><span>
<span>
- <a href="experimental.history.html#type-VisitItem">VisitItem</a>
+ <a href="history.html#type-VisitItem">VisitItem</a>
</span>
<span style="display: none; ">
<span>
@@ -1272,7 +1265,7 @@ For an example of using this API, see the
<div class="summary"><span style="display: none; ">void</span>
<!-- Note: intentionally longer 80 columns -->
- <span>chrome.experimental.history.search</span>(<span class="null"><span style="display: none; ">, </span><span>object</span>
+ <span>chrome.history.search</span>(<span class="null"><span style="display: none; ">, </span><span>object</span>
<var><span>query</span></var></span><span class="null"><span>, </span><span>function</span>
<var><span>callback</span></var></span>)</div>
@@ -1576,7 +1569,7 @@ For an example of using this API, see the
<span>
array of <span><span>
<span>
- <a href="experimental.history.html#type-HistoryItem">HistoryItem</a>
+ <a href="history.html#type-HistoryItem">HistoryItem</a>
</span>
<span style="display: none; ">
<span>
@@ -1634,7 +1627,7 @@ For an example of using this API, see the
<div class="summary">
<!-- Note: intentionally longer 80 columns -->
- <span class="subdued">chrome.experimental.history.</span><span>onVisitRemoved</span><span class="subdued">.addListener</span>(function(<span>object removed</span>) <span class="subdued">{...}</span>);
+ <span class="subdued">chrome.history.</span><span>onVisitRemoved</span><span class="subdued">.addListener</span>(function(<span>object removed</span>) <span class="subdued">{...}</span>);
</div>
<div class="description">
@@ -1789,7 +1782,7 @@ For an example of using this API, see the
<div class="summary">
<!-- Note: intentionally longer 80 columns -->
- <span class="subdued">chrome.experimental.history.</span><span>onVisited</span><span class="subdued">.addListener</span>(function(<span>HistoryItem result</span>) <span class="subdued">{...}</span>);
+ <span class="subdued">chrome.history.</span><span>onVisited</span><span class="subdued">.addListener</span>(function(<span>HistoryItem result</span>) <span class="subdued">{...}</span>);
</div>
<div class="description">
@@ -1811,7 +1804,7 @@ For an example of using this API, see the
<span class="optional" style="display: none; ">optional</span>
<span id="typeTemplate">
<span>
- <a href="experimental.history.html#type-HistoryItem">HistoryItem</a>
+ <a href="history.html#type-HistoryItem">HistoryItem</a>
</span>
<span style="display: none; ">
<span>
@@ -2076,7 +2069,7 @@ For an example of using this API, see the
<span style="display: none; ">
array of <span><span></span></span>
</span>
- <span>integer</span>
+ <span>string</span>
</span>
</span>
)
diff --git a/chrome/common/extensions/docs/hosting.html b/chrome/common/extensions/docs/hosting.html
index 1bba11a..1095b26 100644
--- a/chrome/common/extensions/docs/hosting.html
+++ b/chrome/common/extensions/docs/hosting.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/i18n-messages.html b/chrome/common/extensions/docs/i18n-messages.html
index d997dd2..4b2ce47 100644
--- a/chrome/common/extensions/docs/i18n-messages.html
+++ b/chrome/common/extensions/docs/i18n-messages.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/i18n.html b/chrome/common/extensions/docs/i18n.html
index af0377f..7d91741 100644
--- a/chrome/common/extensions/docs/i18n.html
+++ b/chrome/common/extensions/docs/i18n.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/index.html b/chrome/common/extensions/docs/index.html
index 58a2be9..ee90ab4 100644
--- a/chrome/common/extensions/docs/index.html
+++ b/chrome/common/extensions/docs/index.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/manifest.html b/chrome/common/extensions/docs/manifest.html
index 8b0de00..130c1a2 100644
--- a/chrome/common/extensions/docs/manifest.html
+++ b/chrome/common/extensions/docs/manifest.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/match_patterns.html b/chrome/common/extensions/docs/match_patterns.html
index e3d5116..05f772e 100644
--- a/chrome/common/extensions/docs/match_patterns.html
+++ b/chrome/common/extensions/docs/match_patterns.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/messaging.html b/chrome/common/extensions/docs/messaging.html
index e15dcdf..1ae04b4 100644
--- a/chrome/common/extensions/docs/messaging.html
+++ b/chrome/common/extensions/docs/messaging.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/npapi.html b/chrome/common/extensions/docs/npapi.html
index ca10265..4717629 100644
--- a/chrome/common/extensions/docs/npapi.html
+++ b/chrome/common/extensions/docs/npapi.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/options.html b/chrome/common/extensions/docs/options.html
index 6b2921b..f473d4b 100644
--- a/chrome/common/extensions/docs/options.html
+++ b/chrome/common/extensions/docs/options.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/override.html b/chrome/common/extensions/docs/override.html
index 1aba705..e6dd31b 100644
--- a/chrome/common/extensions/docs/override.html
+++ b/chrome/common/extensions/docs/override.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
@@ -292,16 +293,20 @@ Override pages are a way to replace a page
that Google Chrome provides
with an HTML file that your extension provides.
An override page usually has CSS and JavaScript code,
-in addition to HTML.
+in addition to HTML. A single extension can only override
+one page.
</p>
<p>
-Currently, the only page you can replace is
-the <em>New Tab page</em> —
-the page that appears
-when the user creates a new tab or window.
-</p>
+Currently, extensions can replace two pages:
+</p><ul>
+ <li> The <em>New Tab page</em> —
+ the page that appears when the user creates a new tab or window.</li>
+ <li> The <em>History page</em> —
+ the page that appears when the user selects the 'History' menu item.</li>
+</ul>
+<p></p>
<table id="pics">
<tbody><tr>
<td> <b>The default New Tab page</b> </td>
@@ -317,13 +322,12 @@ when the user creates a new tab or window.
</tr>
</tbody></table>
-
<h2 id="manifest">Manifest</h2>
<p>
-Register your New Tab page in the
+Register override pages in the
<a href="manifest.html">extension manifest</a>
-like this:
+using property <code>chrome_url_overrides</code>. For example, the new tabs page can be overridden like this:
</p>
<pre>{
@@ -335,18 +339,31 @@ like this:
...
}</pre>
+You can override the history page like this:
+
+<pre>{
+ "name": "My extension",
+ ...
+ <b>"chrome_url_overrides": {
+ "history": "history.html"
+ }</b>,
+ ...
+}</pre>
+
+A single extension may only override one page.
+
<h2 id="tips">Tips</h2>
<p>
-For an effective New Tab page, follow these guidelines:
+For an effective override pages, follow these guidelines:
</p>
<ul>
<li>
<p>
<b>Make your page quick and small.</b> <br>
- Because the New Tab page appears often,
- its performance is important.
+ Users expect built in browser pages to open instantly. Avoid doing things that
+ may take a long time.
For example, avoid synchronous fetches of network or database resources.
</p>
</li>
@@ -368,7 +385,7 @@ For an effective New Tab page, follow these guidelines:
</li>
<li>
<p>
- <b>Don't try to emulate the default New Tab page.</b> <br>
+ <b>Don't try to emulate the default pages.</b> <br>
The APIs necessary to create
a slightly modified version of the default New Tab page —
with top pages,
diff --git a/chrome/common/extensions/docs/overview.html b/chrome/common/extensions/docs/overview.html
index f58dea7..d3e896b 100644
--- a/chrome/common/extensions/docs/overview.html
+++ b/chrome/common/extensions/docs/overview.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/packaging.html b/chrome/common/extensions/docs/packaging.html
index bd2259d..d1608fb 100644
--- a/chrome/common/extensions/docs/packaging.html
+++ b/chrome/common/extensions/docs/packaging.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/pageAction.html b/chrome/common/extensions/docs/pageAction.html
index 10f4b21..269b299 100644
--- a/chrome/common/extensions/docs/pageAction.html
+++ b/chrome/common/extensions/docs/pageAction.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/samples.html b/chrome/common/extensions/docs/samples.html
index c21cac9..65edd5d 100644
--- a/chrome/common/extensions/docs/samples.html
+++ b/chrome/common/extensions/docs/samples.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/static/experimental.html b/chrome/common/extensions/docs/static/experimental.html
index 46df0f2..d36ffbe 100644
--- a/chrome/common/extensions/docs/static/experimental.html
+++ b/chrome/common/extensions/docs/static/experimental.html
@@ -6,7 +6,8 @@ on the following experimental APIs:
</p>
<ul>
- <li jsselect="experimentalAPIs();"><a jsvalues=".href: $this + '.html'" jscontent="$this" href="experimental.history.html" js>experimental.history</a></li>
+ <li jsselect="experimentalAPIs();">
+ <a jsvalues=".href: $this + '.html'" jscontent="$this"></a></li>
</ul>
<p class="caution">
diff --git a/chrome/common/extensions/docs/static/experimental.history.html b/chrome/common/extensions/docs/static/history.html
index 3a968b6..65db709 100644
--- a/chrome/common/extensions/docs/static/experimental.history.html
+++ b/chrome/common/extensions/docs/static/history.html
@@ -1,7 +1,12 @@
<!-- BEGIN AUTHORED CONTENT -->
<p id="classSummary">
-For information on how to use experimental APIs,
-see the <a href="experimental.html">chrome.experimental.* APIs</a> page.
+Use the <code>chrome.history</code> module to interact with the
+browser's record of visited pages. You can add, remove, and query
+for URLs in the browser's history.
+
+To override the history page with your own version, see
+<a href="override.html">Override Pages</a>.
+
</p>
<h2 id="transition_types">Transition types</h2>
@@ -12,55 +17,42 @@ how the browser navigated to a particular URL
on a particular visit.
For example, if a user visits a page
by clicking a link on another page,
-the transition type is LINK.
-To be precise,
-the type is
-<a href="#LINK"><code>chrome.experimental.history.transitionType.LINK</code></a>,
-which has an integer value of 0.
-</p>
-
-<p class="note">
-<b>Note:</b>
-The spelling of
-<code>transitionType</code> changed in
-<a href="http://src.chromium.org/viewvc/chrome?view=rev&revision=38850">revision 38850</a>.
-Previously, it was <code>transistionType</code>.
+the transition type is "link".
</p>
<p>
-The following table describes each transition type defined by
-<code>chrome.experimental.history.transitionType</code>.
+The following table describes each transition type.
</p>
<table>
<tr>
- <th> Transition type </th> <th> Value </th> <th> Description </th>
+ <th> Transition type </th> <th> Description </th>
</tr>
-<tr id="LINK">
- <td>LINK</td> <td>0</td>
+<tr id="tt_link">
+ <td>"link"</td>
<td>
The user got to this page by clicking a link on another page.
</td>
</tr>
-<tr id="TYPED">
- <td>TYPED</td> <td>1</td>
+<tr id="tt_typed">
+ <td>"typed"</td>
<td>
The user got this page by typing the URL in the address bar.
Also used for other explicit navigation actions.
- See also <a href="#GENERATED">GENERATED</a>,
+ See also <a href="#tt_generated">generated</a>,
which is used for cases where the user selected a choice
that didn't look at all like a URL.
</td>
</tr>
-<tr id="AUTO_BOOKMARK">
- <td>AUTO_BOOKMARK</td><td>2</td>
+<tr id="tt_auto_bookmark">
+ <td>"auto_bookmark"</td>
<td>
The user got to this page through a suggestion in the UI &mdash;
for example, through a menu item.
</td>
</tr>
-<tr id="AUTO_SUBFRAME">
- <td>AUTO_SUBFRAME</td><td>3</td>
+<tr id="tt_auto_subframe">
+ <td>"auto_subframe"</td>
<td>
Subframe navigation.
This is any content that is automatically
@@ -70,11 +62,11 @@ The following table describes each transition type defined by
those ad URLs have this transition type.
The user may not even realize the content in these pages
is a separate frame, and so may not care about the URL
- (see also <a href="#MANUAL_SUBFRAME">MANUAL_SUBFRAME</a>).
+ (see also <a href="#tt_manual_subframe">manual_subframe</a>).
</td>
</tr>
-<tr id="MANUAL_SUBFRAME">
- <td>MANUAL_SUBFRAME</td><td>4</td>
+<tr id="tt_manual_subframe">
+ <td>"manual_subframe"</td>
<td>
For subframe navigations that are explicitly requested by the user
and generate new navigation entries in the back/forward list.
@@ -84,26 +76,26 @@ The following table describes each transition type defined by
the requested frame was loaded.
</td>
</tr>
-<tr id="GENERATED">
- <td>GENERATED</td><td>5</td>
+<tr id="tt_generated">
+ <td>"generated"</td>
<td>
The user got to this page by typing in the address bar
and selecting an entry that did not look like a URL.
For example, a match might have the URL of a Google search result page,
but it might appear to the user as "Search Google for ...".
- These are not quite the same as <a href="#TYPED">TYPED</a> navigations
+ These are not quite the same as <a href="#tt_typed">typed</a> navigations
because the user didn't type or see the destination URL.
- See also <a href="#KEYWORD">KEYWORD</a>.
+ See also <a href="#tt_keyword">keyword</a>.
</td>
</tr>
-<tr id="START_PAGE">
- <td>START_PAGE</td><td>6</td>
+<tr id="tt_start_page">
+ <td>"start_page"</td>
<td>
The page was specified in the command line or is the start page.
</td>
</tr>
-<tr id="FORM_SUBMIT">
- <td>FORM_SUBMIT</td><td>7</td>
+<tr id="tt_form_submit">
+ <td>"form_submit"</td>
<td>
The user filled out values in a form and submitted it.
Note that in some situations &mdash;
@@ -111,8 +103,8 @@ The following table describes each transition type defined by
submitting a form does not result in this transition type.
</td>
</tr>
-<tr id="RELOAD">
- <td>RELOAD</td><td>8</td>
+<tr id="tt_reload">
+ <td>"reload"</td>
<td>
The user reloaded the page,
either by clicking the reload button
@@ -120,20 +112,20 @@ The following table describes each transition type defined by
Session restore and Reopen closed tab use this transition type, too.
</td>
</tr>
-<tr id="KEYWORD">
- <td>KEYWORD</td><td>9</td>
+<tr id="tt_keyword">
+ <td>"keyword"</td>
<td>
The URL was generated from a replaceable keyword
other than the default search provider.
See also
- <a href="#KEYWORD_GENERATED">KEYWORD_GENERATED</a>.
+ <a href="#tt_keyword_generated">keyword_generated</a>.
</td>
</tr>
-<tr id="KEYWORD_GENERATED">
- <td>KEYWORD_GENERATED</td><td>10</td>
+<tr id="tt_keyword_generated">
+ <td>"keyword_generated"</td>
<td>
Corresponds to a visit generated for a keyword.
- See also <a href="#KEYWORD">KEYWORD</a>.
+ See also <a href="#tt_keyword">keyword</a>.
</td>
</tr>
</table>
diff --git a/chrome/common/extensions/docs/static/override.html b/chrome/common/extensions/docs/static/override.html
index 96b6897..53de45c 100644
--- a/chrome/common/extensions/docs/static/override.html
+++ b/chrome/common/extensions/docs/static/override.html
@@ -26,16 +26,20 @@ Override pages are a way to replace a page
that Google Chrome provides
with an HTML file that your extension provides.
An override page usually has CSS and JavaScript code,
-in addition to HTML.
+in addition to HTML. A single extension can only override
+one page.
</p>
<p>
-Currently, the only page you can replace is
-the <em>New Tab page</em> &mdash;
-the page that appears
-when the user creates a new tab or window.
-</p>
+Currently, extensions can replace two pages:
+<ul>
+ <li> The <em>New Tab page</em> &mdash;
+ the page that appears when the user creates a new tab or window.</li>
+ <li> The <em>History page</em> &mdash;
+ the page that appears when the user selects the 'History' menu item.</li>
+</ul>
+</p>
<table id="pics">
<tr>
<td> <b>The default New Tab page</b> </td>
@@ -55,13 +59,12 @@ when the user creates a new tab or window.
</tr>
</table>
-
<h2 id="manifest">Manifest</h2>
<p>
-Register your New Tab page in the
+Register override pages in the
<a href="manifest.html">extension manifest</a>
-like this:
+using property <code>chrome_url_overrides</code>. For example, the new tabs page can be overridden like this:
</p>
<pre>{
@@ -73,18 +76,31 @@ like this:
...
}</pre>
+You can override the history page like this:
+
+<pre>{
+ "name": "My extension",
+ ...
+ <b>"chrome_url_overrides": {
+ "history": "history.html"
+ }</b>,
+ ...
+}</pre>
+
+A single extension may only override one page.
+
<h2 id="tips">Tips</h2>
<p>
-For an effective New Tab page, follow these guidelines:
+For an effective override pages, follow these guidelines:
</p>
<ul>
<li>
<p>
<b>Make your page quick and small.</b> <br />
- Because the New Tab page appears often,
- its performance is important.
+ Users expect built in browser pages to open instantly. Avoid doing things that
+ may take a long time.
For example, avoid synchronous fetches of network or database resources.
</p>
</li>
@@ -106,7 +122,7 @@ For an effective New Tab page, follow these guidelines:
</li>
<li>
<p>
- <b>Don't try to emulate the default New Tab page.</b> <br />
+ <b>Don't try to emulate the default pages.</b> <br />
The APIs necessary to create
a slightly modified version of the default New Tab page &mdash;
with top pages,
diff --git a/chrome/common/extensions/docs/tabs.html b/chrome/common/extensions/docs/tabs.html
index e54d4c6..fa722bc 100644
--- a/chrome/common/extensions/docs/tabs.html
+++ b/chrome/common/extensions/docs/tabs.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li class="leftNavSelected">Tabs</li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/template/api_template.html b/chrome/common/extensions/docs/template/api_template.html
index c90dde5..a00ab02 100644
--- a/chrome/common/extensions/docs/template/api_template.html
+++ b/chrome/common/extensions/docs/template/api_template.html
@@ -132,6 +132,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/themes.html b/chrome/common/extensions/docs/themes.html
index acf558d..0c90700 100644
--- a/chrome/common/extensions/docs/themes.html
+++ b/chrome/common/extensions/docs/themes.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/tut_analytics.html b/chrome/common/extensions/docs/tut_analytics.html
index ed08c41..3baa8a4 100644
--- a/chrome/common/extensions/docs/tut_analytics.html
+++ b/chrome/common/extensions/docs/tut_analytics.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/tut_debugging.html b/chrome/common/extensions/docs/tut_debugging.html
index 1a30310..ebd33c5 100644
--- a/chrome/common/extensions/docs/tut_debugging.html
+++ b/chrome/common/extensions/docs/tut_debugging.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/tut_oauth.html b/chrome/common/extensions/docs/tut_oauth.html
index 7cf4e91..b6146ac 100644
--- a/chrome/common/extensions/docs/tut_oauth.html
+++ b/chrome/common/extensions/docs/tut_oauth.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/tutorials.html b/chrome/common/extensions/docs/tutorials.html
index c2d9de7..c1d1e6c 100644
--- a/chrome/common/extensions/docs/tutorials.html
+++ b/chrome/common/extensions/docs/tutorials.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/docs/windows.html b/chrome/common/extensions/docs/windows.html
index 7241979..6c183f0 100644
--- a/chrome/common/extensions/docs/windows.html
+++ b/chrome/common/extensions/docs/windows.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li class="leftNavSelected">Windows</li>
</ul>
diff --git a/chrome/common/extensions/docs/xhr.html b/chrome/common/extensions/docs/xhr.html
index 96c040e..0cbe660 100644
--- a/chrome/common/extensions/docs/xhr.html
+++ b/chrome/common/extensions/docs/xhr.html
@@ -145,6 +145,7 @@
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
<li><a href="windows.html">Windows</a></li>
</ul>
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index 7deff53..c583bc9 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -106,13 +106,15 @@ const char* Extension::kBookmarkPermission = "bookmarks";
const char* Extension::kNotificationPermission = "notifications";
const char* Extension::kExperimentalPermission = "experimental";
const char* Extension::kUnlimitedStoragePermission = "unlimited_storage";
+const char* Extension::kHistoryPermission = "history";
const char* Extension::kPermissionNames[] = {
Extension::kTabPermission,
Extension::kBookmarkPermission,
Extension::kNotificationPermission,
Extension::kExperimentalPermission,
- Extension::kUnlimitedStoragePermission
+ Extension::kUnlimitedStoragePermission,
+ Extension::kHistoryPermission
};
const size_t Extension::kNumPermissions =
arraysize(Extension::kPermissionNames);
@@ -1371,12 +1373,11 @@ bool Extension::InitFromValue(const DictionaryValue& source, bool require_key,
for (DictionaryValue::key_iterator iter = overrides->begin_keys();
iter != overrides->end_keys(); ++iter) {
std::string page = WideToUTF8(*iter);
- // For now, only allow the new tab page. Others will work when we remove
- // this check, but let's keep it simple for now.
- // TODO(erikkay) enable other pages as well
std::string val;
+ // Restrict override pages to a list of supported URLs.
if ((page != chrome::kChromeUINewTabHost &&
- page != chrome::kChromeUIBookmarksHost) ||
+ page != chrome::kChromeUIBookmarksHost &&
+ page != chrome::kChromeUIHistoryHost) ||
!overrides->GetStringWithoutPathExpansion(*iter, &val)) {
*error = errors::kInvalidChromeURLOverrides;
return false;
@@ -1384,6 +1385,12 @@ bool Extension::InitFromValue(const DictionaryValue& source, bool require_key,
// Replace the entry with a fully qualified chrome-extension:// URL.
chrome_url_overrides_[page] = GetResourceURL(val);
}
+
+ // An extension may override at most one page.
+ if (overrides->size() > 1) {
+ *error = errors::kMultipleOverrides;
+ return false;
+ }
}
if (!CheckAppsAreEnabled(manifest_value_.get(), error) ||
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
index f4c797e..7964052 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -92,6 +92,7 @@ class Extension {
static const char* kNotificationPermission;
static const char* kExperimentalPermission;
static const char* kUnlimitedStoragePermission;
+ static const char* kHistoryPermission;
static const char* kPermissionNames[];
static const size_t kNumPermissions;
diff --git a/chrome/common/extensions/extension_constants.cc b/chrome/common/extensions/extension_constants.cc
index f28fad1..0afb1255 100644
--- a/chrome/common/extensions/extension_constants.cc
+++ b/chrome/common/extensions/extension_constants.cc
@@ -190,6 +190,8 @@ const char* kManifestUnreadable =
"Manifest file is missing or unreadable.";
const char* kMissingFile =
"At least one js or css file is required for 'content_scripts[*]'.";
+const char* kMultipleOverrides =
+ "An extension cannot override more than one page.";
const char* kInvalidTheme =
"Invalid value for 'theme'.";
const char* kInvalidThemeImages =
diff --git a/chrome/common/extensions/extension_constants.h b/chrome/common/extensions/extension_constants.h
index e3f1a0c..7fb1113 100644
--- a/chrome/common/extensions/extension_constants.h
+++ b/chrome/common/extensions/extension_constants.h
@@ -144,6 +144,7 @@ namespace extension_manifest_errors {
extern const char* kManifestParseError;
extern const char* kManifestUnreadable;
extern const char* kMissingFile;
+ extern const char* kMultipleOverrides;
extern const char* kInvalidUpdateURL;
extern const char* kInvalidDefaultLocale;
extern const char* kLaunchContainerWithoutURL;
diff --git a/chrome/common/extensions/extension_manifests_unittest.cc b/chrome/common/extensions/extension_manifests_unittest.cc
index d7a5c2b..37c4696 100644
--- a/chrome/common/extensions/extension_manifests_unittest.cc
+++ b/chrome/common/extensions/extension_manifests_unittest.cc
@@ -160,3 +160,21 @@ TEST_F(ManifestTest, AppLaunchURL) {
EXPECT_EQ(GURL("http://www.google.com/launch.html"),
extension->GetFullLaunchURL());
}
+
+TEST_F(ManifestTest, Override) {
+ LoadAndExpectError("override_newtab_and_history.json",
+ errors::kMultipleOverrides);
+ LoadAndExpectError("override_invalid_page.json",
+ errors::kInvalidChromeURLOverrides);
+
+ scoped_ptr<Extension> extension;
+
+ extension.reset(LoadAndExpectSuccess("override_new_tab.json"));
+ EXPECT_EQ(extension->url().spec() + "newtab.html",
+ extension->GetChromeURLOverrides().find("newtab")->second.spec());
+
+ extension.reset(LoadAndExpectSuccess("override_history.json"));
+ EXPECT_EQ(extension->url().spec() + "history.html",
+ extension->GetChromeURLOverrides().find("history")->second.spec());
+
+}
diff --git a/chrome/common/page_transition_types.cc b/chrome/common/page_transition_types.cc
new file mode 100644
index 0000000..9fb49cd
--- /dev/null
+++ b/chrome/common/page_transition_types.cc
@@ -0,0 +1,22 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/page_transition_types.h"
+
+const char* PageTransition::CoreTransitionString(Type type) {
+ switch (type & PageTransition::CORE_MASK) {
+ case 0: return "link";
+ case 1: return "typed";
+ case 2: return "auto_bookmark";
+ case 3: return "auto_subframe";
+ case 4: return "manual_subframe";
+ case 5: return "generated";
+ case 6: return "start_page";
+ case 7: return "form_submit";
+ case 8: return "reload";
+ case 9: return "keyword";
+ case 10: return "keyword_generated";
+ }
+ return NULL;
+}
diff --git a/chrome/common/page_transition_types.h b/chrome/common/page_transition_types.h
index e41734f..bb46006 100644
--- a/chrome/common/page_transition_types.h
+++ b/chrome/common/page_transition_types.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -94,7 +94,7 @@ class PageTransition {
KEYWORD_GENERATED = 10,
// ADDING NEW CORE VALUE? Be sure to update the LAST_CORE and CORE_MASK
- // values below.
+ // values below. Also update CoreTransitionString().
LAST_CORE = KEYWORD_GENERATED,
CORE_MASK = 0xFF,
@@ -162,6 +162,9 @@ class PageTransition {
static int32 GetQualifier(Type type) {
return type & QUALIFIER_MASK;
}
+
+ // Return a string version of the core type values.
+ static const char* CoreTransitionString(Type type);
};
#endif // CHROME_COMMON_PAGE_TRANSITION_TYPES_H__