Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: ui/web_dialogs/web_dialog_delegate.h

Issue 2871073002: cros: Bind hangup red button on remote controller to close web dialog (Closed)
Patch Set: nits Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/views/test/widget_test.cc ('k') | ui/web_dialogs/web_dialog_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 UI_WEB_DIALOGS_WEB_DIALOG_DELEGATE_H_ 5 #ifndef UI_WEB_DIALOGS_WEB_DIALOG_DELEGATE_H_
6 #define UI_WEB_DIALOGS_WEB_DIALOG_DELEGATE_H_ 6 #define UI_WEB_DIALOGS_WEB_DIALOG_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 13 matching lines...) Expand all
24 struct ContextMenuParams; 24 struct ContextMenuParams;
25 struct OpenURLParams; 25 struct OpenURLParams;
26 } 26 }
27 27
28 namespace gfx { 28 namespace gfx {
29 class Rect; 29 class Rect;
30 class Size; 30 class Size;
31 } 31 }
32 32
33 namespace ui { 33 namespace ui {
34 class Accelerator;
34 35
35 // Implement this class to receive notifications. 36 // Implement this class to receive notifications.
36 class WEB_DIALOGS_EXPORT WebDialogDelegate { 37 class WEB_DIALOGS_EXPORT WebDialogDelegate {
37 public: 38 public:
38 // Returns true if the contents needs to be run in a modal dialog. 39 // Returns true if the contents needs to be run in a modal dialog.
39 virtual ModalType GetDialogModalType() const = 0; 40 virtual ModalType GetDialogModalType() const = 0;
40 41
41 // Returns the title of the dialog. 42 // Returns the title of the dialog.
42 virtual base::string16 GetDialogTitle() const = 0; 43 virtual base::string16 GetDialogTitle() const = 0;
43 44
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 const gfx::Rect& initial_rect, 131 const gfx::Rect& initial_rect,
131 bool user_gesture); 132 bool user_gesture);
132 133
133 // A callback to control whether a WebContents will be created. Returns 134 // A callback to control whether a WebContents will be created. Returns
134 // false to disallow the creation. Return true to use the default handler. 135 // false to disallow the creation. Return true to use the default handler.
135 virtual bool HandleShouldCreateWebContents(); 136 virtual bool HandleShouldCreateWebContents();
136 137
137 // Stores the dialog bounds. 138 // Stores the dialog bounds.
138 virtual void StoreDialogSize(const gfx::Size& dialog_size) {} 139 virtual void StoreDialogSize(const gfx::Size& dialog_size) {}
139 140
141 // Returns the accelerators handled by the delegate.
142 virtual std::vector<Accelerator> GetAccelerators();
143
144 // Returns true if |accelerator| is processed, otherwise false.
145 virtual bool AcceleratorPressed(const Accelerator& accelerator);
146
140 virtual ~WebDialogDelegate() {} 147 virtual ~WebDialogDelegate() {}
141 }; 148 };
142 149
143 } // namespace ui 150 } // namespace ui
144 151
145 #endif // UI_WEB_DIALOGS_WEB_DIALOG_DELEGATE_H_ 152 #endif // UI_WEB_DIALOGS_WEB_DIALOG_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/views/test/widget_test.cc ('k') | ui/web_dialogs/web_dialog_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698