OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_BROWSER_VIEWS_HTML_DIALOG_VIEW_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_HTML_DIALOG_VIEW_H_ |
6 #define CHROME_BROWSER_VIEWS_HTML_DIALOG_VIEW_H_ | 6 #define CHROME_BROWSER_VIEWS_HTML_DIALOG_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 virtual gfx::Size GetPreferredSize(); | 48 virtual gfx::Size GetPreferredSize(); |
49 virtual bool AcceleratorPressed(const views::Accelerator& accelerator); | 49 virtual bool AcceleratorPressed(const views::Accelerator& accelerator); |
50 | 50 |
51 // Overridden from views::WindowDelegate: | 51 // Overridden from views::WindowDelegate: |
52 virtual bool CanResize() const; | 52 virtual bool CanResize() const; |
53 virtual bool IsModal() const; | 53 virtual bool IsModal() const; |
54 virtual std::wstring GetWindowTitle() const; | 54 virtual std::wstring GetWindowTitle() const; |
55 virtual void WindowClosing(); | 55 virtual void WindowClosing(); |
56 virtual views::View* GetContentsView(); | 56 virtual views::View* GetContentsView(); |
57 virtual views::View* GetInitiallyFocusedView(); | 57 virtual views::View* GetInitiallyFocusedView(); |
| 58 virtual bool ShouldShowWindowTitle() const; |
58 | 59 |
59 // Overridden from HtmlDialogUIDelegate: | 60 // Overridden from HtmlDialogUIDelegate: |
60 virtual bool IsDialogModal() const; | 61 virtual bool IsDialogModal() const; |
61 virtual std::wstring GetDialogTitle() const; | 62 virtual std::wstring GetDialogTitle() const; |
62 virtual GURL GetDialogContentURL() const; | 63 virtual GURL GetDialogContentURL() const; |
63 virtual void GetDOMMessageHandlers( | 64 virtual void GetDOMMessageHandlers( |
64 std::vector<DOMMessageHandler*>* handlers) const; | 65 std::vector<DOMMessageHandler*>* handlers) const; |
65 virtual void GetDialogSize(gfx::Size* size) const; | 66 virtual void GetDialogSize(gfx::Size* size) const; |
66 virtual std::string GetDialogArgs() const; | 67 virtual std::string GetDialogArgs() const; |
67 virtual void OnDialogClosed(const std::string& json_retval); | 68 virtual void OnDialogClosed(const std::string& json_retval); |
68 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog); | 69 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog); |
| 70 virtual bool ShouldShowDialogTitle() const; |
69 | 71 |
70 // Overridden from TabContentsDelegate: | 72 // Overridden from TabContentsDelegate: |
71 virtual void MoveContents(TabContents* source, const gfx::Rect& pos); | 73 virtual void MoveContents(TabContents* source, const gfx::Rect& pos); |
72 virtual void ToolbarSizeChanged(TabContents* source, bool is_animating); | 74 virtual void ToolbarSizeChanged(TabContents* source, bool is_animating); |
73 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); | 75 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); |
74 virtual void CloseContents(TabContents* source); | 76 virtual void CloseContents(TabContents* source); |
75 | 77 |
76 private: | 78 private: |
77 // This view is a delegate to the HTML content since it needs to get notified | 79 // This view is a delegate to the HTML content since it needs to get notified |
78 // about when the dialog is closing. For all other actions (besides dialog | 80 // about when the dialog is closing. For all other actions (besides dialog |
79 // closing) we delegate to the creator of this view, which we keep track of | 81 // closing) we delegate to the creator of this view, which we keep track of |
80 // using this variable. | 82 // using this variable. |
81 HtmlDialogUIDelegate* delegate_; | 83 HtmlDialogUIDelegate* delegate_; |
82 | 84 |
83 DISALLOW_COPY_AND_ASSIGN(HtmlDialogView); | 85 DISALLOW_COPY_AND_ASSIGN(HtmlDialogView); |
84 }; | 86 }; |
85 | 87 |
86 #endif // CHROME_BROWSER_VIEWS_HTML_DIALOG_VIEW_H_ | 88 #endif // CHROME_BROWSER_VIEWS_HTML_DIALOG_VIEW_H_ |
OLD | NEW |