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

Side by Side Diff: chrome/browser/ui/intents/web_intent_picker_controller.h

Issue 10703142: Move WebstoreInstaller, WebstoreInlineInstaller, related in extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest merge with master for cq Created 8 years, 5 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
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 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 22 matching lines...) Expand all
33 class WebContents; 33 class WebContents;
34 class WebIntentsDispatcher; 34 class WebIntentsDispatcher;
35 } 35 }
36 36
37 namespace webkit_glue { 37 namespace webkit_glue {
38 struct WebIntentServiceData; 38 struct WebIntentServiceData;
39 } 39 }
40 40
41 // Controls the creation of the WebIntentPicker UI and forwards the user's 41 // Controls the creation of the WebIntentPicker UI and forwards the user's
42 // intent handler choice back to the WebContents object. 42 // intent handler choice back to the WebContents object.
43 class WebIntentPickerController : public content::NotificationObserver, 43 class WebIntentPickerController
44 public WebIntentPickerDelegate, 44 : public content::NotificationObserver,
45 public WebstoreInstaller::Delegate { 45 public WebIntentPickerDelegate,
46 public extensions::WebstoreInstaller::Delegate {
46 public: 47 public:
47 explicit WebIntentPickerController(TabContents* tab_contents); 48 explicit WebIntentPickerController(TabContents* tab_contents);
48 virtual ~WebIntentPickerController(); 49 virtual ~WebIntentPickerController();
49 50
50 // Sets the intent data and return pathway handler object for which 51 // Sets the intent data and return pathway handler object for which
51 // this picker was created. The picker takes ownership of 52 // this picker was created. The picker takes ownership of
52 // |intents_dispatcher|. |intents_dispatcher| must not be NULL. 53 // |intents_dispatcher|. |intents_dispatcher| must not be NULL.
53 void SetIntentsDispatcher(content::WebIntentsDispatcher* intents_dispatcher); 54 void SetIntentsDispatcher(content::WebIntentsDispatcher* intents_dispatcher);
54 55
55 // 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|.
(...skipping 11 matching lines...) Expand all
67 Disposition disposition) OVERRIDE; 68 Disposition disposition) OVERRIDE;
68 virtual void OnInlineDispositionWebContentsCreated( 69 virtual void OnInlineDispositionWebContentsCreated(
69 content::WebContents* web_contents) OVERRIDE; 70 content::WebContents* web_contents) OVERRIDE;
70 virtual void OnExtensionInstallRequested(const std::string& id) OVERRIDE; 71 virtual void OnExtensionInstallRequested(const std::string& id) OVERRIDE;
71 virtual void OnExtensionLinkClicked(const std::string& id) OVERRIDE; 72 virtual void OnExtensionLinkClicked(const std::string& id) OVERRIDE;
72 virtual void OnSuggestionsLinkClicked() OVERRIDE; 73 virtual void OnSuggestionsLinkClicked() OVERRIDE;
73 virtual void OnPickerClosed() OVERRIDE; 74 virtual void OnPickerClosed() OVERRIDE;
74 virtual void OnChooseAnotherService() OVERRIDE; 75 virtual void OnChooseAnotherService() OVERRIDE;
75 virtual void OnClosing() OVERRIDE; 76 virtual void OnClosing() OVERRIDE;
76 77
77 // WebstoreInstaller::Delegate implementation. 78 // extensions::WebstoreInstaller::Delegate implementation.
78 virtual void OnExtensionInstallSuccess(const std::string& id) OVERRIDE; 79 virtual void OnExtensionInstallSuccess(const std::string& id) OVERRIDE;
79 virtual void OnExtensionInstallFailure(const std::string& id, 80 virtual void OnExtensionInstallFailure(const std::string& id,
80 const std::string& error) OVERRIDE; 81 const std::string& error) OVERRIDE;
81 82
82 private: 83 private:
83 friend class WebIntentPickerControllerTest; 84 friend class WebIntentPickerControllerTest;
84 friend class WebIntentPickerControllerBrowserTest; 85 friend class WebIntentPickerControllerBrowserTest;
85 friend class WebIntentPickerControllerIncognitoBrowserTest; 86 friend class WebIntentPickerControllerIncognitoBrowserTest;
86 friend class InvokingTabObserver; 87 friend class InvokingTabObserver;
87 88
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 200
200 // Request consumer used when asynchronously loading favicons. 201 // Request consumer used when asynchronously loading favicons.
201 CancelableRequestConsumerTSimple<size_t> favicon_consumer_; 202 CancelableRequestConsumerTSimple<size_t> favicon_consumer_;
202 203
203 base::WeakPtrFactory<WebIntentPickerController> weak_ptr_factory_; 204 base::WeakPtrFactory<WebIntentPickerController> weak_ptr_factory_;
204 205
205 DISALLOW_COPY_AND_ASSIGN(WebIntentPickerController); 206 DISALLOW_COPY_AND_ASSIGN(WebIntentPickerController);
206 }; 207 };
207 208
208 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_CONTROLLER_H_ 209 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/webstore_installer.cc ('k') | chrome/browser/ui/intents/web_intent_picker_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698