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

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: fix merge 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
« no previous file with comments | « no previous file | chrome/browser/ui/intents/web_intent_picker.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) 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. We *MUST* eventually call either Proceed() or Abort() on
89 // |delegate|.
90 virtual void OnShowExtensionInstallDialog(
91 gfx::NativeWindow parent,
92 content::PageNavigator* navigator,
93 ExtensionInstallPrompt::Delegate* delegate,
94 const ExtensionInstallPrompt::Prompt& prompt);
95
86 // Called when the inline disposition experiences an auto-resize. 96 // Called when the inline disposition experiences an auto-resize.
87 virtual void OnInlineDispositionAutoResize(const gfx::Size& size) = 0; 97 virtual void OnInlineDispositionAutoResize(const gfx::Size& size) = 0;
88 98
89 virtual void OnInlineDispositionHandleKeyboardEvent( 99 virtual void OnInlineDispositionHandleKeyboardEvent(
90 const content::NativeWebKeyboardEvent& event) {} 100 const content::NativeWebKeyboardEvent& event) {}
91 101
92 // Called when the controller has finished all pending asynchronous 102 // Called when the controller has finished all pending asynchronous
93 // activities. 103 // activities.
94 virtual void OnPendingAsyncCompleted() = 0; 104 virtual void OnPendingAsyncCompleted() = 0;
95 105
(...skipping 12 matching lines...) Expand all
108 static int GetNthStarImageIdFromCWSRating(double rating, int index); 118 static int GetNthStarImageIdFromCWSRating(double rating, int index);
109 119
110 // Returns the action-specific string to display for |action|. 120 // Returns the action-specific string to display for |action|.
111 static string16 GetDisplayStringForIntentAction(const string16& action16); 121 static string16 GetDisplayStringForIntentAction(const string16& action16);
112 122
113 protected: 123 protected:
114 virtual ~WebIntentPicker() {} 124 virtual ~WebIntentPicker() {}
115 }; 125 };
116 126
117 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_H_ 127 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/intents/web_intent_picker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698