OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "base/gfx/rect.h" | 5 #include "base/gfx/rect.h" |
6 #include "base/logging.h" | 6 #include "base/logging.h" |
7 #include "base/sys_string_conversions.h" | 7 #include "base/sys_string_conversions.h" |
8 #include "chrome/app/chrome_dll_resource.h" | 8 #include "chrome/app/chrome_dll_resource.h" |
9 #include "chrome/browser/bookmarks/bookmark_utils.h" | 9 #include "chrome/browser/bookmarks/bookmark_utils.h" |
10 #include "chrome/browser/cocoa/browser_window_cocoa.h" | 10 #include "chrome/browser/cocoa/browser_window_cocoa.h" |
11 #import "chrome/browser/cocoa/browser_window_controller.h" | 11 #import "chrome/browser/cocoa/browser_window_controller.h" |
12 #import "chrome/browser/cocoa/clear_browsing_data_controller.h" | 12 #import "chrome/browser/cocoa/clear_browsing_data_controller.h" |
13 #import "chrome/browser/cocoa/download_shelf_controller.h" | 13 #import "chrome/browser/cocoa/download_shelf_controller.h" |
| 14 #import "chrome/browser/cocoa/html_dialog_window_controller.h" |
14 #import "chrome/browser/cocoa/keyword_editor_cocoa_controller.h" | 15 #import "chrome/browser/cocoa/keyword_editor_cocoa_controller.h" |
15 #import "chrome/browser/cocoa/nsmenuitem_additions.h" | 16 #import "chrome/browser/cocoa/nsmenuitem_additions.h" |
16 #include "chrome/browser/cocoa/page_info_window_mac.h" | 17 #include "chrome/browser/cocoa/page_info_window_mac.h" |
17 #include "chrome/browser/cocoa/status_bubble_mac.h" | 18 #include "chrome/browser/cocoa/status_bubble_mac.h" |
18 #include "chrome/browser/cocoa/task_manager_mac.h" | 19 #include "chrome/browser/cocoa/task_manager_mac.h" |
19 #import "chrome/browser/cocoa/theme_install_bubble_view.h" | 20 #import "chrome/browser/cocoa/theme_install_bubble_view.h" |
20 #include "chrome/browser/browser.h" | 21 #include "chrome/browser/browser.h" |
21 #include "chrome/browser/download/download_shelf.h" | 22 #include "chrome/browser/download/download_shelf.h" |
22 #include "chrome/browser/global_keyboard_shortcuts_mac.h" | 23 #include "chrome/browser/global_keyboard_shortcuts_mac.h" |
23 #include "chrome/common/notification_service.h" | 24 #include "chrome/common/notification_service.h" |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 } | 289 } |
289 | 290 |
290 // We allow closing the window here since the real quit decision on Mac is made | 291 // We allow closing the window here since the real quit decision on Mac is made |
291 // in [AppController quit:]. | 292 // in [AppController quit:]. |
292 void BrowserWindowCocoa::ConfirmBrowserCloseWithPendingDownloads() { | 293 void BrowserWindowCocoa::ConfirmBrowserCloseWithPendingDownloads() { |
293 browser_->InProgressDownloadResponse(true); | 294 browser_->InProgressDownloadResponse(true); |
294 } | 295 } |
295 | 296 |
296 void BrowserWindowCocoa::ShowHTMLDialog(HtmlDialogUIDelegate* delegate, | 297 void BrowserWindowCocoa::ShowHTMLDialog(HtmlDialogUIDelegate* delegate, |
297 gfx::NativeWindow parent_window) { | 298 gfx::NativeWindow parent_window) { |
298 NOTIMPLEMENTED(); | 299 if (!parent_window) { |
| 300 parent_window = GetNativeHandle(); |
| 301 } |
| 302 [HtmlDialogWindowController showHtmlDialog:delegate |
| 303 parentWindow:parent_window |
| 304 browser:browser_]; |
299 } | 305 } |
300 | 306 |
301 void BrowserWindowCocoa::UserChangedTheme() { | 307 void BrowserWindowCocoa::UserChangedTheme() { |
302 [controller_ userChangedTheme]; | 308 [controller_ userChangedTheme]; |
303 } | 309 } |
304 | 310 |
305 int BrowserWindowCocoa::GetExtraRenderViewHeight() const { | 311 int BrowserWindowCocoa::GetExtraRenderViewHeight() const { |
306 // Currently this is only used on linux. | 312 // Currently this is only used on linux. |
307 return 0; | 313 return 0; |
308 } | 314 } |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 break; | 412 break; |
407 } | 413 } |
408 } | 414 } |
409 | 415 |
410 void BrowserWindowCocoa::DestroyBrowser() { | 416 void BrowserWindowCocoa::DestroyBrowser() { |
411 [controller_ destroyBrowser]; | 417 [controller_ destroyBrowser]; |
412 | 418 |
413 // at this point the controller is dead (autoreleased), so | 419 // at this point the controller is dead (autoreleased), so |
414 // make sure we don't try to reference it any more. | 420 // make sure we don't try to reference it any more. |
415 } | 421 } |
OLD | NEW |