OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef ASH_KEYBOARD_OVERLAY_KEYBOARD_OVERLAY_DELEGATE_H_ | |
6 #define ASH_KEYBOARD_OVERLAY_KEYBOARD_OVERLAY_DELEGATE_H_ | |
7 | |
8 #include "base/basictypes.h" | |
9 #include "base/compiler_specific.h" | |
10 #include "googleurl/src/gurl.h" | |
11 #include "ui/web_dialogs/web_dialog_delegate.h" | |
12 | |
13 namespace views { | |
14 class WebDialogView; | |
15 } | |
16 | |
17 class KeyboardOverlayDelegate : public ui::WebDialogDelegate { | |
18 public: | |
19 KeyboardOverlayDelegate(const string16& title, const GURL& url); | |
20 | |
21 void Show(views::WebDialogView* view); | |
22 | |
23 // Overridden from ui::WebDialogDelegate: | |
24 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE; | |
25 | |
26 private: | |
27 virtual ~KeyboardOverlayDelegate(); | |
28 | |
29 // Overridden from ui::WebDialogDelegate: | |
30 virtual ui::ModalType GetDialogModalType() const OVERRIDE; | |
31 virtual string16 GetDialogTitle() const OVERRIDE; | |
32 virtual GURL GetDialogContentURL() const OVERRIDE; | |
33 virtual void GetWebUIMessageHandlers( | |
34 std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE; | |
35 virtual std::string GetDialogArgs() const OVERRIDE; | |
36 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE; | |
37 virtual void OnCloseContents(content::WebContents* source, | |
38 bool* out_close_dialog) OVERRIDE; | |
39 virtual bool ShouldShowDialogTitle() const OVERRIDE; | |
40 virtual bool HandleContextMenu( | |
41 const content::ContextMenuParams& params) OVERRIDE; | |
42 | |
43 // The dialog title. | |
44 string16 title_; | |
45 | |
46 // The URL of the keyboard overlay. | |
47 GURL url_; | |
48 | |
49 // The view associated with this delegate. | |
50 // This class does not own the pointer. | |
51 views::WebDialogView* view_; | |
52 | |
53 DISALLOW_COPY_AND_ASSIGN(KeyboardOverlayDelegate); | |
54 }; | |
55 | |
56 #endif // ASH_KEYBOARD_OVERLAY_KEYBOARD_OVERLAY_DELEGATE_H_ | |
OLD | NEW |