Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 9473001: Extract minimal RenderViewHost interface for embedders, leaving (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to LKGR, fix a weird runtime issue. Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 3906 matching lines...) Expand 10 before | Expand all | Expand 10 after
5612 ShowSingletonTabOverwritingNTP(params); 5612 ShowSingletonTabOverwritingNTP(params);
5613 } else { 5613 } else {
5614 LoginUIServiceFactory::GetForProfile( 5614 LoginUIServiceFactory::GetForProfile(
5615 profile()->GetOriginalProfile())->ShowLoginUI(); 5615 profile()->GetOriginalProfile())->ShowLoginUI();
5616 } 5616 }
5617 } 5617 }
5618 5618
5619 void Browser::ToggleSpeechInput() { 5619 void Browser::ToggleSpeechInput() {
5620 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); 5620 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput();
5621 } 5621 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698