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

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

Issue 12250028: Re-enable print for instant extended NTP which now supports it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added back reload too. Created 7 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_commands.cc
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
index 48127d9230a4f7190b7f380fd21953b62ed2786a..961ad6f0489556c11f673e537573d6e6ab4e9875 100644
--- a/chrome/browser/ui/browser_commands.cc
+++ b/chrome/browser/ui/browser_commands.cc
@@ -48,8 +48,6 @@
#include "chrome/browser/ui/find_bar/find_tab_helper.h"
#include "chrome/browser/ui/fullscreen/fullscreen_controller.h"
#include "chrome/browser/ui/omnibox/location_bar.h"
-#include "chrome/browser/ui/search/search.h"
-#include "chrome/browser/ui/search/search_model.h"
#include "chrome/browser/ui/status_bubble.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/web_contents_modal_dialog_manager.h"
@@ -193,12 +191,6 @@ bool PrintPreviewShowing(const Browser* browser) {
controller->is_creating_print_preview_dialog());
}
-bool IsNTPModeForInstantExtendedAPI(const Browser* browser) {
- return browser->search_model() &&
- search::IsInstantExtendedAPIEnabled(browser->profile()) &&
- browser->search_model()->mode().is_ntp();
-}
-
} // namespace
bool IsCommandEnabled(Browser* browser, int command) {
@@ -387,7 +379,7 @@ void ReloadIgnoringCache(Browser* browser, WindowOpenDisposition disposition) {
}
bool CanReload(const Browser* browser) {
- return !browser->is_devtools() && !IsNTPModeForInstantExtendedAPI(browser);
+ return !browser->is_devtools();
}
void Home(Browser* browser, WindowOpenDisposition disposition) {
@@ -735,11 +727,9 @@ void Print(Browser* browser) {
bool CanPrint(const Browser* browser) {
// Do not print when printing is disabled via pref or policy.
// Do not print when a constrained window is showing. It's confusing.
- // Do not print if instant extended API is enabled and mode is NTP.
return browser->profile()->GetPrefs()->GetBoolean(prefs::kPrintingEnabled) &&
!(IsShowingWebContentsModalDialog(browser) ||
- GetContentRestrictions(browser) & content::CONTENT_RESTRICTION_PRINT ||
- IsNTPModeForInstantExtendedAPI(browser));
+ GetContentRestrictions(browser) & content::CONTENT_RESTRICTION_PRINT);
}
void AdvancedPrint(Browser* browser) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698