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

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

Issue 115825: Move text_field.cc and rename the class to Textfield in preparation for porti... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 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 | « chrome/browser/views/about_chrome_view.h ('k') | chrome/browser/views/about_network_dialog.h » ('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) 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 #include "chrome/browser/views/about_chrome_view.h" 5 #include "chrome/browser/views/about_chrome_view.h"
6 6
7 #include <commdlg.h> 7 #include <commdlg.h>
8 8
9 #include "app/gfx/canvas.h" 9 #include "app/gfx/canvas.h"
10 #include "app/gfx/color_utils.h" 10 #include "app/gfx/color_utils.h"
11 #include "app/l10n_util.h" 11 #include "app/l10n_util.h"
12 #include "app/resource_bundle.h" 12 #include "app/resource_bundle.h"
13 #include "base/file_version_info.h" 13 #include "base/file_version_info.h"
14 #include "base/string_util.h" 14 #include "base/string_util.h"
15 #include "base/win_util.h" 15 #include "base/win_util.h"
16 #include "base/word_iterator.h" 16 #include "base/word_iterator.h"
17 #include "chrome/browser/browser_list.h" 17 #include "chrome/browser/browser_list.h"
18 #include "chrome/browser/metrics/user_metrics.h" 18 #include "chrome/browser/metrics/user_metrics.h"
19 #include "chrome/browser/views/restart_message_box.h" 19 #include "chrome/browser/views/restart_message_box.h"
20 #include "chrome/common/chrome_constants.h" 20 #include "chrome/common/chrome_constants.h"
21 #include "chrome/installer/util/install_util.h" 21 #include "chrome/installer/util/install_util.h"
22 #include "grit/chromium_strings.h" 22 #include "grit/chromium_strings.h"
23 #include "grit/generated_resources.h" 23 #include "grit/generated_resources.h"
24 #include "grit/locale_settings.h" 24 #include "grit/locale_settings.h"
25 #include "grit/theme_resources.h" 25 #include "grit/theme_resources.h"
26 #include "views/controls/text_field.h" 26 #include "views/controls/textfield/textfield.h"
27 #include "views/controls/throbber.h" 27 #include "views/controls/throbber.h"
28 #include "views/standard_layout.h" 28 #include "views/standard_layout.h"
29 #include "views/widget/widget.h" 29 #include "views/widget/widget.h"
30 #include "views/window/window.h" 30 #include "views/window/window.h"
31 #include "webkit/glue/webkit_glue.h" 31 #include "webkit/glue/webkit_glue.h"
32 32
33 namespace { 33 namespace {
34 // The pixel width of the version text field. Ideally, we'd like to have the 34 // The pixel width of the version text field. Ideally, we'd like to have the
35 // bounds set to the edge of the icon. However, the icon is not a view but a 35 // bounds set to the edge of the icon. However, the icon is not a view but a
36 // part of the background, so we have to hard code the width to make sure 36 // part of the background, so we have to hard code the width to make sure
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 AddChildView(about_dlg_background_logo_); 165 AddChildView(about_dlg_background_logo_);
166 166
167 // Add the dialog labels. 167 // Add the dialog labels.
168 about_title_label_ = new views::Label( 168 about_title_label_ = new views::Label(
169 l10n_util::GetString(IDS_PRODUCT_NAME)); 169 l10n_util::GetString(IDS_PRODUCT_NAME));
170 about_title_label_->SetFont(ResourceBundle::GetSharedInstance().GetFont( 170 about_title_label_->SetFont(ResourceBundle::GetSharedInstance().GetFont(
171 ResourceBundle::BaseFont).DeriveFont(18, BOLD_FONTTYPE)); 171 ResourceBundle::BaseFont).DeriveFont(18, BOLD_FONTTYPE));
172 AddChildView(about_title_label_); 172 AddChildView(about_title_label_);
173 173
174 // This is a text field so people can copy the version number from the dialog. 174 // This is a text field so people can copy the version number from the dialog.
175 version_label_ = new views::TextField(); 175 version_label_ = new views::Textfield();
176 version_label_->SetText(current_version_); 176 version_label_->SetText(current_version_);
177 version_label_->SetReadOnly(true); 177 version_label_->SetReadOnly(true);
178 version_label_->RemoveBorder(); 178 version_label_->RemoveBorder();
179 version_label_->SetBackgroundColor(SK_ColorWHITE); 179 version_label_->SetBackgroundColor(SK_ColorWHITE);
180 version_label_->SetFont(ResourceBundle::GetSharedInstance().GetFont( 180 version_label_->SetFont(ResourceBundle::GetSharedInstance().GetFont(
181 ResourceBundle::BaseFont).DeriveFont(0, BOLD_FONTTYPE)); 181 ResourceBundle::BaseFont).DeriveFont(0, BOLD_FONTTYPE));
182 AddChildView(version_label_); 182 AddChildView(version_label_);
183 183
184 // The copyright URL portion of the main label. 184 // The copyright URL portion of the main label.
185 copyright_label_ = new views::Label( 185 copyright_label_ = new views::Label(
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 830
831 // We have updated controls on the parent, so we need to update its layout. 831 // We have updated controls on the parent, so we need to update its layout.
832 View* parent = GetParent(); 832 View* parent = GetParent();
833 parent->Layout(); 833 parent->Layout();
834 834
835 // Check button may have appeared/disappeared. We cannot call this during 835 // Check button may have appeared/disappeared. We cannot call this during
836 // ViewHierarchyChanged because the |window()| pointer hasn't been set yet. 836 // ViewHierarchyChanged because the |window()| pointer hasn't been set yet.
837 if (window()) 837 if (window())
838 GetDialogClientView()->UpdateDialogButtons(); 838 GetDialogClientView()->UpdateDialogButtons();
839 } 839 }
OLDNEW
« no previous file with comments | « chrome/browser/views/about_chrome_view.h ('k') | chrome/browser/views/about_network_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698