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

Side by Side Diff: chrome/browser/ui/webui/chromeos/active_downloads_ui.cc

Issue 9968078: Honor window size for chrome.windows.create when parent window is maximized. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove extraneous logging Created 8 years, 8 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/webui/chromeos/active_downloads_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/active_downloads_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 !service->IsDownloadFromGallery(download->GetURL(), 347 !service->IsDownloadFromGallery(download->GetURL(),
348 download->GetReferrerUrl())); 348 download->GetReferrerUrl()));
349 } 349 }
350 350
351 // static 351 // static
352 Browser* ActiveDownloadsUI::OpenPopup(Profile* profile) { 352 Browser* ActiveDownloadsUI::OpenPopup(Profile* profile) {
353 Browser* browser = GetPopup(); 353 Browser* browser = GetPopup();
354 354
355 // Create new browser if no matching pop up is found. 355 // Create new browser if no matching pop up is found.
356 if (browser == NULL) { 356 if (browser == NULL) {
357 browser = Browser::CreateForApp(Browser::TYPE_PANEL, kActiveDownloadAppName, 357 browser = Browser::CreateWithParams(
358 gfx::Rect(), profile); 358 Browser::CreateParams::CreateForApp(
359 Browser::TYPE_PANEL, kActiveDownloadAppName, gfx::Rect(), profile));
359 360
360 browser::NavigateParams params( 361 browser::NavigateParams params(
361 browser, 362 browser,
362 GURL(chrome::kChromeUIActiveDownloadsURL), 363 GURL(chrome::kChromeUIActiveDownloadsURL),
363 content::PAGE_TRANSITION_LINK); 364 content::PAGE_TRANSITION_LINK);
364 params.disposition = NEW_FOREGROUND_TAB; 365 params.disposition = NEW_FOREGROUND_TAB;
365 browser::Navigate(&params); 366 browser::Navigate(&params);
366 367
367 DCHECK_EQ(browser, params.browser); 368 DCHECK_EQ(browser, params.browser);
368 // TODO(beng): The following two calls should be automatic by Navigate(). 369 // TODO(beng): The following two calls should be automatic by Navigate().
(...skipping 24 matching lines...) Expand all
393 return (*it); 394 return (*it);
394 } 395 }
395 } 396 }
396 } 397 }
397 return NULL; 398 return NULL;
398 } 399 }
399 400
400 const ActiveDownloadsUI::DownloadList& ActiveDownloadsUI::GetDownloads() const { 401 const ActiveDownloadsUI::DownloadList& ActiveDownloadsUI::GetDownloads() const {
401 return handler_->downloads(); 402 return handler_->downloads();
402 } 403 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698