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

Side by Side Diff: views/window/custom_frame_view.cc

Issue 1155005: views: [accessibility] Add accessible name for the Close button in generic Wi... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 10 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 | « app/resources/app_strings.grd ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "views/window/custom_frame_view.h" 5 #include "views/window/custom_frame_view.h"
6 6
7 #include "app/gfx/canvas.h" 7 #include "app/gfx/canvas.h"
8 #include "app/gfx/font.h" 8 #include "app/gfx/font.h"
9 #include "app/l10n_util.h"
9 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
10 #include "app/theme_provider.h" 11 #include "app/theme_provider.h"
11 #if defined(OS_WIN) 12 #if defined(OS_WIN)
12 #include "app/win_util.h" 13 #include "app/win_util.h"
13 #include "base/win_util.h" 14 #include "base/win_util.h"
14 #endif 15 #endif
15 #include "gfx/path.h" 16 #include "gfx/path.h"
16 #include "grit/app_resources.h" 17 #include "grit/app_resources.h"
18 #include "grit/app_strings.h"
17 #include "views/window/client_view.h" 19 #include "views/window/client_view.h"
18 #if defined(OS_LINUX) 20 #if defined(OS_LINUX)
19 #include "views/window/hit_test.h" 21 #include "views/window/hit_test.h"
20 #endif 22 #endif
21 #include "views/window/window_delegate.h" 23 #include "views/window/window_delegate.h"
22 24
23 namespace views { 25 namespace views {
24 26
25 // static 27 // static
26 gfx::Font* CustomFrameView::title_font_ = NULL; 28 gfx::Font* CustomFrameView::title_font_ = NULL;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 ALLOW_THIS_IN_INITIALIZER_LIST(restore_button_(new ImageButton(this))), 67 ALLOW_THIS_IN_INITIALIZER_LIST(restore_button_(new ImageButton(this))),
66 ALLOW_THIS_IN_INITIALIZER_LIST(maximize_button_(new ImageButton(this))), 68 ALLOW_THIS_IN_INITIALIZER_LIST(maximize_button_(new ImageButton(this))),
67 ALLOW_THIS_IN_INITIALIZER_LIST(minimize_button_(new ImageButton(this))), 69 ALLOW_THIS_IN_INITIALIZER_LIST(minimize_button_(new ImageButton(this))),
68 window_icon_(NULL), 70 window_icon_(NULL),
69 should_show_minmax_buttons_(false), 71 should_show_minmax_buttons_(false),
70 frame_(frame) { 72 frame_(frame) {
71 InitClass(); 73 InitClass();
72 74
73 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 75 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
74 76
77 close_button_->SetAccessibleName(l10n_util::GetString(IDS_APP_ACCNAME_CLOSE));
78
75 // Close button images will be set in LayoutWindowControls(). 79 // Close button images will be set in LayoutWindowControls().
76 AddChildView(close_button_); 80 AddChildView(close_button_);
77 81
78 restore_button_->SetImage(CustomButton::BS_NORMAL, 82 restore_button_->SetImage(CustomButton::BS_NORMAL,
79 rb.GetBitmapNamed(IDR_RESTORE)); 83 rb.GetBitmapNamed(IDR_RESTORE));
80 restore_button_->SetImage(CustomButton::BS_HOT, 84 restore_button_->SetImage(CustomButton::BS_HOT,
81 rb.GetBitmapNamed(IDR_RESTORE_H)); 85 rb.GetBitmapNamed(IDR_RESTORE_H));
82 restore_button_->SetImage(CustomButton::BS_PUSHED, 86 restore_button_->SetImage(CustomButton::BS_PUSHED,
83 rb.GetBitmapNamed(IDR_RESTORE_P)); 87 rb.GetBitmapNamed(IDR_RESTORE_P));
84 AddChildView(restore_button_); 88 AddChildView(restore_button_);
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 title_font_ = new gfx::Font(win_util::GetWindowTitleFont()); 574 title_font_ = new gfx::Font(win_util::GetWindowTitleFont());
571 #elif defined(OS_LINUX) 575 #elif defined(OS_LINUX)
572 // TODO: need to resolve what font this is. 576 // TODO: need to resolve what font this is.
573 title_font_ = new gfx::Font(); 577 title_font_ = new gfx::Font();
574 #endif 578 #endif
575 initialized = true; 579 initialized = true;
576 } 580 }
577 } 581 }
578 582
579 } // namespace views 583 } // namespace views
OLDNEW
« no previous file with comments | « app/resources/app_strings.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698