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

Side by Side Diff: content/shell/common/shell_content_client.cc

Issue 1654193002: Include a role description string in node info for Android accessibility. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Lollipop should extend KitKat Created 4 years, 10 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
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 "content/shell/common/shell_content_client.h" 5 #include "content/shell/common/shell_content_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_piece.h" 8 #include "base/strings/string_piece.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "blink/public/resources/grit/blink_image_resources.h" 10 #include "blink/public/resources/grit/blink_image_resources.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 return base::ASCIIToUTF16("<<CalendarToday>>"); 53 return base::ASCIIToUTF16("<<CalendarToday>>");
54 case IDS_FORM_THIS_MONTH_LABEL: 54 case IDS_FORM_THIS_MONTH_LABEL:
55 return base::ASCIIToUTF16("<<ThisMonthLabel>>"); 55 return base::ASCIIToUTF16("<<ThisMonthLabel>>");
56 case IDS_FORM_THIS_WEEK_LABEL: 56 case IDS_FORM_THIS_WEEK_LABEL:
57 return base::ASCIIToUTF16("<<ThisWeekLabel>>"); 57 return base::ASCIIToUTF16("<<ThisWeekLabel>>");
58 } 58 }
59 } 59 }
60 return l10n_util::GetStringUTF16(message_id); 60 return l10n_util::GetStringUTF16(message_id);
61 } 61 }
62 62
63 base::string16 ShellContentClient::GetLocalizedStringF(
64 int message_id,
65 const base::string16& string0) const {
66 return l10n_util::GetStringFUTF16(message_id, string0);
67 }
68
63 base::StringPiece ShellContentClient::GetDataResource( 69 base::StringPiece ShellContentClient::GetDataResource(
64 int resource_id, 70 int resource_id,
65 ui::ScaleFactor scale_factor) const { 71 ui::ScaleFactor scale_factor) const {
66 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 72 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
67 switches::kRunLayoutTest)) { 73 switches::kRunLayoutTest)) {
68 switch (resource_id) { 74 switch (resource_id) {
69 case IDR_BROKENIMAGE: 75 case IDR_BROKENIMAGE:
70 #if defined(OS_MACOSX) 76 #if defined(OS_MACOSX)
71 resource_id = IDR_CONTENT_SHELL_MISSING_IMAGE_PNG; 77 resource_id = IDR_CONTENT_SHELL_MISSING_IMAGE_PNG;
72 #else 78 #else
(...skipping 18 matching lines...) Expand all
91 gfx::Image& ShellContentClient::GetNativeImageNamed(int resource_id) const { 97 gfx::Image& ShellContentClient::GetNativeImageNamed(int resource_id) const {
92 return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id); 98 return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id);
93 } 99 }
94 100
95 bool ShellContentClient::IsSupplementarySiteIsolationModeEnabled() { 101 bool ShellContentClient::IsSupplementarySiteIsolationModeEnabled() {
96 return base::CommandLine::ForCurrentProcess()->HasSwitch( 102 return base::CommandLine::ForCurrentProcess()->HasSwitch(
97 switches::kIsolateSitesForTesting); 103 switches::kIsolateSitesForTesting);
98 } 104 }
99 105
100 } // namespace content 106 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698