 Chromium Code Reviews
 Chromium Code Reviews Issue 2871073002:
  cros: Bind hangup red button on remote controller to close web dialog  (Closed)
    
  
    Issue 2871073002:
  cros: Bind hangup red button on remote controller to close web dialog  (Closed) 
  | OLD | NEW | 
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 that can be processed to this dialog. | |
| 
sky
2017/05/11 15:04:11
Returns the accelerators handled by the delegate.
 
Qiang(Joe) Xu
2017/05/12 21:50:45
Done.
 | |
| 142 virtual std::vector<Accelerator> GetAccelerators(); | |
| 143 | |
| 144 // Returns true if |accelerator| pressed is processed, otherwise false. | |
| 
sky
2017/05/11 15:04:11
remove 'pressed'.
 
Qiang(Joe) Xu
2017/05/12 21:50:45
Done.
 | |
| 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_ | 
| OLD | NEW |