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

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

Issue 8934011: Rename IntentsHost -> WebIntentsDispatcher and IntentsDispatcher -> WebIntentsHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/intents/web_intent_picker_controller.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) 2011 The Chromium Authors. All rights reserved. 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 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 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/string16.h" 13 #include "base/string16.h"
14 #include "chrome/browser/ui/intents/web_intent_picker_delegate.h" 14 #include "chrome/browser/ui/intents/web_intent_picker_delegate.h"
15 #include "content/public/browser/notification_observer.h" 15 #include "content/public/browser/notification_observer.h"
16 #include "content/public/browser/notification_registrar.h" 16 #include "content/public/browser/notification_registrar.h"
17 #include "webkit/glue/web_intent_data.h" 17 #include "webkit/glue/web_intent_data.h"
18 18
19 class Browser; 19 class Browser;
20 class GURL; 20 class GURL;
21 class SkBitmap; 21 class SkBitmap;
22 class TabContents; 22 class TabContents;
23 class TabContentsWrapper; 23 class TabContentsWrapper;
24 class WebIntentPicker; 24 class WebIntentPicker;
25 class WebIntentPickerFactory; 25 class WebIntentPickerFactory;
26 26
27 namespace content { 27 namespace content {
28 class IntentsHost; 28 class WebIntentsDispatcher;
29 } 29 }
30 30
31 namespace webkit_glue { 31 namespace webkit_glue {
32 struct WebIntentServiceData; 32 struct WebIntentServiceData;
33 } 33 }
34 34
35 // Controls the creation of the WebIntentPicker UI and forwards the user's 35 // Controls the creation of the WebIntentPicker UI and forwards the user's
36 // intent handler choice back to the TabContents object. 36 // intent handler choice back to the TabContents object.
37 class WebIntentPickerController : public content::NotificationObserver, 37 class WebIntentPickerController : public content::NotificationObserver,
38 public WebIntentPickerDelegate { 38 public WebIntentPickerDelegate {
39 public: 39 public:
40 // Takes ownership of |factory|. 40 // Takes ownership of |factory|.
41 WebIntentPickerController(TabContentsWrapper* wrapper, 41 WebIntentPickerController(TabContentsWrapper* wrapper,
42 WebIntentPickerFactory* factory); 42 WebIntentPickerFactory* factory);
43 virtual ~WebIntentPickerController(); 43 virtual ~WebIntentPickerController();
44 44
45 // Sets the intent data and return pathway handler object for which 45 // Sets the intent data and return pathway handler object for which
46 // this picker was created. The picker takes ownership of |intents_host|. 46 // this picker was created. The picker takes ownership of
47 // |intents_host| must not be NULL. 47 // |intents_dispatcher|. |intents_dispatcher| must not be NULL.
48 void SetIntentsHost(content::IntentsHost* intents_host); 48 void SetIntentsDispatcher(content::WebIntentsDispatcher* intents_dispatcher);
49 49
50 // Shows the web intent picker for |browser|, given the intent 50 // Shows the web intent picker for |browser|, given the intent
51 // |action| and MIME-type |type|. 51 // |action| and MIME-type |type|.
52 void ShowDialog(Browser* browser, 52 void ShowDialog(Browser* browser,
53 const string16& action, 53 const string16& action,
54 const string16& type); 54 const string16& type);
55 55
56 protected: 56 protected:
57 // content::NotificationObserver implementation. 57 // content::NotificationObserver implementation.
58 virtual void Observe(int type, 58 virtual void Observe(int type,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 std::vector<GURL> urls_; 113 std::vector<GURL> urls_;
114 114
115 // A list of the service data on display in the UI. 115 // A list of the service data on display in the UI.
116 std::vector<webkit_glue::WebIntentServiceData> service_data_; 116 std::vector<webkit_glue::WebIntentServiceData> service_data_;
117 117
118 // A count of the outstanding asynchronous calls. 118 // A count of the outstanding asynchronous calls.
119 int pending_async_count_; 119 int pending_async_count_;
120 120
121 // The routing object for the renderer which launched the intent. 121 // The routing object for the renderer which launched the intent.
122 // Contains the intent data and a way to signal back to the client page. 122 // Contains the intent data and a way to signal back to the client page.
123 scoped_ptr<content::IntentsHost> intents_host_; 123 scoped_ptr<content::WebIntentsDispatcher> intents_dispatcher_;
124 124
125 // Weak pointer to the tab servicing the intent. Remembered in order to 125 // Weak pointer to the tab servicing the intent. Remembered in order to
126 // close it when a reply is sent. 126 // close it when a reply is sent.
127 TabContents* service_tab_; 127 TabContents* service_tab_;
128 128
129 DISALLOW_COPY_AND_ASSIGN(WebIntentPickerController); 129 DISALLOW_COPY_AND_ASSIGN(WebIntentPickerController);
130 }; 130 };
131 131
132 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_CONTROLLER_H_ 132 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.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