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

Side by Side Diff: ash/system/settings/tray_settings.cc

Issue 9572010: Make the strings in the ash uber tray translatable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | « ash/ash_strings.grd ('k') | ash/system/tray_user.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 #include "ash/system/settings/tray_settings.h" 5 #include "ash/system/settings/tray_settings.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/tray/system_tray_delegate.h" 8 #include "ash/system/tray/system_tray_delegate.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
11 #include "grit/ash_strings.h"
11 #include "grit/ui_resources.h" 12 #include "grit/ui_resources.h"
12 #include "third_party/skia/include/core/SkColor.h" 13 #include "third_party/skia/include/core/SkColor.h"
13 #include "ui/base/resource/resource_bundle.h" 14 #include "ui/base/resource/resource_bundle.h"
14 #include "ui/gfx/image/image.h" 15 #include "ui/gfx/image/image.h"
15 #include "ui/views/controls/image_view.h" 16 #include "ui/views/controls/image_view.h"
16 #include "ui/views/controls/label.h" 17 #include "ui/views/controls/label.h"
17 #include "ui/views/layout/box_layout.h" 18 #include "ui/views/layout/box_layout.h"
18 #include "ui/views/layout/fill_layout.h" 19 #include "ui/views/layout/fill_layout.h"
19 #include "ui/views/view.h" 20 #include "ui/views/view.h"
20 21
21 namespace { 22 namespace {
22 23
23 class SettingsView : public views::View { 24 class SettingsView : public views::View {
24 public: 25 public:
25 SettingsView() { 26 SettingsView() {
26 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal, 27 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal,
27 0, 0, 3)); 28 0, 0, 3));
28 29
30 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
29 views::ImageView* icon = new views::ImageView; 31 views::ImageView* icon = new views::ImageView;
30 icon->SetImage(ui::ResourceBundle::GetSharedInstance(). 32 icon->SetImage(bundle.GetImageNamed(IDR_AURA_UBER_TRAY_SETTINGS).
31 GetImageNamed(IDR_AURA_UBER_TRAY_SETTINGS).ToSkBitmap()); 33 ToSkBitmap());
32 AddChildView(icon); 34 AddChildView(icon);
33 35
34 label_ = new views::Label(ASCIIToUTF16("Help and Settings")); 36 label_ = new views::Label(bundle.GetLocalizedString(
37 IDS_ASH_STATUS_TRAY_HELP_AND_SETTINGS));
35 AddChildView(label_); 38 AddChildView(label_);
36 } 39 }
37 40
38 // Overridden from views::View. 41 // Overridden from views::View.
39 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE { 42 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE {
40 ash::Shell::GetInstance()->tray_delegate()->ShowSettings(); 43 ash::Shell::GetInstance()->tray_delegate()->ShowSettings();
41 return true; 44 return true;
42 } 45 }
43 46
44 virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE { 47 virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 } 98 }
96 99
97 void TraySettings::DestroyDefaultView() { 100 void TraySettings::DestroyDefaultView() {
98 } 101 }
99 102
100 void TraySettings::DestroyDetailedView() { 103 void TraySettings::DestroyDetailedView() {
101 } 104 }
102 105
103 } // namespace internal 106 } // namespace internal
104 } // namespace ash 107 } // namespace ash
OLDNEW
« no previous file with comments | « ash/ash_strings.grd ('k') | ash/system/tray_user.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698