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

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

Issue 9649020: [Web Intents] WebIntentPickerModel uses URL instead of index to reference registered services. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mac fix Created 8 years, 9 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 | Annotate | Revision Log
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_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_DELEGATE_H_
6 #define CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/ui/intents/web_intent_picker_model.h" 9 #include "chrome/browser/ui/intents/web_intent_picker_model.h"
10 10
11 namespace content { 11 namespace content {
12 class WebContents; 12 class WebContents;
13 } 13 }
14 14
15 // A class used to notify the delegate when the user has chosen a web intent 15 // A class used to notify the delegate when the user has chosen a web intent
16 // service. 16 // service.
17 class WebIntentPickerDelegate { 17 class WebIntentPickerDelegate {
18 public: 18 public:
19 typedef WebIntentPickerModel::Disposition Disposition; 19 typedef WebIntentPickerModel::Disposition Disposition;
20 20
21 // Base destructor. 21 // Base destructor.
22 virtual ~WebIntentPickerDelegate() {} 22 virtual ~WebIntentPickerDelegate() {}
23 23
24 // Called when the user has chosen a service. 24 // Called when the user has chosen a service.
25 virtual void OnServiceChosen(size_t index, Disposition disposition) = 0; 25 virtual void OnServiceChosen(const GURL& url, Disposition disposition) = 0;
26 26
27 // Called when the picker has created WebContents to use for inline 27 // Called when the picker has created WebContents to use for inline
28 // disposition. 28 // disposition.
29 virtual void OnInlineDispositionWebContentsCreated( 29 virtual void OnInlineDispositionWebContentsCreated(
30 content::WebContents* web_contents) = 0; 30 content::WebContents* web_contents) = 0;
31 31
32 // Called when the user cancels out of the dialog, whether by closing it 32 // Called when the user cancels out of the dialog, whether by closing it
33 // manually or otherwise purposefully. 33 // manually or otherwise purposefully.
34 virtual void OnCancelled() = 0; 34 virtual void OnCancelled() = 0;
35 35
36 // Called when the dialog stops showing. 36 // Called when the dialog stops showing.
37 virtual void OnClosing() = 0; 37 virtual void OnClosing() = 0;
38 }; 38 };
39 39
40 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_DELEGATE_H_ 40 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698