| 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 #import "chrome/browser/cocoa/html_dialog_window_controller.h" | 5 #import "chrome/browser/cocoa/html_dialog_window_controller.h" |
| 6 | 6 |
| 7 #include "base/keyboard_codes.h" | 7 #include "base/keyboard_codes.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/scoped_nsobject.h" | 9 #include "base/scoped_nsobject.h" |
| 10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
| 11 #import "chrome/browser/cocoa/browser_command_executor.h" | 11 #import "chrome/browser/cocoa/browser_command_executor.h" |
| 12 #import "chrome/browser/cocoa/chrome_event_processing_window.h" | 12 #import "chrome/browser/cocoa/chrome_event_processing_window.h" |
| 13 #include "chrome/browser/dom_ui/html_dialog_ui.h" | 13 #include "chrome/browser/dom_ui/html_dialog_ui.h" |
| 14 #include "chrome/browser/dom_ui/html_dialog_tab_contents_delegate.h" | 14 #include "chrome/browser/dom_ui/html_dialog_tab_contents_delegate.h" |
| 15 #include "chrome/browser/profile.h" | 15 #include "chrome/browser/profile.h" |
| 16 #include "chrome/browser/tab_contents/tab_contents.h" | 16 #include "chrome/browser/tab_contents/tab_contents.h" |
| 17 #include "chrome/common/native_web_keyboard_event.h" |
| 17 #include "gfx/size.h" | 18 #include "gfx/size.h" |
| 18 #include "ipc/ipc_message.h" | 19 #include "ipc/ipc_message.h" |
| 19 | 20 |
| 20 // Thin bridge that routes notifications to | 21 // Thin bridge that routes notifications to |
| 21 // HtmlDialogWindowController's member variables. | 22 // HtmlDialogWindowController's member variables. |
| 22 class HtmlDialogWindowDelegateBridge : public HtmlDialogUIDelegate, | 23 class HtmlDialogWindowDelegateBridge : public HtmlDialogUIDelegate, |
| 23 public HtmlDialogTabContentsDelegate { | 24 public HtmlDialogTabContentsDelegate { |
| 24 public: | 25 public: |
| 25 // All parameters must be non-NULL/non-nil. | 26 // All parameters must be non-NULL/non-nil. |
| 26 HtmlDialogWindowDelegateBridge(HtmlDialogWindowController* controller, | 27 HtmlDialogWindowDelegateBridge(HtmlDialogWindowController* controller, |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 // TODO(akalin): Figure out why implementing (void)cancel:(id)sender | 283 // TODO(akalin): Figure out why implementing (void)cancel:(id)sender |
| 283 // to do the above doesn't work. | 284 // to do the above doesn't work. |
| 284 } | 285 } |
| 285 | 286 |
| 286 - (void)windowWillClose:(NSNotification*)notification { | 287 - (void)windowWillClose:(NSNotification*)notification { |
| 287 delegate_->WindowControllerClosed(); | 288 delegate_->WindowControllerClosed(); |
| 288 [self autorelease]; | 289 [self autorelease]; |
| 289 } | 290 } |
| 290 | 291 |
| 291 @end | 292 @end |
| OLD | NEW |