当前位置: 首页 > news >正文

WordPress多语言多站点宁波网络优化seo

WordPress多语言多站点,宁波网络优化seo,新冠真的是美国投毒吗,谷歌seo专员是指什么意思一、前端 chrome.history定义 使用 chrome.history API 与浏览器的已访问网页的记录进行交互。您可以在浏览器的历史记录中添加、移除和查询网址。如需使用您自己的版本替换历史记录页面,请参阅覆盖网页。 更多参考:chrome.history | API | Chrome…

一、前端 chrome.history定义

使用 chrome.history API 与浏览器的已访问网页的记录进行交互。您可以在浏览器的历史记录中添加、移除和查询网址。如需使用您自己的版本替换历史记录页面,请参阅覆盖网页。

更多参考:chrome.history  |  API  |  Chrome for Developers (google.cn)

示例

若要试用此 API,请安装 chrome-extension-samples 中的 history API 示例 存储库

二、history接口在c++定义

   chrome\common\extensions\api\history.json

out\Debug\gen\chrome\common\extensions\api\history.cc

src\out\Debug\gen\chrome\common\extensions\api\history.h

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.[{"namespace": "history","description": "Use the <code>chrome.history</code> API 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'>Override Pages</a>.","types": [{"id": "TransitionType","type": "string","enum": ["link", "typed", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "auto_toplevel", "form_submit", "reload", "keyword", "keyword_generated"],"description": "The <a href='#transition_types'>transition type</a> for this visit from its referrer."},{"id": "HistoryItem","type": "object","description": "An object encapsulating one result of a history query.","properties": {"id": {"type": "string", "minimum": 0, "description": "The unique identifier for the item."},"url": {"type": "string", "optional": true, "description": "The URL navigated to by a user."},"title": {"type": "string", "optional": true, "description": "The title of the page when it was last loaded."},"lastVisitTime": {"type": "number", "optional": true, "description": "When this page was last loaded, represented in milliseconds since the epoch."},"visitCount": {"type": "integer", "optional": true, "description": "The number of times the user has navigated to this page."},"typedCount": {"type": "integer", "optional": true, "description": "The number of times the user has navigated to this page by typing in the address."}}},{"id": "VisitItem","type": "object","description": "An object encapsulating one visit to a URL.","properties": {"id": {"type": "string", "minimum": 0, "description": "The unique identifier for the corresponding $(ref:history.HistoryItem)."},"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": {"$ref": "TransitionType","description": "The <a href='#transition_types'>transition type</a> for this visit from its referrer."},"isLocal": { "type": "boolean", "description": "True if the visit originated on this device. False if it was synced from a different device." }}},{"id": "UrlDetails","type": "object","properties": {"url": {"type": "string", "description": "The URL for the operation. It must be in the format as returned from a call to history.search."}}}],"functions": [{"name": "search","type": "function","description": "Searches the history for the last visit time of each page matching the query.","parameters": [{"name": "query","type": "object","properties": {"text": {"type": "string", "description": "A free-text query to the history service.  Leave empty to retrieve all pages."},"startTime": {"type": "number", "optional": true, "description": "Limit results to those visited after this date, represented in milliseconds since the epoch. If not specified, this defaults to 24 hours in the past."},"endTime": {"type": "number", "optional": true, "description": "Limit results to those visited before this date, represented in milliseconds since the epoch."},"maxResults": {"type": "integer", "optional": true, "minimum": 0, "description": "The maximum number of results to retrieve.  Defaults to 100."}}}],"returns_async": {"name": "callback","parameters": [{ "name": "results", "type": "array", "items": { "$ref": "HistoryItem"} }]}},{"name": "getVisits","type": "function","description": "Retrieves information about visits to a URL.","parameters": [{"name": "details","$ref": "UrlDetails"}],"returns_async": {"name": "callback","parameters": [{ "name": "results", "type": "array", "items": { "$ref": "VisitItem"} }]}},{"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\".","parameters": [{"name": "details","$ref": "UrlDetails"}],"returns_async": {"name": "callback","optional": true,"parameters": []}},{"name": "deleteUrl","type": "function","description": "Removes all occurrences of the given URL from the history.","parameters": [{"name": "details","$ref": "UrlDetails"}],"returns_async": {"name": "callback","optional": true,"parameters": []}},{"name": "deleteRange","type": "function","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." },"endTime": { "type": "number", "description": "Items added to history before this date, represented in milliseconds since the epoch." }}}],"returns_async": {"name": "callback","parameters": []}},{"name": "deleteAll","type": "function","description": "Deletes all items from the history.","parameters": [],"returns_async": {"name": "callback","parameters": []}}],"events": [{"name": "onVisited","type": "function","description": "Fired when a URL is visited, providing the HistoryItem data for that URL.  This event fires before the page has loaded.","parameters": [{ "name": "result", "$ref": "HistoryItem"}]},{"name": "onVisitRemoved","type": "function","description": "Fired when one or more URLs are removed from the history service.  When all visits have been removed the URL is purged from history.","parameters": [{"name": "removed","type": "object","properties": {"allHistory": { "type": "boolean", "description": "True if all history was removed.  If true, then urls will be empty." },"urls": { "type": "array", "items": { "type": "string" }, "optional": true}}}]}]}
]

三、history API接口定义文件:

     chrome\browser\extensions\api\bookmarks\bookmarks_api.h

     chrome\browser\extensions\api\bookmarks\bookmarks_api.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.#ifndef CHROME_BROWSER_EXTENSIONS_API_HISTORY_HISTORY_API_H_
#define CHROME_BROWSER_EXTENSIONS_API_HISTORY_HISTORY_API_H_#include <string>
#include <vector>#include "base/memory/raw_ptr.h"
#include "base/scoped_observation.h"
#include "base/task/cancelable_task_tracker.h"
#include "base/values.h"
#include "chrome/common/extensions/api/history.h"
#include "components/history/core/browser/history_service.h"
#include "components/history/core/browser/history_service_observer.h"
#include "extensions/browser/browser_context_keyed_api_factory.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_function.h"class Profile;namespace extensions {// Observes History service and routes the notifications as events to the
// extension system.
class HistoryEventRouter : public history::HistoryServiceObserver {public:HistoryEventRouter(Profile* profile,history::HistoryService* history_service);HistoryEventRouter(const HistoryEventRouter&) = delete;HistoryEventRouter& operator=(const HistoryEventRouter&) = delete;~HistoryEventRouter() override;private:// history::HistoryServiceObserver.void OnURLVisited(history::HistoryService* history_service,const history::URLRow& url_row,const history::VisitRow& new_visit) override;void OnURLsDeleted(history::HistoryService* history_service,const history::DeletionInfo& deletion_info) override;void DispatchEvent(Profile* profile,events::HistogramValue histogram_value,const std::string& event_name,base::Value::List event_args);raw_ptr<Profile> profile_;base::ScopedObservation<history::HistoryService,history::HistoryServiceObserver>history_service_observation_{this};
};class HistoryAPI : public BrowserContextKeyedAPI, public EventRouter::Observer {public:explicit HistoryAPI(content::BrowserContext* context);~HistoryAPI() override;// KeyedService implementation.void Shutdown() override;// BrowserContextKeyedAPI implementation.static BrowserContextKeyedAPIFactory<HistoryAPI>* GetFactoryInstance();// EventRouter::Observer implementation.void OnListenerAdded(const EventListenerInfo& details) override;private:friend class BrowserContextKeyedAPIFactory<HistoryAPI>;raw_ptr<content::BrowserContext> browser_context_;// BrowserContextKeyedAPI implementation.static const char* service_name() {return "HistoryAPI";}static const bool kServiceIsNULLWhileTesting = true;// Created lazily upon OnListenerAdded.std::unique_ptr<HistoryEventRouter> history_event_router_;
};template <>
void BrowserContextKeyedAPIFactory<HistoryAPI>::DeclareFactoryDependencies();// Base class for history function APIs.
class HistoryFunction : public ExtensionFunction {protected:~HistoryFunction() override {}bool ValidateUrl(const std::string& url_string,GURL* url,std::string* error);bool VerifyDeleteAllowed(std::string* error);base::Time GetTime(double ms_from_epoch);Profile* GetProfile() const;
};// Base class for history funciton APIs which require async interaction with
// chrome services and the extension thread.
class HistoryFunctionWithCallback : public HistoryFunction {public:HistoryFunctionWithCallback();protected:~HistoryFunctionWithCallback() override;// The task tracker for the HistoryService callbacks.base::CancelableTaskTracker task_tracker_;
};class HistoryGetVisitsFunction : public HistoryFunctionWithCallback {public:DECLARE_EXTENSION_FUNCTION("history.getVisits", HISTORY_GETVISITS)protected:~HistoryGetVisitsFunction() override {}// ExtensionFunction:ResponseAction Run() override;// Callback for the history function to provide results.void QueryComplete(history::QueryURLResult result);
};class HistorySearchFunction : public HistoryFunctionWithCallback {public:DECLARE_EXTENSION_FUNCTION("history.search", HISTORY_SEARCH)protected:~HistorySearchFunction() override {}// ExtensionFunction:ResponseAction Run() override;// Callback for the history function to provide results.void SearchComplete(history::QueryResults results);
};class HistoryAddUrlFunction : public HistoryFunction {public:DECLARE_EXTENSION_FUNCTION("history.addUrl", HISTORY_ADDURL)protected:~HistoryAddUrlFunction() override {}// ExtensionFunction:ResponseAction Run() override;
};class HistoryDeleteAllFunction : public HistoryFunctionWithCallback {public:DECLARE_EXTENSION_FUNCTION("history.deleteAll", HISTORY_DELETEALL)protected:~HistoryDeleteAllFunction() override {}// ExtensionFunction:ResponseAction Run() override;// Callback for the history service to acknowledge deletion.void DeleteComplete();
};class HistoryDeleteUrlFunction : public HistoryFunction {public:DECLARE_EXTENSION_FUNCTION("history.deleteUrl", HISTORY_DELETEURL)protected:~HistoryDeleteUrlFunction() override {}// ExtensionFunction:ResponseAction Run() override;
};class HistoryDeleteRangeFunction : public HistoryFunctionWithCallback {public:DECLARE_EXTENSION_FUNCTION("history.deleteRange", HISTORY_DELETERANGE)protected:~HistoryDeleteRangeFunction() override {}// ExtensionFunction:ResponseAction Run() override;// Callback for the history service to acknowledge deletion.void DeleteComplete();
};}  // namespace extensions#endif  // CHROME_BROWSER_EXTENSIONS_API_HISTORY_HISTORY_API_H_

四、看下扩展调用history.getVisits 堆栈:

 

总结:


文章转载自:
http://gerard.nrwr.cn
http://claymore.nrwr.cn
http://wesleyanism.nrwr.cn
http://pythogenic.nrwr.cn
http://level.nrwr.cn
http://salus.nrwr.cn
http://popover.nrwr.cn
http://coadjutress.nrwr.cn
http://reelevate.nrwr.cn
http://strychnin.nrwr.cn
http://heliogram.nrwr.cn
http://vietnik.nrwr.cn
http://lythraceous.nrwr.cn
http://zoon.nrwr.cn
http://loamy.nrwr.cn
http://misalliance.nrwr.cn
http://redia.nrwr.cn
http://arenation.nrwr.cn
http://quercetin.nrwr.cn
http://tam.nrwr.cn
http://nebular.nrwr.cn
http://protamine.nrwr.cn
http://trophied.nrwr.cn
http://seditiously.nrwr.cn
http://vengeful.nrwr.cn
http://sonicate.nrwr.cn
http://candlepin.nrwr.cn
http://diploid.nrwr.cn
http://estrepement.nrwr.cn
http://stator.nrwr.cn
http://equivocally.nrwr.cn
http://executer.nrwr.cn
http://acerbate.nrwr.cn
http://sicanian.nrwr.cn
http://polonia.nrwr.cn
http://nobble.nrwr.cn
http://concertino.nrwr.cn
http://seedpod.nrwr.cn
http://nonyl.nrwr.cn
http://seedage.nrwr.cn
http://egesta.nrwr.cn
http://graphomaniac.nrwr.cn
http://shortage.nrwr.cn
http://oligochrome.nrwr.cn
http://obnounce.nrwr.cn
http://practice.nrwr.cn
http://weatherology.nrwr.cn
http://carbomycin.nrwr.cn
http://dendrogram.nrwr.cn
http://juggling.nrwr.cn
http://sissified.nrwr.cn
http://defoam.nrwr.cn
http://barbule.nrwr.cn
http://overdry.nrwr.cn
http://binucleate.nrwr.cn
http://inshrine.nrwr.cn
http://planchet.nrwr.cn
http://palmy.nrwr.cn
http://abortifacient.nrwr.cn
http://bailie.nrwr.cn
http://hokum.nrwr.cn
http://dalles.nrwr.cn
http://kohinoor.nrwr.cn
http://unreaped.nrwr.cn
http://englishwoman.nrwr.cn
http://overhaul.nrwr.cn
http://ablins.nrwr.cn
http://blackcurrant.nrwr.cn
http://sweep.nrwr.cn
http://rougeetnoir.nrwr.cn
http://cabalism.nrwr.cn
http://ridgy.nrwr.cn
http://mayest.nrwr.cn
http://mythopoeia.nrwr.cn
http://ferriage.nrwr.cn
http://cruet.nrwr.cn
http://retroflected.nrwr.cn
http://juggler.nrwr.cn
http://replicase.nrwr.cn
http://englishmen.nrwr.cn
http://viscoelasticity.nrwr.cn
http://hurley.nrwr.cn
http://righten.nrwr.cn
http://snack.nrwr.cn
http://spif.nrwr.cn
http://fooling.nrwr.cn
http://prosyllogism.nrwr.cn
http://carcinomatosis.nrwr.cn
http://craftwork.nrwr.cn
http://celebrant.nrwr.cn
http://rockfest.nrwr.cn
http://titillate.nrwr.cn
http://goidelic.nrwr.cn
http://ambitiousness.nrwr.cn
http://hydrotrope.nrwr.cn
http://moppet.nrwr.cn
http://extensionless.nrwr.cn
http://underrun.nrwr.cn
http://kirghizian.nrwr.cn
http://jaculatory.nrwr.cn
http://www.dt0577.cn/news/70798.html

相关文章:

  • sublime做家乡网站有效的网站推广方式
  • 网站的搜索框如何做交友平台
  • 上海做外贸建站的专业公司google play服务
  • 如何设计自己网站免费软文推广平台都有哪些
  • 陕西今天最新消息新闻广州seo优化外包公司
  • 沈阳网下载苏州优化seo
  • 成都家具企业网站建设公司网站推广费用
  • 胶州家园网站建设什么是网络整合营销
  • 福田网站建设泰安网站优化公司
  • 比分网站制作品牌宣传方式
  • 龙岩网站建设推广google关键词查询工具
  • 制做网站首先应该怎么做国外域名购买
  • 游戏攻略网站怎么做下载百度app到桌面
  • 东莞免费做网站西安seo优化培训机构
  • 网站建设优化公司网络平台推广方案
  • 2020广东黄页seo 培训教程
  • 网站优化公司价格如何计算网站查询地址
  • 廊坊做网站1766534168站长论坛
  • 个人网站整站下载推广发布任务平台app下载
  • 虎门外贸网站建设合肥seo优化外包公司
  • 做网站找什么公司工作互联网营销师考试题库
  • 域名打不开网站广东深圳疫情最新情况
  • 亚马逊怎么做网站推广推广自己产品的文案
  • ecshop 做企业网站优化英文
  • 好看的网页界面设计专业网站优化外包
  • 电子商务网站开发教程课后习题公司网站设计模板
  • 网站ui设计用什么软件做站长工具无内鬼放心开车禁止收费
  • 代理做网站的合同负面口碑营销案例
  • 做网站添加支付功能要多少钱杭州seo网站排名优化
  • 重庆网站关键词排名南京seo外包