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

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

Issue 10827341: Factoring out common constants (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More cocoa namespacing. Created 8 years, 4 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 "ui/gfx/size.h" 13 #include "ui/gfx/size.h"
14 14
15 class TabContents; 15 class TabContents;
16 class WebIntentPickerDelegate; 16 class WebIntentPickerDelegate;
17 class WebIntentPickerModel; 17 class WebIntentPickerModel;
18 18
19 namespace content { 19 namespace content {
20 class WebContents; 20 class WebContents;
21 } 21 }
22 22
23 // Base class for the web intent picker dialog. 23 // Base class for the web intent picker dialog.
24 class WebIntentPicker { 24 class WebIntentPicker {
25 public: 25 public:
26 // The width of the window, in view coordinates. The height will be
27 // determined by the content.
28 static const int kWindowWidth = 400;
29
30 // The maximum width in view units of a suggested extension's title link.
31 static const int kTitleLinkMaxWidth = 130;
32
33 // The space in pixels between the top-level groups and the dialog border.
34 static const int kContentAreaBorder = 10;
35
26 // Platform specific factory function. This function will automatically show 36 // Platform specific factory function. This function will automatically show
27 // the picker. 37 // the picker.
28 static WebIntentPicker* Create(TabContents* tab_contents, 38 static WebIntentPicker* Create(TabContents* tab_contents,
29 WebIntentPickerDelegate* delegate, 39 WebIntentPickerDelegate* delegate,
30 WebIntentPickerModel* model); 40 WebIntentPickerModel* model);
31 41
32 // Hides the UI for this picker, and destroys its UI. 42 // Hides the UI for this picker, and destroys its UI.
33 virtual void Close() = 0; 43 virtual void Close() = 0;
34 44
35 // Sets the action string of the picker, e.g., 45 // Sets the action string of the picker, e.g.,
(...skipping 29 matching lines...) Expand all
65 75
66 // Get the star image IDs to use for the nth star (out of 5), given a 76 // Get the star image IDs to use for the nth star (out of 5), given a
67 // |rating| in the range [0, 5]. 77 // |rating| in the range [0, 5].
68 static int GetNthStarImageIdFromCWSRating(double rating, int index); 78 static int GetNthStarImageIdFromCWSRating(double rating, int index);
69 79
70 protected: 80 protected:
71 virtual ~WebIntentPicker() {} 81 virtual ~WebIntentPicker() {}
72 }; 82 };
73 83
74 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_H_ 84 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/web_intent_picker_gtk.cc ('k') | chrome/browser/ui/views/web_intent_picker_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698