OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #endif // OS_WIN | 10 #endif // OS_WIN |
(...skipping 1643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1654 entry->GetURL(), Referrer(), disposition, | 1654 entry->GetURL(), Referrer(), disposition, |
1655 content::PAGE_TRANSITION_RELOAD, false)); | 1655 content::PAGE_TRANSITION_RELOAD, false)); |
1656 return; | 1656 return; |
1657 } | 1657 } |
1658 | 1658 |
1659 // As this is caused by a user action, give the focus to the page. | 1659 // As this is caused by a user action, give the focus to the page. |
1660 // | 1660 // |
1661 // Also notify RenderViewHostDelegate of the user gesture; this is | 1661 // Also notify RenderViewHostDelegate of the user gesture; this is |
1662 // normally done in Browser::Navigate, but a reload bypasses Navigate. | 1662 // normally done in Browser::Navigate, but a reload bypasses Navigate. |
1663 WebContents* tab = GetOrCloneTabForDisposition(disposition); | 1663 WebContents* tab = GetOrCloneTabForDisposition(disposition); |
1664 tab->GetRenderViewHost()->delegate()->OnUserGesture(); | 1664 tab->GetRenderViewHost()->GetDelegate()->OnUserGesture(); |
1665 if (!tab->FocusLocationBarByDefault()) | 1665 if (!tab->FocusLocationBarByDefault()) |
1666 tab->Focus(); | 1666 tab->Focus(); |
1667 if (ignore_cache) | 1667 if (ignore_cache) |
1668 tab->GetController().ReloadIgnoringCache(true); | 1668 tab->GetController().ReloadIgnoringCache(true); |
1669 else | 1669 else |
1670 tab->GetController().Reload(true); | 1670 tab->GetController().Reload(true); |
1671 } | 1671 } |
1672 | 1672 |
1673 void Browser::Home(WindowOpenDisposition disposition) { | 1673 void Browser::Home(WindowOpenDisposition disposition) { |
1674 content::RecordAction(UserMetricsAction("Home")); | 1674 content::RecordAction(UserMetricsAction("Home")); |
(...skipping 3909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5584 ShowSingletonTabOverwritingNTP(params); | 5584 ShowSingletonTabOverwritingNTP(params); |
5585 } else { | 5585 } else { |
5586 LoginUIServiceFactory::GetForProfile( | 5586 LoginUIServiceFactory::GetForProfile( |
5587 profile()->GetOriginalProfile())->ShowLoginUI(); | 5587 profile()->GetOriginalProfile())->ShowLoginUI(); |
5588 } | 5588 } |
5589 } | 5589 } |
5590 | 5590 |
5591 void Browser::ToggleSpeechInput() { | 5591 void Browser::ToggleSpeechInput() { |
5592 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); | 5592 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); |
5593 } | 5593 } |
OLD | NEW |