OLD | NEW |
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/cocoa/browser_window_cocoa.h" | 5 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 DownloadShelf* BrowserWindowCocoa::GetDownloadShelf() { | 519 DownloadShelf* BrowserWindowCocoa::GetDownloadShelf() { |
520 DownloadShelfController* shelfController = [controller_ downloadShelf]; | 520 DownloadShelfController* shelfController = [controller_ downloadShelf]; |
521 return [shelfController bridge]; | 521 return [shelfController bridge]; |
522 } | 522 } |
523 | 523 |
524 // We allow closing the window here since the real quit decision on Mac is made | 524 // We allow closing the window here since the real quit decision on Mac is made |
525 // in [AppController quit:]. | 525 // in [AppController quit:]. |
526 void BrowserWindowCocoa::ConfirmBrowserCloseWithPendingDownloads() { | 526 void BrowserWindowCocoa::ConfirmBrowserCloseWithPendingDownloads() { |
527 // Call InProgressDownloadResponse asynchronously to avoid a crash when the | 527 // Call InProgressDownloadResponse asynchronously to avoid a crash when the |
528 // browser window is closed here (http://crbug.com/44454). | 528 // browser window is closed here (http://crbug.com/44454). |
529 MessageLoop::current()->PostTask(FROM_HERE, | 529 base::MessageLoop::current()->PostTask(FROM_HERE, |
530 base::Bind(&Browser::InProgressDownloadResponse, | 530 base::Bind(&Browser::InProgressDownloadResponse, |
531 confirm_close_factory_.GetWeakPtr(), true)); | 531 confirm_close_factory_.GetWeakPtr(), true)); |
532 } | 532 } |
533 | 533 |
534 void BrowserWindowCocoa::UserChangedTheme() { | 534 void BrowserWindowCocoa::UserChangedTheme() { |
535 [controller_ userChangedTheme]; | 535 [controller_ userChangedTheme]; |
536 } | 536 } |
537 | 537 |
538 int BrowserWindowCocoa::GetExtraRenderViewHeight() const { | 538 int BrowserWindowCocoa::GetExtraRenderViewHeight() const { |
539 // Currently this is only used on linux. | 539 // Currently this is only used on linux. |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 PasswordGenerationBubbleController* controller = | 717 PasswordGenerationBubbleController* controller = |
718 [[PasswordGenerationBubbleController alloc] | 718 [[PasswordGenerationBubbleController alloc] |
719 initWithWindow:browser_->window()->GetNativeWindow() | 719 initWithWindow:browser_->window()->GetNativeWindow() |
720 anchoredAt:point | 720 anchoredAt:point |
721 renderViewHost:web_contents->GetRenderViewHost() | 721 renderViewHost:web_contents->GetRenderViewHost() |
722 passwordManager:PasswordManager::FromWebContents(web_contents) | 722 passwordManager:PasswordManager::FromWebContents(web_contents) |
723 usingGenerator:password_generator | 723 usingGenerator:password_generator |
724 forForm:form]; | 724 forForm:form]; |
725 [controller showWindow:nil]; | 725 [controller showWindow:nil]; |
726 } | 726 } |
OLD | NEW |