OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 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 CHROME_BROWSER_UI_INTENTS_WEB_INTENT_CONSTRAINED_DIALOG_FACTORY_H_ | |
6 #define CHROME_BROWSER_UI_INTENTS_WEB_INTENT_CONSTRAINED_DIALOG_FACTORY_H_ | |
7 #pragma once | |
8 | |
9 #include "base/basictypes.h" | |
10 #include "base/compiler_specific.h" | |
11 #include "chrome/browser/ui/intents/web_intent_picker_factory.h" | |
12 | |
13 class TabContents; | |
14 class WebIntentPickerDelegate; | |
15 | |
16 // A factory for creating a constrained dialog as the intent picker UI for a | |
17 // given TabContents. | |
18 class WebIntentConstrainedDialogFactory : public WebIntentPickerFactory { | |
19 public: | |
20 WebIntentConstrainedDialogFactory(); | |
21 virtual ~WebIntentConstrainedDialogFactory(); | |
22 | |
23 // WebIntentPickerFactory implementation. | |
24 virtual WebIntentPicker* Create( | |
25 TabContents* tab_contents, | |
26 WebIntentPickerDelegate* delegate) OVERRIDE; | |
27 virtual void ClosePicker(WebIntentPicker* picker) OVERRIDE; | |
28 | |
29 private: | |
30 // Closes the dialog and destroys it. | |
31 void CloseDialog(); | |
32 | |
33 // A weak pointer to the currently active picker, or NULL if there is no | |
34 // active picker. | |
35 WebIntentPicker* picker_; | |
36 | |
37 DISALLOW_COPY_AND_ASSIGN(WebIntentConstrainedDialogFactory); | |
38 }; | |
39 | |
40 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_CONSTRAINED_DIALOG_FACTORY_H_ | |
OLD | NEW |