Skip to content

Commit

Permalink
cros - Update appearance of resolution change notification.
Browse files Browse the repository at this point in the history
This removes the last raster asset in ash_resources.grd, so remove that
file and the associated build target.

Bug: 840509,505953
Change-Id: I43ec69b5b8b9fc34aa71a1b65f204447e73b133c
Reviewed-on: https://chromium-review.googlesource.com/1050523
Commit-Queue: Evan Stade <estade@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557292}
  • Loading branch information
Evan Stade authored and Commit Bot committed May 9, 2018
1 parent a70afb7 commit f57e1c3
Show file tree
Hide file tree
Showing 23 changed files with 20 additions and 80 deletions.
7 changes: 0 additions & 7 deletions ash/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,6 @@ component("ash") {
public_deps = [
"//ash/public/cpp",
"//ash/public/cpp/vector_icons",
"//ash/resources",
"//ash/resources/vector_icons",
"//ash/strings",
"//ash/wayland",
Expand Down Expand Up @@ -1829,7 +1828,6 @@ test("ash_unittests") {
"//ash/public/cpp",
"//ash/public/cpp:unit_tests",
"//ash/public/cpp/vector_icons",
"//ash/resources",
"//ash/resources/vector_icons",
"//ash/strings",
"//ash/touch_hud",
Expand Down Expand Up @@ -2128,7 +2126,6 @@ static_library("test_support_common") {
"//ash/components/fast_ink",
"//ash/public/cpp",
"//ash/public/interfaces:test_interfaces",
"//ash/resources",
"//base",
"//base:i18n",
"//base/test:test_support",
Expand Down Expand Up @@ -2230,7 +2227,6 @@ repack("ash_service_resources") {
output = "$root_out_dir/ash_service_resources.pak"
sources = [
"$root_gen_dir/ash/components/resources/ash_components_resources_100_percent.pak",
"$root_gen_dir/ash/resources/ash_resources_100_percent.pak",
"$root_gen_dir/ash/strings/ash_strings_en-US.pak",
"$root_gen_dir/ui/chromeos/resources/ui_chromeos_resources_100_percent.pak",
"$root_gen_dir/ui/chromeos/strings/ui_chromeos_strings_en-US.pak",
Expand All @@ -2241,7 +2237,6 @@ repack("ash_service_resources") {
]
deps = [
"//ash/components/resources",
"//ash/resources",
"//ash/strings",
"//ui/chromeos/resources",
"//ui/chromeos/strings",
Expand All @@ -2256,14 +2251,12 @@ repack("ash_service_resources_200") {
output = "$root_out_dir/ash_service_resources_200.pak"
sources = [
"$root_gen_dir/ash/components/resources/ash_components_resources_200_percent.pak",
"$root_gen_dir/ash/resources/ash_resources_200_percent.pak",
"$root_gen_dir/ui/chromeos/resources/ui_chromeos_resources_200_percent.pak",
"$root_gen_dir/ui/resources/ui_resources_200_percent.pak",
"$root_gen_dir/ui/views/resources/views_resources_200_percent.pak",
]
deps = [
"//ash/components/resources",
"//ash/resources",
"//ui/chromeos/resources",
"//ui/resources",
"//ui/views/resources",
Expand Down
30 changes: 17 additions & 13 deletions ash/display/resolution_notification_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@

#include <utility>

#include "ash/resources/grit/ash_resources.h"
#include "ash/resources/vector_icons/vector_icons.h"
#include "ash/session/session_controller.h"
#include "ash/shell.h"
#include "ash/strings/grit/ash_strings.h"
#include "ash/system/screen_layout_observer.h"
#include "base/strings/utf_string_conversions.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/l10n/time_format.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/display/display.h"
#include "ui/display/manager/display_manager.h"
#include "ui/display/manager/managed_display_info.h"
Expand Down Expand Up @@ -221,17 +220,22 @@ void ResolutionNotificationController::CreateOrUpdateNotification(
base::UTF8ToUTF16(
change_info_->current_resolution.size().ToString()));

ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
auto notification = std::make_unique<Notification>(
message_center::NOTIFICATION_TYPE_SIMPLE, kNotificationId, message,
timeout_message, bundle.GetImageNamed(IDR_AURA_NOTIFICATION_DISPLAY),
base::string16() /* display_source */, GURL(),
message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT,
kNotifierDisplayResolutionChange),
data,
base::MakeRefCounted<message_center::ThunkNotificationDelegate>(
weak_factory_.GetWeakPtr()));
notification->SetSystemPriority();
std::unique_ptr<Notification> notification =
Notification::CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE, kNotificationId, message,
timeout_message, gfx::Image(),
base::string16(), // display_source
GURL(),
message_center::NotifierId(
message_center::NotifierId::SYSTEM_COMPONENT,
kNotifierDisplayResolutionChange),
data,
base::MakeRefCounted<message_center::ThunkNotificationDelegate>(
weak_factory_.GetWeakPtr()),
kNotificationScreenIcon,
message_center::SystemNotificationWarningLevel::NORMAL);
notification->set_priority(message_center::SYSTEM_PRIORITY);

message_center->AddNotification(std::move(notification));
}

Expand Down
11 changes: 0 additions & 11 deletions ash/resources/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@ import("//ui/base/ui_features.gni")
assert(is_chromeos)
assert(enable_hidpi)

grit("resources") {
source = "ash_resources.grd"
outputs = [
"grit/ash_resources.h",
"ash_resources_100_percent.pak",
"ash_resources_200_percent.pak",
]
}

# Repacks resources needed for ash_unittests, etc. at a given scale.
# TODO(msw): Use ui_test.pak instead of its pieces? (no 200% support?)
template("ash_test_resources") {
Expand All @@ -29,7 +20,6 @@ template("ash_test_resources") {
sources = [
"$root_gen_dir/ash/components/resources/ash_components_resources_${percent}_percent.pak",
"$root_gen_dir/ash/public/cpp/resources/ash_public_unscaled_resources.pak",
"$root_gen_dir/ash/resources/ash_resources_${percent}_percent.pak",
"$root_gen_dir/ui/app_list/resources/app_list_resources_${percent}_percent.pak",
"$root_gen_dir/ui/chromeos/resources/ui_chromeos_resources_${percent}_percent.pak",
"$root_gen_dir/ui/resources/ui_resources_${percent}_percent.pak",
Expand All @@ -50,7 +40,6 @@ template("ash_test_resources") {
deps = [
"//ash/components/resources",
"//ash/public/cpp/resources:ash_public_unscaled_resources",
"//ash/resources",
"//mojo/public/js:resources",
"//ui/app_list/resources",
"//ui/chromeos/resources",
Expand Down
19 changes: 0 additions & 19 deletions ash/resources/ash_resources.grd

This file was deleted.

Binary file not shown.
Binary file not shown.
1 change: 0 additions & 1 deletion ash/system/bluetooth/bluetooth_notification_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <memory>
#include <utility>

#include "ash/resources/grit/ash_resources.h"
#include "ash/resources/vector_icons/vector_icons.h"
#include "ash/strings/grit/ash_strings.h"
#include "base/bind.h"
Expand Down
1 change: 0 additions & 1 deletion ash/system/locale/locale_notification_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <utility>

#include "ash/public/cpp/vector_icons/vector_icons.h"
#include "ash/resources/grit/ash_resources.h"
#include "ash/strings/grit/ash_strings.h"
#include "ash/system/tray/system_tray_notifier.h"
#include "base/strings/string16.h"
Expand Down
1 change: 0 additions & 1 deletion ash/system/power/battery_notification.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "ash/system/power/battery_notification.h"

#include "ash/public/cpp/power_utils.h"
#include "ash/resources/grit/ash_resources.h"
#include "ash/resources/vector_icons/vector_icons.h"
#include "ash/strings/grit/ash_strings.h"
#include "ash/system/power/power_status.h"
Expand Down
1 change: 0 additions & 1 deletion ash/system/power/dual_role_notification.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include <set>

#include "ash/resources/grit/ash_resources.h"
#include "ash/resources/vector_icons/vector_icons.h"
#include "ash/shell.h"
#include "ash/strings/grit/ash_strings.h"
Expand Down
1 change: 0 additions & 1 deletion ash/system/power/peripheral_battery_notifier.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include <vector>

#include "ash/resources/grit/ash_resources.h"
#include "ash/resources/vector_icons/vector_icons.h"
#include "ash/shell.h"
#include "ash/strings/grit/ash_strings.h"
Expand Down
2 changes: 1 addition & 1 deletion ash/system/power/tray_power.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "ash/accessibility/accessibility_delegate.h"
#include "ash/public/cpp/ash_switches.h"
#include "ash/resources/grit/ash_resources.h"

#include "ash/resources/vector_icons/vector_icons.h"
#include "ash/strings/grit/ash_strings.h"
#include "ash/system/date/date_view.h"
Expand Down
1 change: 0 additions & 1 deletion ash/system/screen_layout_observer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "ash/display/screen_orientation_controller.h"
#include "ash/metrics/user_metrics_action.h"
#include "ash/metrics/user_metrics_recorder.h"
#include "ash/resources/grit/ash_resources.h"
#include "ash/resources/vector_icons/vector_icons.h"
#include "ash/session/session_controller.h"
#include "ash/shell.h"
Expand Down
2 changes: 1 addition & 1 deletion ash/system/screen_security/screen_capture_tray_item.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "ash/metrics/user_metrics_action.h"
#include "ash/metrics/user_metrics_recorder.h"
#include "ash/public/cpp/ash_features.h"
#include "ash/resources/grit/ash_resources.h"

#include "ash/resources/vector_icons/vector_icons.h"
#include "ash/shell.h"
#include "ash/strings/grit/ash_strings.h"
Expand Down
1 change: 0 additions & 1 deletion ash/system/screen_security/screen_share_tray_item.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include <utility>

#include "ash/resources/grit/ash_resources.h"
#include "ash/resources/vector_icons/vector_icons.h"
#include "ash/shell.h"
#include "ash/strings/grit/ash_strings.h"
Expand Down
2 changes: 0 additions & 2 deletions chrome/browser/chromeos/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ source_set("chromeos") {
configs += [ "//build/config/compiler:wexit_time_destructors" ]

public_deps = [
"//ash/resources",
"//ash/strings",
"//chrome:extra_resources",
"//chrome:resources",
Expand Down Expand Up @@ -2179,7 +2178,6 @@ source_set("unit_tests") {
":attestation_proto",
":test_support",
"//ash",
"//ash/resources",
"//base",
"//chrome/common",
"//chromeos/components/tether:test_support",
Expand Down
7 changes: 0 additions & 7 deletions chrome/browser/ui/app_list/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,3 @@ include_rules = [

"+ash/public",
]

specific_include_rules = {
# TODO(733662): Remove when app_list is migrated.
"crostini_app_model_builder\.cc": [
"+ash/resources/grit/ash_resources.h",
],
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,16 @@

#include "chrome/browser/ui/app_list/crostini/crostini_app_model_builder.h"

#include "ash/resources/grit/ash_resources.h"
#include "chrome/browser/chromeos/crostini/crostini_manager.h"
#include "chrome/browser/chromeos/crostini/crostini_pref_names.h"
#include "chrome/browser/chromeos/crostini/crostini_registry_service_factory.h"
#include "chrome/browser/chromeos/crostini/crostini_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
#include "chrome/browser/ui/app_list/crostini/crostini_app_item.h"
#include "chrome/grit/chrome_unscaled_resources.h"
#include "components/crx_file/id_util.h"
#include "components/prefs/pref_change_registrar.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"

CrostiniAppModelBuilder::CrostiniAppModelBuilder(
AppListControllerDelegate* controller)
Expand Down
2 changes: 0 additions & 2 deletions chrome/chrome_paks.gni
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,10 @@ template("chrome_repack_percent") {
if (is_chromeos) {
sources += [
"$root_gen_dir/ash/components/resources/ash_components_resources_${percent}_percent.pak",
"$root_gen_dir/ash/resources/ash_resources_${percent}_percent.pak",
"$root_gen_dir/ui/chromeos/resources/ui_chromeos_resources_${percent}_percent.pak",
]
deps += [
"//ash/components/resources",
"//ash/resources",
"//ui/chromeos/resources",
]
}
Expand Down
2 changes: 0 additions & 2 deletions chrome/test/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -3250,7 +3250,6 @@ test("unit_tests") {
deps += [
"//ash:test_support_with_content",
"//ash/public/cpp/resources:ash_public_unscaled_resources",
"//ash/resources",
"//ash/strings",
]
}
Expand Down Expand Up @@ -4882,7 +4881,6 @@ if (!is_android) {
"//ash:interactive_ui_test_support",
"//ash/app_list/presenter:test_support",
"//ash/public/interfaces:test_interfaces",
"//ash/resources",
"//chrome/browser/media/router:test_support",
"//chromeos",
"//mojo/edk",
Expand Down
1 change: 0 additions & 1 deletion tools/check_grd_for_unused_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ def main():
ui_chromeos_dir = os.path.join(ui_dir, 'chromeos')
grd_files = [
os.path.join(ash_base_dir, 'ash_strings.grd'),
os.path.join(ash_base_dir, 'resources', 'ash_resources.grd'),
os.path.join(ash_components_dir, 'ash_components_strings.grd'),
os.path.join(ash_components_dir, 'resources',
'ash_components_resources.grd'),
Expand Down
3 changes: 0 additions & 3 deletions tools/gritsettings/resource_ids
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,6 @@
"ash/public/cpp/resources/ash_public_unscaled_resources.grd": {
"includes": [24260],
},
"ash/resources/ash_resources.grd": {
"structures": [24280],
},
"ash/shell/ash_shell_resources.grd": {
"includes": [24290],
},
Expand Down
2 changes: 1 addition & 1 deletion tools/resources/find_unused_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Example:
cd /work/chrome/src
tools/resources/find_unused_resouces.py ash/resources/ash_resources.grd
tools/resources/find_unused_resouces.py chrome/browser/browser_resources.grd
"""

__author__ = 'jamescook@chromium.org (James Cook)'
Expand Down

0 comments on commit f57e1c3

Please sign in to comment.