| Index: chrome/browser/ui/browser.cc
|
| diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
| index c54aad042315e4f94c8d9a17b34ff04c0a790cbf..9ab14bc677a680b6c9e842b96aa1b7fdecae30c4 100644
|
| --- a/chrome/browser/ui/browser.cc
|
| +++ b/chrome/browser/ui/browser.cc
|
| @@ -1493,8 +1493,7 @@ bool Browser::IsClosingPermitted() {
|
| }
|
|
|
| bool Browser::CanGoBack() const {
|
| - return GetSelectedTabContentsWrapper()->
|
| - web_contents()->GetController().CanGoBack();
|
| + return GetSelectedWebContents()->GetController().CanGoBack();
|
| }
|
|
|
| void Browser::GoBack(WindowOpenDisposition disposition) {
|
| @@ -1513,8 +1512,7 @@ void Browser::GoBack(WindowOpenDisposition disposition) {
|
| }
|
|
|
| bool Browser::CanGoForward() const {
|
| - return GetSelectedTabContentsWrapper()->
|
| - web_contents()->GetController().CanGoForward();
|
| + return GetSelectedWebContents()->GetController().CanGoForward();
|
| }
|
|
|
| void Browser::GoForward(WindowOpenDisposition disposition) {
|
| @@ -1523,6 +1521,11 @@ void Browser::GoForward(WindowOpenDisposition disposition) {
|
| GetOrCloneTabForDisposition(disposition)->GetController().GoForward();
|
| }
|
|
|
| +bool Browser::IsOnNtp() const {
|
| + WebContents* contents = GetSelectedWebContents();
|
| + return contents && contents->GetURL() == GURL(chrome::kChromeUINewTabURL);
|
| +}
|
| +
|
| void Browser::Reload(WindowOpenDisposition disposition) {
|
| content::RecordAction(UserMetricsAction("Reload"));
|
| ReloadInternal(disposition, false);
|
|
|