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

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

Issue 22577010: Printing: Add a basic printing mode without print preview and cloud print. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 7 years, 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/apps/chrome_shell_window_delegate.h" 5 #include "chrome/browser/ui/apps/chrome_shell_window_delegate.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "chrome/browser/favicon/favicon_tab_helper.h" 8 #include "chrome/browser/favicon/favicon_tab_helper.h"
9 #include "chrome/browser/file_select_helper.h" 9 #include "chrome/browser/file_select_helper.h"
10 #include "chrome/browser/media/media_capture_devices_dispatcher.h" 10 #include "chrome/browser/media/media_capture_devices_dispatcher.h"
11 #include "chrome/browser/platform_util.h" 11 #include "chrome/browser/platform_util.h"
12 #include "chrome/browser/printing/print_preview_message_handler.h"
13 #include "chrome/browser/printing/print_view_manager.h"
14 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
15 #include "chrome/browser/ui/browser_dialogs.h" 13 #include "chrome/browser/ui/browser_dialogs.h"
16 #include "chrome/browser/ui/browser_finder.h" 14 #include "chrome/browser/ui/browser_finder.h"
17 #include "chrome/browser/ui/browser_tabstrip.h" 15 #include "chrome/browser/ui/browser_tabstrip.h"
18 #include "chrome/browser/ui/browser_window.h" 16 #include "chrome/browser/ui/browser_window.h"
19 #include "chrome/common/render_messages.h" 17 #include "chrome/common/render_messages.h"
20 #include "content/public/browser/render_view_host.h" 18 #include "content/public/browser/render_view_host.h"
21 #include "content/public/browser/web_contents.h" 19 #include "content/public/browser/web_contents.h"
22 #include "content/public/browser/web_contents_view.h" 20 #include "content/public/browser/web_contents_view.h"
23 21
24 #if defined(USE_ASH) 22 #if defined(USE_ASH)
25 #include "ash/launcher/launcher_types.h" 23 #include "ash/launcher/launcher_types.h"
26 #endif 24 #endif
27 25
26 #if defined(ENABLE_PRINTING)
27 #if defined(ENABLE_FULL_PRINTING)
28 #include "chrome/browser/printing/print_preview_message_handler.h"
29 #include "chrome/browser/printing/print_view_manager.h"
30 #else
31 #include "chrome/browser/printing/print_view_manager_basic.h"
32 #endif // defined(ENABLE_FULL_PRINTING)
33 #endif // defined(ENABLE_PRINTING)
34
28 namespace { 35 namespace {
29 36
30 bool disable_external_open_for_testing_ = false; 37 bool disable_external_open_for_testing_ = false;
31 38
32 } // namespace 39 } // namespace
33 40
34 ShellWindowLinkDelegate::ShellWindowLinkDelegate() {} 41 ShellWindowLinkDelegate::ShellWindowLinkDelegate() {}
35 42
36 ShellWindowLinkDelegate::~ShellWindowLinkDelegate() {} 43 ShellWindowLinkDelegate::~ShellWindowLinkDelegate() {}
37 44
(...skipping 13 matching lines...) Expand all
51 58
52 void ChromeShellWindowDelegate::DisableExternalOpenForTesting() { 59 void ChromeShellWindowDelegate::DisableExternalOpenForTesting() {
53 disable_external_open_for_testing_ = true; 60 disable_external_open_for_testing_ = true;
54 } 61 }
55 62
56 void ChromeShellWindowDelegate::InitWebContents( 63 void ChromeShellWindowDelegate::InitWebContents(
57 content::WebContents* web_contents) { 64 content::WebContents* web_contents) {
58 FaviconTabHelper::CreateForWebContents(web_contents); 65 FaviconTabHelper::CreateForWebContents(web_contents);
59 66
60 #if defined(ENABLE_PRINTING) 67 #if defined(ENABLE_PRINTING)
68 #if defined(ENABLE_FULL_PRINTING)
69 printing::PrintViewManager::CreateForWebContents(web_contents);
61 printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents); 70 printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents);
62 printing::PrintViewManager::CreateForWebContents(web_contents); 71 #else
63 #endif 72 printing::PrintViewManagerBasic::CreateForWebContents(web_contents);
73 #endif // defined(ENABLE_FULL_PRINTING)
74 #endif // defined(ENABLE_PRINTING)
64 } 75 }
65 76
66 apps::NativeAppWindow* ChromeShellWindowDelegate::CreateNativeAppWindow( 77 apps::NativeAppWindow* ChromeShellWindowDelegate::CreateNativeAppWindow(
67 apps::ShellWindow* window, 78 apps::ShellWindow* window,
68 const apps::ShellWindow::CreateParams& params) { 79 const apps::ShellWindow::CreateParams& params) {
69 return CreateNativeAppWindowImpl(window, params); 80 return CreateNativeAppWindowImpl(window, params);
70 } 81 }
71 82
72 content::WebContents* ChromeShellWindowDelegate::OpenURLFromTab( 83 content::WebContents* ChromeShellWindowDelegate::OpenURLFromTab(
73 Profile* profile, 84 Profile* profile,
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 if (host) { 156 if (host) {
146 host->Send(new ChromeViewMsg_SetVisuallyDeemphasized( 157 host->Send(new ChromeViewMsg_SetVisuallyDeemphasized(
147 host->GetRoutingID(), blocked)); 158 host->GetRoutingID(), blocked));
148 } 159 }
149 } 160 }
150 161
151 bool ChromeShellWindowDelegate::IsWebContentsVisible( 162 bool ChromeShellWindowDelegate::IsWebContentsVisible(
152 content::WebContents* web_contents) { 163 content::WebContents* web_contents) {
153 return platform_util::IsVisible(web_contents->GetView()->GetNativeView()); 164 return platform_util::IsVisible(web_contents->GetView()->GetNativeView());
154 } 165 }
OLDNEW
« no previous file with comments | « chrome/browser/task_manager/tab_contents_resource_provider.cc ('k') | chrome/browser/ui/browser_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698