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

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: Put shared CloudPrint consts/helpers in chrome/common/; use CloudPrintURL. 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
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 97dd65d45989d1a9a0ab1cd83e392089c56b4a4e..bdc4b33bc3d44ac42fb7d2d773dc5a13a0acb260 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1948,7 +1948,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);
}
}
@@ -3034,6 +3034,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: ChromeToMobile(); break;
case IDC_ENCODING_AUTO_DETECT: ToggleEncodingAutoDetect(); break;
case IDC_ENCODING_UTF8:
case IDC_ENCODING_UTF16LE:
@@ -4021,6 +4022,13 @@ void Browser::ShowPageInfo(content::WebContents* web_contents,
}
}
+void Browser::ChromeToMobile() {
+ // 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(

Powered by Google App Engine
This is Rietveld 408576698