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

Side by Side Diff: chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc

Issue 2685333005: ash: fix regression where ctrl+n put new window on wrong desktop (Closed)
Patch Set: Rebase to ToT Created 3 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 <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 extension_id, base::Bind(&ChromeRuntimeAPIDelegate::UpdateCheckComplete, 251 extension_id, base::Bind(&ChromeRuntimeAPIDelegate::UpdateCheckComplete,
252 base::Unretained(this), extension_id)); 252 base::Unretained(this), extension_id));
253 } 253 }
254 return true; 254 return true;
255 } 255 }
256 256
257 void ChromeRuntimeAPIDelegate::OpenURL(const GURL& uninstall_url) { 257 void ChromeRuntimeAPIDelegate::OpenURL(const GURL& uninstall_url) {
258 Profile* profile = Profile::FromBrowserContext(browser_context_); 258 Profile* profile = Profile::FromBrowserContext(browser_context_);
259 Browser* browser = chrome::FindLastActiveWithProfile(profile); 259 Browser* browser = chrome::FindLastActiveWithProfile(profile);
260 if (!browser) 260 if (!browser)
261 browser = new Browser(Browser::CreateParams(profile)); 261 browser = new Browser(Browser::CreateParams(profile, false));
262 262
263 chrome::NavigateParams params( 263 chrome::NavigateParams params(
264 browser, uninstall_url, ui::PAGE_TRANSITION_CLIENT_REDIRECT); 264 browser, uninstall_url, ui::PAGE_TRANSITION_CLIENT_REDIRECT);
265 params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB; 265 params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB;
266 params.user_gesture = false; 266 params.user_gesture = false;
267 chrome::Navigate(&params); 267 chrome::Navigate(&params);
268 } 268 }
269 269
270 bool ChromeRuntimeAPIDelegate::GetPlatformInfo(PlatformInfo* info) { 270 bool ChromeRuntimeAPIDelegate::GetPlatformInfo(PlatformInfo* info) {
271 const char* os = update_client::UpdateQueryParams::GetOS(); 271 const char* os = update_client::UpdateQueryParams::GetOS();
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 const UpdateCheckResult& result) { 386 const UpdateCheckResult& result) {
387 auto it = update_check_info_.find(extension_id); 387 auto it = update_check_info_.find(extension_id);
388 if (it == update_check_info_.end()) 388 if (it == update_check_info_.end())
389 return; 389 return;
390 std::vector<UpdateCheckCallback> callbacks; 390 std::vector<UpdateCheckCallback> callbacks;
391 it->second.callbacks.swap(callbacks); 391 it->second.callbacks.swap(callbacks);
392 for (const auto& callback : callbacks) { 392 for (const auto& callback : callbacks) {
393 callback.Run(result); 393 callback.Run(result);
394 } 394 }
395 } 395 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698