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

Side by Side Diff: chrome/browser/ui/browser_commands.cc

Issue 10483006: Print support for Windows Metro... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Self CR changes Created 8 years, 5 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser_commands.h" 5 #include "chrome/browser/ui/browser_commands.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/bookmarks/bookmark_model.h" 10 #include "chrome/browser/bookmarks/bookmark_model.h"
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 browser->GetActiveTabContents()->print_view_manager()->PrintNow(); 470 browser->GetActiveTabContents()->print_view_manager()->PrintNow();
471 } else { 471 } else {
472 browser->GetActiveTabContents()->print_view_manager()->PrintPreviewNow(); 472 browser->GetActiveTabContents()->print_view_manager()->PrintPreviewNow();
473 } 473 }
474 } 474 }
475 475
476 void AdvancedPrint(Browser* browser) { 476 void AdvancedPrint(Browser* browser) {
477 browser->GetActiveTabContents()->print_view_manager()->AdvancedPrintNow(); 477 browser->GetActiveTabContents()->print_view_manager()->AdvancedPrintNow();
478 } 478 }
479 479
480 void PrintToDestination(Browser* browser) {
481 browser->GetActiveTabContents()->print_view_manager()->PrintToDestination();
482 }
483
480 void EmailPageLocation(Browser* browser) { 484 void EmailPageLocation(Browser* browser) {
481 content::RecordAction(UserMetricsAction("EmailPageLocation")); 485 content::RecordAction(UserMetricsAction("EmailPageLocation"));
482 WebContents* wc = browser->GetActiveWebContents(); 486 WebContents* wc = browser->GetActiveWebContents();
483 DCHECK(wc); 487 DCHECK(wc);
484 488
485 std::string title = net::EscapeQueryParamValue( 489 std::string title = net::EscapeQueryParamValue(
486 UTF16ToUTF8(wc->GetTitle()), false); 490 UTF16ToUTF8(wc->GetTitle()), false);
487 std::string page_url = net::EscapeQueryParamValue(wc->GetURL().spec(), false); 491 std::string page_url = net::EscapeQueryParamValue(wc->GetURL().spec(), false);
488 std::string mailto = std::string("mailto:?subject=Fwd:%20") + 492 std::string mailto = std::string("mailto:?subject=Fwd:%20") +
489 title + "&body=%0A%0A" + page_url; 493 title + "&body=%0A%0A" + page_url;
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 SessionServiceFactory::GetForProfileIfExisting(browser->profile()); 754 SessionServiceFactory::GetForProfileIfExisting(browser->profile());
751 if (session_service) 755 if (session_service)
752 session_service->TabRestored(view_source_contents, false); 756 session_service->TabRestored(view_source_contents, false);
753 } 757 }
754 758
755 void ViewSelectedSource(Browser* browser) { 759 void ViewSelectedSource(Browser* browser) {
756 ViewSource(browser, browser->GetActiveTabContents()); 760 ViewSource(browser, browser->GetActiveTabContents());
757 } 761 }
758 762
759 } // namespace chrome 763 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698