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 CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_CONTROLLER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
50 | 50 |
51 // Sets the intent data and return pathway handler object for which | 51 // Sets the intent data and return pathway handler object for which |
52 // this picker was created. The picker takes ownership of | 52 // this picker was created. The picker takes ownership of |
53 // |intents_dispatcher|. |intents_dispatcher| must not be NULL. | 53 // |intents_dispatcher|. |intents_dispatcher| must not be NULL. |
54 void SetIntentsDispatcher(content::WebIntentsDispatcher* intents_dispatcher); | 54 void SetIntentsDispatcher(content::WebIntentsDispatcher* intents_dispatcher); |
55 | 55 |
56 // Shows the web intent picker given the intent |action| and MIME-type |type|. | 56 // Shows the web intent picker given the intent |action| and MIME-type |type|. |
57 void ShowDialog(const string16& action, | 57 void ShowDialog(const string16& action, |
58 const string16& type); | 58 const string16& type); |
59 | 59 |
60 // Called by the location bar to see whether the web intents picker affordance | |
61 // should be shown. TODO(gbillock): refactor this into a | |
62 // LocationBarPageToolModel. | |
63 bool ShowLocationBarPickerTool(); | |
Bernhard Bauer
2012/07/24 20:37:03
Name this "ShouldShow..."? If you're starting with
| |
64 | |
60 protected: | 65 protected: |
61 // content::NotificationObserver implementation. | 66 // content::NotificationObserver implementation. |
62 virtual void Observe(int type, | 67 virtual void Observe(int type, |
63 const content::NotificationSource& source, | 68 const content::NotificationSource& source, |
64 const content::NotificationDetails& details) OVERRIDE; | 69 const content::NotificationDetails& details) OVERRIDE; |
65 | 70 |
66 // WebIntentPickerDelegate implementation. | 71 // WebIntentPickerDelegate implementation. |
67 virtual void OnServiceChosen(const GURL& url, | 72 virtual void OnServiceChosen(const GURL& url, |
68 Disposition disposition) OVERRIDE; | 73 Disposition disposition) OVERRIDE; |
69 virtual void OnInlineDispositionWebContentsCreated( | 74 virtual void OnInlineDispositionWebContentsCreated( |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
200 | 205 |
201 // Request consumer used when asynchronously loading favicons. | 206 // Request consumer used when asynchronously loading favicons. |
202 CancelableRequestConsumerTSimple<size_t> favicon_consumer_; | 207 CancelableRequestConsumerTSimple<size_t> favicon_consumer_; |
203 | 208 |
204 base::WeakPtrFactory<WebIntentPickerController> weak_ptr_factory_; | 209 base::WeakPtrFactory<WebIntentPickerController> weak_ptr_factory_; |
205 | 210 |
206 DISALLOW_COPY_AND_ASSIGN(WebIntentPickerController); | 211 DISALLOW_COPY_AND_ASSIGN(WebIntentPickerController); |
207 }; | 212 }; |
208 | 213 |
209 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_CONTROLLER_H_ | 214 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_CONTROLLER_H_ |
OLD | NEW |