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

Unified Diff: chrome/browser/ui/browser.cc

Issue 9443007: Add Chrome To Mobile Service and Views Page Action. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Bail on empty GetOAuth2LoginRefreshToken(). 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 01774f168cb99f5fbb572ab17ceecdbb29223825..95b3697a1ea4eab0873ea9dd9ce5438ebd2ff765 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1947,7 +1947,7 @@ void Browser::BookmarkCurrentPage() {
// bookmark isn't created if the url is invalid.
if (window_->IsActive() && model->IsBookmarked(url)) {
// Only show the bubble if the window is active, otherwise we may get into
- // weird situations were the bubble is deleted as soon as it is shown.
+ // weird situations where the bubble is deleted as soon as it is shown.
window_->ShowBookmarkBubble(url, was_bookmarked);
}
}
@@ -3033,6 +3033,7 @@ void Browser::ExecuteCommandWithDisposition(
case IDC_EMAIL_PAGE_LOCATION: EmailPageLocation(); break;
case IDC_PRINT: Print(); break;
case IDC_ADVANCED_PRINT: AdvancedPrint(); break;
+ case IDC_CHROME_TO_MOBILE_PAGE: ShowChromeToMobileBubble(); break;
case IDC_ENCODING_AUTO_DETECT: ToggleEncodingAutoDetect(); break;
case IDC_ENCODING_UTF8:
case IDC_ENCODING_UTF16LE:
@@ -4020,6 +4021,13 @@ void Browser::ShowPageInfo(content::WebContents* web_contents,
}
}
+void Browser::ShowChromeToMobileBubble() {
+ // Only show the bubble if the window is active, otherwise we may get into
+ // weird situations where the bubble is deleted as soon as it is shown.
+ if (window_->IsActive())
+ window_->ShowChromeToMobileBubble();
+}
+
void Browser::ViewSourceForTab(WebContents* source, const GURL& page_url) {
DCHECK(source);
TabContentsWrapper* wrapper = GetTabContentsWrapperAt(
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698