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

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

Issue 8253002: Move PageTransition into content namespace. While I'm touching all these files, I've also updated... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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_handler.h" 5 #include "chrome/browser/ui/webui/print_preview_handler.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 // http://code.google.com/p/chromium/issues/detail?id=44093 863 // http://code.google.com/p/chromium/issues/detail?id=44093
864 ActivateInitiatorTabAndClosePreviewTab(); 864 ActivateInitiatorTabAndClosePreviewTab();
865 } 865 }
866 866
867 void PrintPreviewHandler::HandleManageCloudPrint(const ListValue* /*args*/) { 867 void PrintPreviewHandler::HandleManageCloudPrint(const ListValue* /*args*/) {
868 Browser* browser = BrowserList::GetLastActive(); 868 Browser* browser = BrowserList::GetLastActive();
869 browser->OpenURL(CloudPrintURL(browser->profile()). 869 browser->OpenURL(CloudPrintURL(browser->profile()).
870 GetCloudPrintServiceManageURL(), 870 GetCloudPrintServiceManageURL(),
871 GURL(), 871 GURL(),
872 NEW_FOREGROUND_TAB, 872 NEW_FOREGROUND_TAB,
873 PageTransition::LINK); 873 content::PAGE_TRANSITION_LINK);
874 } 874 }
875 875
876 void PrintPreviewHandler::HandleShowSystemDialog(const ListValue* /*args*/) { 876 void PrintPreviewHandler::HandleShowSystemDialog(const ListValue* /*args*/) {
877 ReportStats(); 877 ReportStats();
878 ReportUserActionHistogram(FALLBACK_TO_ADVANCED_SETTINGS_DIALOG); 878 ReportUserActionHistogram(FALLBACK_TO_ADVANCED_SETTINGS_DIALOG);
879 879
880 TabContentsWrapper* initiator_tab = GetInitiatorTab(); 880 TabContentsWrapper* initiator_tab = GetInitiatorTab();
881 if (!initiator_tab) 881 if (!initiator_tab)
882 return; 882 return;
883 883
(...skipping 15 matching lines...) Expand all
899 const ListValue* /*args*/) { 899 const ListValue* /*args*/) {
900 ReportStats(); 900 ReportStats();
901 ReportUserActionHistogram(INITIATOR_TAB_CRASHED); 901 ReportUserActionHistogram(INITIATOR_TAB_CRASHED);
902 902
903 TabContentsWrapper* initiator_tab = GetInitiatorTab(); 903 TabContentsWrapper* initiator_tab = GetInitiatorTab();
904 if (!initiator_tab) 904 if (!initiator_tab)
905 return; 905 return;
906 906
907 TabContents* contents = initiator_tab->tab_contents(); 907 TabContents* contents = initiator_tab->tab_contents();
908 contents->OpenURL(contents->GetURL(), GURL(), CURRENT_TAB, 908 contents->OpenURL(contents->GetURL(), GURL(), CURRENT_TAB,
909 PageTransition::RELOAD); 909 content::PAGE_TRANSITION_RELOAD);
910 ActivateInitiatorTabAndClosePreviewTab(); 910 ActivateInitiatorTabAndClosePreviewTab();
911 } 911 }
912 912
913 void PrintPreviewHandler::HandleClosePreviewTab(const ListValue* /*args*/) { 913 void PrintPreviewHandler::HandleClosePreviewTab(const ListValue* /*args*/) {
914 ReportStats(); 914 ReportStats();
915 ReportUserActionHistogram(CANCEL); 915 ReportUserActionHistogram(CANCEL);
916 916
917 // Record the number of times the user requests to regenerate preview data 917 // Record the number of times the user requests to regenerate preview data
918 // before cancelling. 918 // before cancelling.
919 UMA_HISTOGRAM_COUNTS("PrintPreview.RegeneratePreviewRequest.BeforeCancel", 919 UMA_HISTOGRAM_COUNTS("PrintPreview.RegeneratePreviewRequest.BeforeCancel",
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1162 return; 1162 return;
1163 1163
1164 // We no longer require the initiator tab details. Remove those details 1164 // We no longer require the initiator tab details. Remove those details
1165 // associated with the preview tab to allow the initiator tab to create 1165 // associated with the preview tab to allow the initiator tab to create
1166 // another preview tab. 1166 // another preview tab.
1167 printing::PrintPreviewTabController* tab_controller = 1167 printing::PrintPreviewTabController* tab_controller =
1168 printing::PrintPreviewTabController::GetInstance(); 1168 printing::PrintPreviewTabController::GetInstance();
1169 if (tab_controller) 1169 if (tab_controller)
1170 tab_controller->EraseInitiatorTabInfo(preview_tab_wrapper()); 1170 tab_controller->EraseInitiatorTabInfo(preview_tab_wrapper());
1171 } 1171 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/advanced_options_utils_x11.cc ('k') | chrome/browser/ui/webui/sync_promo_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698