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

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

Issue 1662783002: Remove HostDesktopType from Browser::CreateParams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-12
Patch Set: remove desktop_type_ in bookmark_bubble_sign_in_delegate Created 4 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 unified diff | Download patch
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/webui/print_preview/print_preview_handler.h" 5 #include "chrome/browser/ui/webui/print_preview/print_preview_handler.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 print_preview_ui()->OnReloadPrintersList(); 1139 print_preview_ui()->OnReloadPrintersList();
1140 } 1140 }
1141 1141
1142 void PrintPreviewHandler::HandleSignin(const base::ListValue* args) { 1142 void PrintPreviewHandler::HandleSignin(const base::ListValue* args) {
1143 bool add_account = false; 1143 bool add_account = false;
1144 bool success = args->GetBoolean(0, &add_account); 1144 bool success = args->GetBoolean(0, &add_account);
1145 DCHECK(success); 1145 DCHECK(success);
1146 1146
1147 Profile* profile = Profile::FromBrowserContext( 1147 Profile* profile = Profile::FromBrowserContext(
1148 preview_web_contents()->GetBrowserContext()); 1148 preview_web_contents()->GetBrowserContext());
1149 chrome::ScopedTabbedBrowserDisplayer displayer( 1149 chrome::ScopedTabbedBrowserDisplayer displayer(profile);
1150 profile, chrome::GetActiveDesktop());
1151 print_dialog_cloud::CreateCloudPrintSigninTab( 1150 print_dialog_cloud::CreateCloudPrintSigninTab(
1152 displayer.browser(), 1151 displayer.browser(),
1153 add_account, 1152 add_account,
1154 base::Bind(&PrintPreviewHandler::OnSigninComplete, 1153 base::Bind(&PrintPreviewHandler::OnSigninComplete,
1155 weak_factory_.GetWeakPtr())); 1154 weak_factory_.GetWeakPtr()));
1156 } 1155 }
1157 1156
1158 void PrintPreviewHandler::HandleGetAccessToken(const base::ListValue* args) { 1157 void PrintPreviewHandler::HandleGetAccessToken(const base::ListValue* args) {
1159 std::string type; 1158 std::string type;
1160 if (!args->GetString(0, &type)) 1159 if (!args->GetString(0, &type))
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
1827 1826
1828 void PrintPreviewHandler::UnregisterForGaiaCookieChanges() { 1827 void PrintPreviewHandler::UnregisterForGaiaCookieChanges() {
1829 if (gaia_cookie_manager_service_) 1828 if (gaia_cookie_manager_service_)
1830 gaia_cookie_manager_service_->RemoveObserver(this); 1829 gaia_cookie_manager_service_->RemoveObserver(this);
1831 } 1830 }
1832 1831
1833 void PrintPreviewHandler::SetPdfSavedClosureForTesting( 1832 void PrintPreviewHandler::SetPdfSavedClosureForTesting(
1834 const base::Closure& closure) { 1833 const base::Closure& closure) {
1835 pdf_file_saved_closure_ = closure; 1834 pdf_file_saved_closure_ = closure;
1836 } 1835 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/sync_setup_handler.cc ('k') | chrome/browser/ui/webui/settings/people_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698