Commit b6370aec authored by Daniel Murphy's avatar Daniel Murphy Committed by Commit Bot

Revert "cros - Update appearance of resolution change notification."

This reverts commit f57e1c35.

Reason for revert: There are ash and mash_ash failures, reverting because it's ash-related. See crbug.com/841889


Original change's description:
> cros - Update appearance of resolution change notification.
> 
> 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}

TBR=jamescook@chromium.org,sky@chromium.org,estade@chromium.org

Change-Id: I4b0ce3e1d01b5b8e390216b379f4158380f542b2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 840509, 505953, 841889
Reviewed-on: https://chromium-review.googlesource.com/1054118Reviewed-by: default avatarDaniel Murphy <dmurph@chromium.org>
Commit-Queue: Daniel Murphy <dmurph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557598}
parent 1a291743
......@@ -1208,6 +1208,7 @@ component("ash") {
public_deps = [
"//ash/public/cpp",
"//ash/public/cpp/vector_icons",
"//ash/resources",
"//ash/resources/vector_icons",
"//ash/strings",
"//ash/wayland",
......@@ -1830,6 +1831,7 @@ 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",
......@@ -2128,6 +2130,7 @@ 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",
......@@ -2229,6 +2232,7 @@ 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",
......@@ -2239,6 +2243,7 @@ repack("ash_service_resources") {
]
deps = [
"//ash/components/resources",
"//ash/resources",
"//ash/strings",
"//ui/chromeos/resources",
"//ui/chromeos/strings",
......@@ -2253,12 +2258,14 @@ 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",
......
......@@ -6,7 +6,7 @@
#include <utility>
#include "ash/resources/vector_icons/vector_icons.h"
#include "ash/resources/grit/ash_resources.h"
#include "ash/session/session_controller.h"
#include "ash/shell.h"
#include "ash/strings/grit/ash_strings.h"
......@@ -14,6 +14,7 @@
#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"
......@@ -220,22 +221,17 @@ void ResolutionNotificationController::CreateOrUpdateNotification(
base::UTF8ToUTF16(
change_info_->current_resolution.size().ToString()));
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);
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();
message_center->AddNotification(std::move(notification));
}
......
......@@ -9,6 +9,15 @@ 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") {
......@@ -20,6 +29,7 @@ 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",
......@@ -40,6 +50,7 @@ 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",
......
<?xml version="1.0" encoding="UTF-8"?>
<grit latest_public_release="0" current_release="1" output_all_resource_defines="false">
<outputs>
<output filename="grit/ash_resources.h" type="rc_header" context="default_100_percent">
<emit emit_type='prepend'></emit>
</output>
<output filename="ash_resources_100_percent.pak" type="data_package" context="default_100_percent" />
<output filename="ash_resources_200_percent.pak" type="data_package" context="default_200_percent" />
</outputs>
<release seq="1">
<structures fallback_to_low_resolution="true">
<!-- KEEP THESE IN ALPHABETICAL ORDER! DO NOT ADD TO RANDOM PLACES JUST
BECAUSE YOUR RESOURCES ARE FUNCTIONALLY RELATED OR FALL UNDER THE
SAME CONDITIONALS. -->
<structure type="chrome_scaled_image" name="IDR_AURA_NOTIFICATION_DISPLAY" file="cros/notification/display_notification_icon.png" />
</structures>
</release>
</grit>
......@@ -7,6 +7,7 @@
#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"
......
......@@ -8,6 +8,7 @@
#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"
......
......@@ -5,6 +5,7 @@
#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"
......
......@@ -6,6 +6,7 @@
#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"
......
......@@ -6,6 +6,7 @@
#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"
......
......@@ -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"
......
......@@ -11,6 +11,7 @@
#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"
......
......@@ -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"
......
......@@ -6,6 +6,7 @@
#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"
......
......@@ -21,6 +21,7 @@ source_set("chromeos") {
configs += [ "//build/config/compiler:wexit_time_destructors" ]
public_deps = [
"//ash/resources",
"//ash/strings",
"//chrome:extra_resources",
"//chrome:resources",
......@@ -2179,6 +2180,7 @@ source_set("unit_tests") {
":attestation_proto",
":test_support",
"//ash",
"//ash/resources",
"//base",
"//chrome/common",
"//chromeos/components/tether:test_support",
......
......@@ -6,3 +6,10 @@ 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",
],
}
......@@ -4,6 +4,7 @@
#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"
......@@ -11,9 +12,11 @@
#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)
......
......@@ -59,10 +59,12 @@ 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",
]
}
......
......@@ -3251,6 +3251,7 @@ test("unit_tests") {
deps += [
"//ash:test_support_with_content",
"//ash/public/cpp/resources:ash_public_unscaled_resources",
"//ash/resources",
"//ash/strings",
]
}
......@@ -4883,6 +4884,7 @@ 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",
......
......@@ -137,6 +137,7 @@ 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'),
......
......@@ -293,6 +293,9 @@
"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],
},
......
......@@ -12,7 +12,7 @@ Requires a git checkout. Must be run from your checkout's "src" root.
Example:
cd /work/chrome/src
tools/resources/find_unused_resouces.py chrome/browser/browser_resources.grd
tools/resources/find_unused_resouces.py ash/resources/ash_resources.grd
"""
__author__ = 'jamescook@chromium.org (James Cook)'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment