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 "app/keyboard_codes.h" | 7 #include "app/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" |
(...skipping 26 matching lines...) Expand all Loading... |
37 // HtmlDialogUIDelegate declarations. | 37 // HtmlDialogUIDelegate declarations. |
38 virtual bool IsDialogModal() const; | 38 virtual bool IsDialogModal() const; |
39 virtual std::wstring GetDialogTitle() const; | 39 virtual std::wstring GetDialogTitle() const; |
40 virtual GURL GetDialogContentURL() const; | 40 virtual GURL GetDialogContentURL() const; |
41 virtual void GetDOMMessageHandlers( | 41 virtual void GetDOMMessageHandlers( |
42 std::vector<DOMMessageHandler*>* handlers) const; | 42 std::vector<DOMMessageHandler*>* handlers) const; |
43 virtual void GetDialogSize(gfx::Size* size) const; | 43 virtual void GetDialogSize(gfx::Size* size) const; |
44 virtual std::string GetDialogArgs() const; | 44 virtual std::string GetDialogArgs() const; |
45 virtual void OnDialogClosed(const std::string& json_retval); | 45 virtual void OnDialogClosed(const std::string& json_retval); |
46 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog) { } | 46 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog) { } |
| 47 virtual bool ShouldShowDialogTitle() const { return true; } |
47 | 48 |
48 // HtmlDialogTabContentsDelegate declarations. | 49 // HtmlDialogTabContentsDelegate declarations. |
49 virtual void MoveContents(TabContents* source, const gfx::Rect& pos); | 50 virtual void MoveContents(TabContents* source, const gfx::Rect& pos); |
50 virtual void ToolbarSizeChanged(TabContents* source, bool is_animating); | 51 virtual void ToolbarSizeChanged(TabContents* source, bool is_animating); |
51 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); | 52 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); |
52 | 53 |
53 private: | 54 private: |
54 HtmlDialogWindowController* controller_; // weak | 55 HtmlDialogWindowController* controller_; // weak |
55 HtmlDialogUIDelegate* delegate_; // weak, owned by controller_ | 56 HtmlDialogUIDelegate* delegate_; // weak, owned by controller_ |
56 | 57 |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 // TODO(akalin): Figure out why implementing (void)cancel:(id)sender | 284 // TODO(akalin): Figure out why implementing (void)cancel:(id)sender |
284 // to do the above doesn't work. | 285 // to do the above doesn't work. |
285 } | 286 } |
286 | 287 |
287 - (void)windowWillClose:(NSNotification*)notification { | 288 - (void)windowWillClose:(NSNotification*)notification { |
288 delegate_->WindowControllerClosed(); | 289 delegate_->WindowControllerClosed(); |
289 [self autorelease]; | 290 [self autorelease]; |
290 } | 291 } |
291 | 292 |
292 @end | 293 @end |
OLD | NEW |