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

Side by Side Diff: chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/extensions/api/runtime/chrome_runtime_api_delegate.h" 5 #include "chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 UpdateCallbackList& callbacks = pending_update_checks_[extension_id]; 164 UpdateCallbackList& callbacks = pending_update_checks_[extension_id];
165 callbacks.push_back(callback); 165 callbacks.push_back(callback);
166 } 166 }
167 return true; 167 return true;
168 } 168 }
169 169
170 void ChromeRuntimeAPIDelegate::OpenURL(const GURL& uninstall_url) { 170 void ChromeRuntimeAPIDelegate::OpenURL(const GURL& uninstall_url) {
171 Profile* profile = Profile::FromBrowserContext(browser_context_); 171 Profile* profile = Profile::FromBrowserContext(browser_context_);
172 Browser* browser = chrome::FindLastActiveWithProfile(profile); 172 Browser* browser = chrome::FindLastActiveWithProfile(profile);
173 if (!browser) 173 if (!browser)
174 browser = 174 browser = new Browser(Browser::CreateParams(profile));
175 new Browser(Browser::CreateParams(profile, chrome::GetActiveDesktop()));
176 175
177 chrome::NavigateParams params( 176 chrome::NavigateParams params(
178 browser, uninstall_url, ui::PAGE_TRANSITION_CLIENT_REDIRECT); 177 browser, uninstall_url, ui::PAGE_TRANSITION_CLIENT_REDIRECT);
179 params.disposition = NEW_FOREGROUND_TAB; 178 params.disposition = NEW_FOREGROUND_TAB;
180 params.user_gesture = false; 179 params.user_gesture = false;
181 chrome::Navigate(&params); 180 chrome::Navigate(&params);
182 } 181 }
183 182
184 bool ChromeRuntimeAPIDelegate::GetPlatformInfo(PlatformInfo* info) { 183 bool ChromeRuntimeAPIDelegate::GetPlatformInfo(PlatformInfo* info) {
185 const char* os = update_client::UpdateQueryParams::GetOS(); 184 const char* os = update_client::UpdateQueryParams::GetOS();
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 const UpdateCheckResult& result) { 279 const UpdateCheckResult& result) {
281 UpdateCallbackList callbacks = pending_update_checks_[extension_id]; 280 UpdateCallbackList callbacks = pending_update_checks_[extension_id];
282 pending_update_checks_.erase(extension_id); 281 pending_update_checks_.erase(extension_id);
283 for (UpdateCallbackList::const_iterator iter = callbacks.begin(); 282 for (UpdateCallbackList::const_iterator iter = callbacks.begin();
284 iter != callbacks.end(); 283 iter != callbacks.end();
285 ++iter) { 284 ++iter) {
286 const UpdateCheckCallback& callback = *iter; 285 const UpdateCheckCallback& callback = *iter;
287 callback.Run(result); 286 callback.Run(result);
288 } 287 }
289 } 288 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698