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

Side by Side Diff: chrome/browser/views/about_chrome_view.h

Issue 440008: Show chromium os version in about panel (Closed)
Patch Set: Fix newline Created 11 years, 1 month 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_VIEWS_ABOUT_CHROME_VIEW_H_ 5 #ifndef CHROME_BROWSER_VIEWS_ABOUT_CHROME_VIEW_H_
6 #define CHROME_BROWSER_VIEWS_ABOUT_CHROME_VIEW_H_ 6 #define CHROME_BROWSER_VIEWS_ABOUT_CHROME_VIEW_H_
7 7
8 #include "views/controls/image_view.h" 8 #include "views/controls/image_view.h"
9 #include "views/controls/label.h" 9 #include "views/controls/label.h"
10 #include "views/controls/link.h" 10 #include "views/controls/link.h"
11 #include "views/view.h" 11 #include "views/view.h"
12 #include "views/window/dialog_delegate.h" 12 #include "views/window/dialog_delegate.h"
13 13
14 #if defined(OS_WIN) 14 #if defined(OS_WIN)
15 #include "chrome/browser/google_update.h" 15 #include "chrome/browser/google_update.h"
16 #endif 16 #endif
sky 2009/11/24 18:46:57 How about #else if instead of another #if.
17 17
18 #if defined(OS_CHROMEOS)
19 #include "chrome/browser/chromeos/version_loader.h"
20 #endif
21
18 namespace views { 22 namespace views {
19 class Textfield; 23 class Textfield;
20 class Throbber; 24 class Throbber;
21 class Window; 25 class Window;
22 } 26 }
23 27
24 class Profile; 28 class Profile;
25 29
26 //////////////////////////////////////////////////////////////////////////////// 30 ////////////////////////////////////////////////////////////////////////////////
27 // 31 //
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 CHECKBUTTON_DISABLED, 89 CHECKBUTTON_DISABLED,
86 CHECKBUTTON_ENABLED, 90 CHECKBUTTON_ENABLED,
87 }; 91 };
88 92
89 #if defined(OS_WIN) 93 #if defined(OS_WIN)
90 // Update the UI to show the status of the upgrade. 94 // Update the UI to show the status of the upgrade.
91 void UpdateStatus(GoogleUpdateUpgradeResult result, 95 void UpdateStatus(GoogleUpdateUpgradeResult result,
92 GoogleUpdateErrorCode error_code); 96 GoogleUpdateErrorCode error_code);
93 #endif 97 #endif
94 98
99 #if defined(OS_CHROMEOS)
100 // Callback from chromeos::VersionLoader giving the version.
101 void OnOSVersion(chromeos::VersionLoader::Handle handle,
102 std::string version);
103 #endif
104
95 // Draws a string onto the canvas (wrapping if needed) while also keeping 105 // Draws a string onto the canvas (wrapping if needed) while also keeping
96 // track of where it ends so we can position a URL after the text. The 106 // track of where it ends so we can position a URL after the text. The
97 // parameter |bounds| represents the boundary we have to work with, |position| 107 // parameter |bounds| represents the boundary we have to work with, |position|
98 // specifies where to draw the string (relative to the top left corner of the 108 // specifies where to draw the string (relative to the top left corner of the
99 // |bounds| rectangle and |font| specifies the font to use when drawing. When 109 // |bounds| rectangle and |font| specifies the font to use when drawing. When
100 // the function returns, the parameter |rect| contains where to draw the URL 110 // the function returns, the parameter |rect| contains where to draw the URL
101 // (to the right of where we just drew the text) and |position| is updated to 111 // (to the right of where we just drew the text) and |position| is updated to
102 // reflect where to draw the next string after the URL. 112 // reflect where to draw the next string after the URL.
103 // NOTE: The reason why we need this function is because while Skia knows how 113 // NOTE: The reason why we need this function is because while Skia knows how
104 // to wrap text appropriately, it doesn't tell us where it drew the last 114 // to wrap text appropriately, it doesn't tell us where it drew the last
(...skipping 25 matching lines...) Expand all
130 int font_height, 140 int font_height,
131 gfx::Size* position, 141 gfx::Size* position,
132 const gfx::Rect& bounds); 142 const gfx::Rect& bounds);
133 143
134 Profile* profile_; 144 Profile* profile_;
135 145
136 // UI elements on the dialog. 146 // UI elements on the dialog.
137 views::ImageView* about_dlg_background_logo_; 147 views::ImageView* about_dlg_background_logo_;
138 views::Label* about_title_label_; 148 views::Label* about_title_label_;
139 views::Textfield* version_label_; 149 views::Textfield* version_label_;
150 #if defined(OS_CHROMEOS)
151 views::Textfield* os_version_label_;
152 #endif
140 views::Label* copyright_label_; 153 views::Label* copyright_label_;
141 views::Label* main_text_label_; 154 views::Label* main_text_label_;
142 int main_text_label_height_; 155 int main_text_label_height_;
143 views::Link* chromium_url_; 156 views::Link* chromium_url_;
144 gfx::Rect chromium_url_rect_; 157 gfx::Rect chromium_url_rect_;
145 views::Link* open_source_url_; 158 views::Link* open_source_url_;
146 gfx::Rect open_source_url_rect_; 159 gfx::Rect open_source_url_rect_;
147 views::Link* terms_of_service_url_; 160 views::Link* terms_of_service_url_;
148 gfx::Rect terms_of_service_url_rect_; 161 gfx::Rect terms_of_service_url_rect_;
149 // UI elements we add to the parent view. 162 // UI elements we add to the parent view.
(...skipping 28 matching lines...) Expand all
178 191
179 // Our current version. 192 // Our current version.
180 std::wstring current_version_; 193 std::wstring current_version_;
181 194
182 // The version Google Update reports is available to us. 195 // The version Google Update reports is available to us.
183 std::wstring new_version_available_; 196 std::wstring new_version_available_;
184 197
185 // Whether text direction is left-to-right or right-to-left. 198 // Whether text direction is left-to-right or right-to-left.
186 bool text_direction_is_rtl_; 199 bool text_direction_is_rtl_;
187 200
201 #if defined(OS_CHROMEOS)
202 // Handles asynchronously loading the version.
203 chromeos::VersionLoader loader_;
204
205 // Used to request the version.
206 CancelableRequestConsumer consumer_;
207 #endif
208
188 DISALLOW_COPY_AND_ASSIGN(AboutChromeView); 209 DISALLOW_COPY_AND_ASSIGN(AboutChromeView);
189 }; 210 };
190 211
191 #endif // CHROME_BROWSER_VIEWS_ABOUT_CHROME_VIEW_H_ 212 #endif // CHROME_BROWSER_VIEWS_ABOUT_CHROME_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/views/about_chrome_view.cc » ('j') | chrome/browser/views/about_chrome_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698