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

Side by Side Diff: ui/app_list/search_result.h

Issue 24012002: Move Range code to gfx. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: d Created 7 years, 3 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 | « content/renderer/text_input_client_observer.cc ('k') | ui/base/gtk/gtk_im_context_util.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 UI_APP_LIST_SEARCH_RESULT_H_ 5 #ifndef UI_APP_LIST_SEARCH_RESULT_H_
6 #define UI_APP_LIST_SEARCH_RESULT_H_ 6 #define UI_APP_LIST_SEARCH_RESULT_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/observer_list.h" 11 #include "base/observer_list.h"
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 #include "ui/app_list/app_list_export.h" 13 #include "ui/app_list/app_list_export.h"
14 #include "ui/base/models/list_model.h" 14 #include "ui/base/models/list_model.h"
15 #include "ui/base/range/range.h"
16 #include "ui/gfx/image/image_skia.h" 15 #include "ui/gfx/image/image_skia.h"
16 #include "ui/gfx/range/range.h"
17 17
18 namespace ui { 18 namespace ui {
19 class MenuModel; 19 class MenuModel;
20 } 20 }
21 21
22 namespace app_list { 22 namespace app_list {
23 23
24 class SearchResultObserver; 24 class SearchResultObserver;
25 25
26 // SearchResult consists of an icon, title text and details text. Title and 26 // SearchResult consists of an icon, title text and details text. Title and
(...skipping 11 matching lines...) Expand all
38 MATCH = 1 << 1, 38 MATCH = 1 << 1,
39 DIM = 1 << 2, 39 DIM = 1 << 2,
40 }; 40 };
41 41
42 Tag(int styles, size_t start, size_t end) 42 Tag(int styles, size_t start, size_t end)
43 : styles(styles), 43 : styles(styles),
44 range(start, end) { 44 range(start, end) {
45 } 45 }
46 46
47 int styles; 47 int styles;
48 ui::Range range; 48 gfx::Range range;
49 }; 49 };
50 typedef std::vector<Tag> Tags; 50 typedef std::vector<Tag> Tags;
51 51
52 // Data representing an action that can be performed on this search result. 52 // Data representing an action that can be performed on this search result.
53 // An action could be represented as an icon set or as a blue button with 53 // An action could be represented as an icon set or as a blue button with
54 // a label. Icon set is chosen if label text is empty. Otherwise, a blue 54 // a label. Icon set is chosen if label text is empty. Otherwise, a blue
55 // button with the label text will be used. 55 // button with the label text will be used.
56 struct APP_LIST_EXPORT Action { 56 struct APP_LIST_EXPORT Action {
57 Action(const gfx::ImageSkia& base_image, 57 Action(const gfx::ImageSkia& base_image,
58 const gfx::ImageSkia& hover_image, 58 const gfx::ImageSkia& hover_image,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 int percent_downloaded_; 126 int percent_downloaded_;
127 127
128 ObserverList<SearchResultObserver> observers_; 128 ObserverList<SearchResultObserver> observers_;
129 129
130 DISALLOW_COPY_AND_ASSIGN(SearchResult); 130 DISALLOW_COPY_AND_ASSIGN(SearchResult);
131 }; 131 };
132 132
133 } // namespace app_list 133 } // namespace app_list
134 134
135 #endif // UI_APP_LIST_SEARCH_RESULT_H_ 135 #endif // UI_APP_LIST_SEARCH_RESULT_H_
OLDNEW
« no previous file with comments | « content/renderer/text_input_client_observer.cc ('k') | ui/base/gtk/gtk_im_context_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698