| 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 1674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1685 entry->GetURL(), Referrer(), disposition, | 1685 entry->GetURL(), Referrer(), disposition, |
| 1686 content::PAGE_TRANSITION_RELOAD, false)); | 1686 content::PAGE_TRANSITION_RELOAD, false)); |
| 1687 return; | 1687 return; |
| 1688 } | 1688 } |
| 1689 | 1689 |
| 1690 // As this is caused by a user action, give the focus to the page. | 1690 // As this is caused by a user action, give the focus to the page. |
| 1691 // | 1691 // |
| 1692 // Also notify RenderViewHostDelegate of the user gesture; this is | 1692 // Also notify RenderViewHostDelegate of the user gesture; this is |
| 1693 // normally done in Browser::Navigate, but a reload bypasses Navigate. | 1693 // normally done in Browser::Navigate, but a reload bypasses Navigate. |
| 1694 WebContents* tab = GetOrCloneTabForDisposition(disposition); | 1694 WebContents* tab = GetOrCloneTabForDisposition(disposition); |
| 1695 tab->GetRenderViewHost()->delegate()->OnUserGesture(); | 1695 tab->GetRenderViewHost()->GetDelegate()->OnUserGesture(); |
| 1696 if (!tab->FocusLocationBarByDefault()) | 1696 if (!tab->FocusLocationBarByDefault()) |
| 1697 tab->Focus(); | 1697 tab->Focus(); |
| 1698 if (ignore_cache) | 1698 if (ignore_cache) |
| 1699 tab->GetController().ReloadIgnoringCache(true); | 1699 tab->GetController().ReloadIgnoringCache(true); |
| 1700 else | 1700 else |
| 1701 tab->GetController().Reload(true); | 1701 tab->GetController().Reload(true); |
| 1702 } | 1702 } |
| 1703 | 1703 |
| 1704 void Browser::Home(WindowOpenDisposition disposition) { | 1704 void Browser::Home(WindowOpenDisposition disposition) { |
| 1705 content::RecordAction(UserMetricsAction("Home")); | 1705 content::RecordAction(UserMetricsAction("Home")); |
| (...skipping 3921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5627 ShowSingletonTabOverwritingNTP(params); | 5627 ShowSingletonTabOverwritingNTP(params); |
| 5628 } else { | 5628 } else { |
| 5629 LoginUIServiceFactory::GetForProfile( | 5629 LoginUIServiceFactory::GetForProfile( |
| 5630 profile()->GetOriginalProfile())->ShowLoginUI(); | 5630 profile()->GetOriginalProfile())->ShowLoginUI(); |
| 5631 } | 5631 } |
| 5632 } | 5632 } |
| 5633 | 5633 |
| 5634 void Browser::ToggleSpeechInput() { | 5634 void Browser::ToggleSpeechInput() { |
| 5635 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); | 5635 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); |
| 5636 } | 5636 } |
| OLD | NEW |