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

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

Issue 11035017: Mac Web Intents Part 15: Inline extension install prompt (model) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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_H_ 5 #ifndef CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_H_
6 #define CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_H_ 6 #define CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/string16.h" 12 #include "base/string16.h"
13 #include "chrome/browser/extensions/extension_install_prompt.h"
13 #include "ui/gfx/size.h" 14 #include "ui/gfx/size.h"
14 15
15 class WebIntentPickerDelegate; 16 class WebIntentPickerDelegate;
16 class WebIntentPickerModel; 17 class WebIntentPickerModel;
17 18
18 namespace content { 19 namespace content {
19 struct NativeWebKeyboardEvent; 20 struct NativeWebKeyboardEvent;
20 class WebContents; 21 class WebContents;
21 } 22 }
22 23
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // Sets the action string of the picker, e.g., 77 // Sets the action string of the picker, e.g.,
77 // "Which service should be used for sharing?". 78 // "Which service should be used for sharing?".
78 virtual void SetActionString(const string16& action) = 0; 79 virtual void SetActionString(const string16& action) = 0;
79 80
80 // Called when an extension is successfully installed via the picker. 81 // Called when an extension is successfully installed via the picker.
81 virtual void OnExtensionInstallSuccess(const std::string& id) = 0; 82 virtual void OnExtensionInstallSuccess(const std::string& id) = 0;
82 83
83 // Called when an extension installation started via the picker has failed. 84 // Called when an extension installation started via the picker has failed.
84 virtual void OnExtensionInstallFailure(const std::string& id) = 0; 85 virtual void OnExtensionInstallFailure(const std::string& id) = 0;
85 86
87 // Shows the default extension install dialog. Override this to show a custom
88 // dialog.
89 virtual void OnShowExtensionInstallDialog(
90 gfx::NativeWindow parent,
91 content::PageNavigator* navigator,
92 ExtensionInstallPrompt::Delegate* delegate,
93 const ExtensionInstallPrompt::Prompt& prompt);
94
86 // Called when the inline disposition experiences an auto-resize. 95 // Called when the inline disposition experiences an auto-resize.
87 virtual void OnInlineDispositionAutoResize(const gfx::Size& size) = 0; 96 virtual void OnInlineDispositionAutoResize(const gfx::Size& size) = 0;
88 97
89 virtual void OnInlineDispositionHandleKeyboardEvent( 98 virtual void OnInlineDispositionHandleKeyboardEvent(
90 const content::NativeWebKeyboardEvent& event) {} 99 const content::NativeWebKeyboardEvent& event) {}
91 100
92 // Called when the controller has finished all pending asynchronous 101 // Called when the controller has finished all pending asynchronous
93 // activities. 102 // activities.
94 virtual void OnPendingAsyncCompleted() = 0; 103 virtual void OnPendingAsyncCompleted() = 0;
95 104
(...skipping 12 matching lines...) Expand all
108 static int GetNthStarImageIdFromCWSRating(double rating, int index); 117 static int GetNthStarImageIdFromCWSRating(double rating, int index);
109 118
110 // Returns the action-specific string to display for |action|. 119 // Returns the action-specific string to display for |action|.
111 static string16 GetDisplayStringForIntentAction(const string16& action16); 120 static string16 GetDisplayStringForIntentAction(const string16& action16);
112 121
113 protected: 122 protected:
114 virtual ~WebIntentPicker() {} 123 virtual ~WebIntentPicker() {}
115 }; 124 };
116 125
117 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_H_ 126 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698