Use Chrome's navigation controller for in-page navigations

This commit is contained in:
Cheng Zhao 2015-05-11 14:30:26 +08:00
parent 4d1cd7e15f
commit 40631edb70
3 changed files with 31 additions and 10 deletions

View file

@ -443,6 +443,14 @@ void WebContents::ReloadIgnoringCache() {
web_contents()->GetController().ReloadIgnoringCache(false);
}
void WebContents::GoBack() {
web_contents()->GetController().GoBack();
}
void WebContents::GoForward() {
web_contents()->GetController().GoForward();
}
int WebContents::GetRoutingID() const {
return web_contents()->GetRoutingID();
}
@ -611,6 +619,8 @@ mate::ObjectTemplateBuilder WebContents::GetObjectTemplateBuilder(
.SetMethod("isWaitingForResponse", &WebContents::IsWaitingForResponse)
.SetMethod("_stop", &WebContents::Stop)
.SetMethod("_reloadIgnoringCache", &WebContents::ReloadIgnoringCache)
.SetMethod("_goBack", &WebContents::GoBack)
.SetMethod("_goForward", &WebContents::GoForward)
.SetMethod("getRoutingId", &WebContents::GetRoutingID)
.SetMethod("getProcessId", &WebContents::GetProcessID)
.SetMethod("isCrashed", &WebContents::IsCrashed)