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

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

Issue 7810009: PrintPreview:[MAC] Make Cmd+Opt+P as advance print shortcut to display the native print dialog. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/webui/print_preview_data_source.h" 5 #include "chrome/browser/ui/webui/print_preview_data_source.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
11 #include "base/string_piece.h" 11 #include "base/string_piece.h"
12 #include "base/string_split.h" 12 #include "base/string_split.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "chrome/browser/printing/print_preview_data_service.h" 16 #include "chrome/browser/printing/print_preview_data_service.h"
17 #include "chrome/common/jstemplate_builder.h" 17 #include "chrome/common/jstemplate_builder.h"
18 #include "chrome/common/url_constants.h" 18 #include "chrome/common/url_constants.h"
19 #include "grit/browser_resources.h" 19 #include "grit/browser_resources.h"
20 #include "grit/chromium_strings.h" 20 #include "grit/chromium_strings.h"
21 #include "grit/generated_resources.h" 21 #include "grit/generated_resources.h"
22 #include "grit/google_chrome_strings.h" 22 #include "grit/google_chrome_strings.h"
23 #include "ui/base/l10n/l10n_util.h" 23 #include "ui/base/l10n/l10n_util.h"
24 #include "ui/base/resource/resource_bundle.h" 24 #include "ui/base/resource/resource_bundle.h"
25 25
26 namespace{ 26 namespace{
27 27
28 #if defined(OS_MACOSX) 28 #if defined(OS_MACOSX)
29 // U+0028 U+21E7 U+2318 U+0050 U+0029 in UTF8 29 // U+0028 U+21E7 U+2318 U+0050 U+0029 in UTF8
30 const char kAdvancedPrintShortcut[] = "\x28\xE2\x8C\x98\xE2\x87\xA7\x50\x29"; 30 const char kAdvancedPrintShortcut[] = "\x28\xE2\x8c\xA5\xE2\x8C\x98\x50\x29";
31 #elif defined(OS_WIN) 31 #elif defined(OS_WIN)
32 const char kAdvancedPrintShortcut[] = "(Ctrl+Shift+P)"; 32 const char kAdvancedPrintShortcut[] = "(Ctrl+Shift+P)";
33 #else 33 #else
34 const char kAdvancedPrintShortcut[] = "(Shift+Ctrl+P)"; 34 const char kAdvancedPrintShortcut[] = "(Shift+Ctrl+P)";
35 #endif 35 #endif
36 36
37 }; // namespace 37 }; // namespace
38 38
39 PrintPreviewDataSource::PrintPreviewDataSource() 39 PrintPreviewDataSource::PrintPreviewDataSource()
40 : ChromeWebUIDataSource(chrome::kChromeUIPrintHost) { 40 : ChromeWebUIDataSource(chrome::kChromeUIPrintHost) {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 url_substr[0], page_index, &data); 146 url_substr[0], page_index, &data);
147 } 147 }
148 if (data.get()) { 148 if (data.get()) {
149 SendResponse(request_id, data); 149 SendResponse(request_id, data);
150 return; 150 return;
151 } 151 }
152 // Invalid request. 152 // Invalid request.
153 scoped_refptr<RefCountedBytes> empty_bytes(new RefCountedBytes); 153 scoped_refptr<RefCountedBytes> empty_bytes(new RefCountedBytes);
154 SendResponse(request_id, empty_bytes); 154 SendResponse(request_id, empty_bytes);
155 } 155 }
OLDNEW
« chrome/app/nibs/MainMenu.xib ('K') | « chrome/browser/global_keyboard_shortcuts_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698