Skip to content

Commit

Permalink
Merge pull request #16 from chromium/master
Browse files Browse the repository at this point in the history
Merge
  • Loading branch information
FrankEnderman committed Oct 27, 2021
2 parents 5add40a + f06d042 commit eecf090
Show file tree
Hide file tree
Showing 420 changed files with 3,736 additions and 846 deletions.
14 changes: 7 additions & 7 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,11 @@ vars = {
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling Skia
# and whatever else without interference from each other.
'skia_revision': '14c328247b88052a754f94761d729803f15d63e7',
'skia_revision': '1ddf724e3707d3de8728d449a897b0f06055c012',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling V8
# and whatever else without interference from each other.
'v8_revision': '38a4af376eb564cd0a6d707ef0df0973199a7932',
'v8_revision': 'fabb677a3acc3dbe8882e632c3071ef04cd2b9d4',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling ANGLE
# and whatever else without interference from each other.
Expand All @@ -250,7 +250,7 @@ vars = {
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling PDFium
# and whatever else without interference from each other.
'pdfium_revision': 'f5bdf5a158dc51c27dde25a1685f3aa1a874d377',
'pdfium_revision': '0daab1ae451dcbd7b96e9050bb2696de66dc5faa',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling BoringSSL
# and whatever else without interference from each other.
Expand Down Expand Up @@ -301,15 +301,15 @@ vars = {
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling catapult
# and whatever else without interference from each other.
'catapult_revision': '3a3fedc9b597258cf74699767aa1f0b68c550e92',
'catapult_revision': 'b10243766b3f509ac01a75fe7348a8e512445851',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling libFuzzer
# and whatever else without interference from each other.
'libfuzzer_revision': 'debe7d2d1982e540fbd6bd78604bf001753f9e74',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling devtools-frontend
# and whatever else without interference from each other.
'devtools_frontend_revision': '10b7ad2a85f35b117b38f7540047a35f3a589a6f',
'devtools_frontend_revision': 'd71219e53cc8373c2e43583a1825b637a4abf02a',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling libprotobuf-mutator
# and whatever else without interference from each other.
Expand Down Expand Up @@ -1029,7 +1029,7 @@ deps = {
},

'src/third_party/depot_tools':
Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + 'b26c016ab4df37bedcafba26d914c2a1dcf19750',
Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '480c91d40b45432c6916b5767a478753abcbd47d',

'src/third_party/devtools-frontend/src':
Var('chromium_git') + '/devtools/devtools-frontend' + '@' + Var('devtools_frontend_revision'),
Expand Down Expand Up @@ -1694,7 +1694,7 @@ deps = {
Var('chromium_git') + '/v8/v8.git' + '@' + Var('v8_revision'),

'src-internal': {
'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@3795004376b8f017ce30b66bba7284feab2bb67c',
'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@786f6d4dff85e0206f53d0aa2cab6c3d5c4caa59',
'condition': 'checkout_src_internal',
},

Expand Down
3 changes: 2 additions & 1 deletion WATCHLISTS
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,8 @@
'|components/policy/proto/record',
},
'cros_sharesheet': {
'filepath': 'chrome/browser/ui/ash/sharesheet/',
'filepath': 'chrome/browser/ui/ash/sharesheet/'\
'|chrome/browser/ash/sharesheet/',
},
'crostini': {
'filepath': 'cicerone'\
Expand Down
9 changes: 9 additions & 0 deletions ash/ash_strings.grd
Original file line number Diff line number Diff line change
Expand Up @@ -1457,6 +1457,15 @@ This file contains the strings for ash.
<message name="IDS_ASH_PHONE_HUB_BLUETOOTH_DISABLED_DIALOG_LEARN_MORE_BUTTON" desc="Learn more button on the bluetooth disabled dialog to show more related information.">
Learn more
</message>
<message name="IDS_ASH_PHONE_HUB_NOTIFICATION_CALL_ANSWER_BUTTON" desc="Label for the answer call button inside a PhoneHub notification.">
Answer
</message>
<message name="IDS_ASH_PHONE_HUB_NOTIFICATION_CALL_DECLINE_BUTTON" desc="Label for the decline call button inside a PhoneHub notification.">
Decline
</message>
<message name="IDS_ASH_PHONE_HUB_NOTIFICATION_CALL_HANGUP_BUTTON" desc="Label for the hangup call button inside a PhoneHub notification.">
Hang up
</message>
<message name="IDS_ASH_PHONE_HUB_NOTIFICATION_INLINE_REPLY_BUTTON" desc="Label for the inline reply button inside a PhoneHub notification.">
Reply
</message>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cbc2533f6d9d3600ffad80ba2d11f238d6c1c697
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cbc2533f6d9d3600ffad80ba2d11f238d6c1c697
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3a062b61ab82450bab1e34c6e09cd000d0880af9
8 changes: 7 additions & 1 deletion ash/components/fwupd/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ assert(is_chromeos_ash, "Non-Chrome-OS builds must not depend on //ash")
component("fwupd") {
defines = [ "IS_ASH_FIRMWARE_UPDATE_MANAGER_IMPL" ]

deps = [ "//base:base" ]
deps = [
"//base:base",
"//chromeos/dbus/fwupd",
"//dbus",
]

sources = [
"firmware_update_manager.cc",
Expand All @@ -22,6 +26,8 @@ source_set("unit_tests") {

deps = [
":fwupd",
"//chromeos/dbus/fwupd",
"//dbus:test_support",
"//testing/gtest",
]

Expand Down
18 changes: 18 additions & 0 deletions ash/components/fwupd/firmware_update_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#include "ash/components/fwupd/firmware_update_manager.h"

#include "base/check_op.h"
#include "chromeos/dbus/fwupd/fwupd_client.h"
#include "dbus/message.h"

namespace ash {

Expand All @@ -15,12 +17,17 @@ FirmwareUpdateManager* g_instance = nullptr;
} // namespace

FirmwareUpdateManager::FirmwareUpdateManager() {
DCHECK(chromeos::FwupdClient::Get());
chromeos::FwupdClient::Get()->AddObserver(this);

DCHECK_EQ(nullptr, g_instance);
g_instance = this;
g_instance->RequestDevices();
}

FirmwareUpdateManager::~FirmwareUpdateManager() {
DCHECK_EQ(this, g_instance);
chromeos::FwupdClient::Get()->RemoveObserver(this);
g_instance = nullptr;
}

Expand All @@ -30,4 +37,15 @@ FirmwareUpdateManager* FirmwareUpdateManager::Get() {
return g_instance;
}

void FirmwareUpdateManager::RequestDevices() {
chromeos::FwupdClient::Get()->GetDevices();
}

void FirmwareUpdateManager::OnDeviceListResponse(
chromeos::FwupdDeviceList* devices) {
DCHECK(devices);
// TODO(swifton): This is a stub implementation.
++on_device_list_response_count_for_testing_;
}

} // namespace ash
22 changes: 20 additions & 2 deletions ash/components/fwupd/firmware_update_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,36 @@
#define ASH_COMPONENTS_FWUPD_FIRMWARE_UPDATE_MANAGER_H_

#include "base/component_export.h"
#include "chromeos/dbus/fwupd/fwupd_client.h"
#include "chromeos/dbus/fwupd/fwupd_device.h"
#include "dbus/message.h"

namespace ash {
// FirmwareUpdateManager contains all logic that runs the firmware update SWA.
class COMPONENT_EXPORT(ASH_FIRMWARE_UPDATE_MANAGER) FirmwareUpdateManager {
class COMPONENT_EXPORT(ASH_FIRMWARE_UPDATE_MANAGER) FirmwareUpdateManager
: public chromeos::FwupdClient::Observer {
public:
// Query the fwupd DBus client for currently connected devices.
void RequestDevices();

// FwupdClient::Observer:
// When the fwupd DBus client gets a response with devices from fwupd,
// it calls this function and passes the response.
void OnDeviceListResponse(chromeos::FwupdDeviceList* devices) override;

FirmwareUpdateManager();
FirmwareUpdateManager(const FirmwareUpdateManager&) = delete;
FirmwareUpdateManager& operator=(const FirmwareUpdateManager&) = delete;
~FirmwareUpdateManager();
~FirmwareUpdateManager() override;

// Gets the global instance pointer.
static FirmwareUpdateManager* Get();

protected:
friend class FirmwareUpdateManagerTest;
// Temporary auxiliary variable for testing.
// TODO(swifton): Replace with mock observers.
int on_device_list_response_count_for_testing_ = 0;
};
} // namespace ash

Expand Down
18 changes: 18 additions & 0 deletions ash/components/fwupd/firmware_update_manager_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

#include "ash/components/fwupd/firmware_update_manager.h"

#include <memory>

#include "chromeos/dbus/fwupd/fake_fwupd_client.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace ash {
Expand All @@ -15,6 +18,21 @@ class FirmwareUpdateManagerTest : public testing::Test {
FirmwareUpdateManagerTest& operator=(const FirmwareUpdateManagerTest&) =
delete;
~FirmwareUpdateManagerTest() override = default;

int GetOnDevicesResponseCallbackCallCountForTesting() {
return firmware_update_manager_.on_device_list_response_count_for_testing_;
}

chromeos::FakeFwupdClient dbus_client_;
FirmwareUpdateManager firmware_update_manager_;
};

// TODO(swifton): Rewrite this test with an observer.
TEST_F(FirmwareUpdateManagerTest, RequestDeviceList) {
// FirmwareUpdateManager requests devices when it is created.
EXPECT_EQ(1, GetOnDevicesResponseCallbackCallCountForTesting());
firmware_update_manager_.RequestDevices();
EXPECT_EQ(2, GetOnDevicesResponseCallbackCallCountForTesting());
}

} // namespace ash
13 changes: 5 additions & 8 deletions ash/constants/ash_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -642,8 +642,9 @@ const base::Feature kHoldingSpaceIncognitoProfileIntegration{
"HoldingSpaceIncognitoProfileIntegration",
base::FEATURE_ENABLED_BY_DEFAULT};

// Controls whether the HPS notify prototype is enabled.
const base::Feature kHpsNotify{"HpsNotify", base::FEATURE_DISABLED_BY_DEFAULT};
// Controls whether the snooping protection prototype is enabled.
const base::Feature kSnoopingProtection{"SnoopingProtection",
base::FEATURE_DISABLED_BY_DEFAULT};

// Enable or disable IME decoder via Mojo connection on Chrome OS.
const base::Feature kImeMojoDecoder{"ImeMojoDecoder",
Expand Down Expand Up @@ -887,10 +888,6 @@ const base::Feature kPinSetupForManagedUsers{"PinSetupForManagedUsers",
const base::Feature kPipRoundedCorners{"PipRoundedCorners",
base::FEATURE_ENABLED_BY_DEFAULT};

// Hides shelf in immersive mode and allows esc hold to exit.
const base::Feature kPluginVmFullscreen{"PluginVmFullscreen",
base::FEATURE_ENABLED_BY_DEFAULT};

// Enables or disables the preference of using constant frame rate for camera
// when streaming.
const base::Feature kPreferConstantFrameRate{"PreferConstantFrameRate",
Expand Down Expand Up @@ -1445,8 +1442,8 @@ bool IsHostnameSettingEnabled() {
return base::FeatureList::IsEnabled(kEnableHostnameSetting);
}

bool IsHpsNotifyEnabled() {
return base::FeatureList::IsEnabled(kHpsNotify);
bool IsSnoopingProtectionEnabled() {
return base::FeatureList::IsEnabled(kSnoopingProtection);
}

bool IsIdleInhibitEnabled() {
Expand Down
7 changes: 3 additions & 4 deletions ash/constants/ash_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,6 @@ COMPONENT_EXPORT(ASH_CONSTANTS)
extern const base::Feature kHoldingSpaceInProgressDownloadsIntegration;
COMPONENT_EXPORT(ASH_CONSTANTS)
extern const base::Feature kHoldingSpaceIncognitoProfileIntegration;
COMPONENT_EXPORT(ASH_CONSTANTS)
extern const base::Feature kHpsNotify;
COMPONENT_EXPORT(ASH_CONSTANTS) extern const base::Feature kImeMojoDecoder;
COMPONENT_EXPORT(ASH_CONSTANTS) extern const base::Feature kImeMozcProto;
COMPONENT_EXPORT(ASH_CONSTANTS)
Expand Down Expand Up @@ -338,7 +336,6 @@ COMPONENT_EXPORT(ASH_CONSTANTS) extern const base::Feature kPhoneHubRecentApps;
COMPONENT_EXPORT(ASH_CONSTANTS)
extern const base::Feature kPinSetupForManagedUsers;
COMPONENT_EXPORT(ASH_CONSTANTS) extern const base::Feature kPipRoundedCorners;
COMPONENT_EXPORT(ASH_CONSTANTS) extern const base::Feature kPluginVmFullscreen;
COMPONENT_EXPORT(ASH_CONSTANTS)
extern const base::Feature kPreferConstantFrameRate;
COMPONENT_EXPORT(ASH_CONSTANTS)
Expand Down Expand Up @@ -399,6 +396,8 @@ COMPONENT_EXPORT(ASH_CONSTANTS)
extern const base::Feature kSmartDimExperimentalComponent;
COMPONENT_EXPORT(ASH_CONSTANTS)
extern const base::Feature kSmartLockUIRevamp;
COMPONENT_EXPORT(ASH_CONSTANTS)
extern const base::Feature kSnoopingProtection;
COMPONENT_EXPORT(ASH_CONSTANTS) extern const base::Feature kStylusBatteryStatus;
COMPONENT_EXPORT(ASH_CONSTANTS) extern const base::Feature kSyncConsentOptional;
COMPONENT_EXPORT(ASH_CONSTANTS)
Expand Down Expand Up @@ -516,7 +515,6 @@ bool IsHoldingSpaceInProgressDownloadsIntegrationEnabled();
COMPONENT_EXPORT(ASH_CONSTANTS)
bool IsHoldingSpaceIncognitoProfileIntegrationEnabled();
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsHostnameSettingEnabled();
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsHpsNotifyEnabled();
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsIdleInhibitEnabled();
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsInputInDiagnosticsAppEnabled();
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsInputNoiseCancellationUiEnabled();
Expand Down Expand Up @@ -582,6 +580,7 @@ COMPONENT_EXPORT(ASH_CONSTANTS)
bool IsSettingsAppNotificationSettingsEnabled();
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsShelfLauncherNudgeEnabled();
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsShimlessRMAFlowEnabled();
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsSnoopingProtectionEnabled();
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsSyncSettingsCategorizationEnabled();
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsSyncConsentOptionalEnabled();
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsStylusBatteryStatusEnabled();
Expand Down
1 change: 0 additions & 1 deletion ash/public/cpp/external_arc/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ static_library("external_arc") {
"//ui/aura",
"//ui/color",
"//ui/message_center",
"//ui/native_theme",
"//ui/views",
"//ui/wm",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -661,8 +661,7 @@ void ArcNotificationContentView::Layout() {
const gfx::Size surface_size = surface_->GetSize();
if (!surface_size.IsEmpty()) {
const float factor =
static_cast<float>(message_center::kNotificationWidth -
kScrollBarWidth) /
static_cast<float>(message_center::kNotificationWidth) /
(surface_size.width());
transform.Scale(factor, factor);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/message_center/views/notification_background_painter.h"
#include "ui/message_center/views/notification_control_buttons_view.h"
#include "ui/native_theme/native_theme.h"
#include "ui/native_theme/overlay_scrollbar_constants_aura.h"
#include "ui/views/controls/native/native_view_host.h"
#include "ui/views/widget/widget_observer.h"

Expand Down Expand Up @@ -57,10 +55,6 @@ class ArcNotificationContentView
ArcNotificationContentView& operator=(const ArcNotificationContentView&) = delete;
~ArcNotificationContentView() override;

// Width of scrollbar, to reduce the notification content width.
constexpr static int kScrollBarWidth =
ui::kOverlayScrollbarThumbWidthPressed + ui::kOverlayScrollbarStrokeWidth;

void Update(const message_center::Notification& notification);
message_center::NotificationControlButtonsView* GetControlButtonsView();
void UpdateControlButtonsVisibility();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,7 @@ gfx::Size ArcNotificationView::CalculatePreferredSize() const {

void ArcNotificationView::Layout() {
// Setting the bounds before calling the parent to prevent double Layout.
gfx::Rect content_bounds = GetContentsBounds();
content_bounds.set_width(content_bounds.width() -
ArcNotificationContentView::kScrollBarWidth);

content_view_->SetBoundsRect(content_bounds);
content_view_->SetBoundsRect(GetContentsBounds());

message_center::MessageView::Layout();

Expand Down
2 changes: 2 additions & 0 deletions ash/strings/ash_strings_af.xtb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Hier is 'n paar dinge wat jy kan probeer om aan die gang te kom.</translation>
<translation id="1047773237499189053">Nuwe kenmerk is beskikbaar. Gebruik oppylsleutel om meer te wete te kom.</translation>
<translation id="1052916631016577720">Itemskandering</translation>
<translation id="1056775291175587022">Geen netwerke nie</translation>
<translation id="1056898198331236512">Waarskuwing</translation>
<translation id="1059194134494239015"><ph name="DISPLAY_NAME" />: <ph name="RESOLUTION" /></translation>
<translation id="1062407476771304334">Vervang</translation>
<translation id="1073899992769346247">Vervang of herlaai die battery</translation>
Expand Down Expand Up @@ -250,6 +251,7 @@ Hier is 'n paar dinge wat jy kan probeer om aan die gang te kom.</translation>
<translation id="2825619548187458965">Rak</translation>
<translation id="2841907151129139818">Het na tabletmodus oorgeskakel</translation>
<translation id="2844169650293029770">USB C-toestel (voorste poort aan linkerkant)</translation>
<translation id="2849936225196189499">Kritiek</translation>
<translation id="2860184359326882502">Beste passing</translation>
<translation id="2865888419503095837">Netwerkinligting</translation>
<translation id="2872961005593481000">Skakel af</translation>
Expand Down
2 changes: 2 additions & 0 deletions ash/strings/ash_strings_am.xtb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<translation id="1047773237499189053">አዲስ ባህሪ ይገኛል፣ የበለጠ ለመረዳት የላይ ቀስት ቁልፍን ይጠቀሙ።</translation>
<translation id="1052916631016577720">የንጥል ቅኝት</translation>
<translation id="1056775291175587022">ምንም አውታረ መረቦች የሉም</translation>
<translation id="1056898198331236512">ማስጠንቀቂያ</translation>
<translation id="1059194134494239015"><ph name="DISPLAY_NAME" />፦ <ph name="RESOLUTION" /></translation>
<translation id="1062407476771304334">ተካ</translation>
<translation id="1073899992769346247">ባትሪውን ይተኩት ወይም ዳግም ኃይል ይሙሉ</translation>
Expand Down Expand Up @@ -250,6 +251,7 @@
<translation id="2825619548187458965">መደርደሪያ</translation>
<translation id="2841907151129139818">ወደ የጡባዊ ሁነታ ተቀይሯል</translation>
<translation id="2844169650293029770">USB-C መሣሪያ (የግራ ጎን የፊት ወደብ)</translation>
<translation id="2849936225196189499">ዋነኛ</translation>
<translation id="2860184359326882502">ምርጥ ተዛማጅ</translation>
<translation id="2865888419503095837">የአውታረ መረብ መረጃ</translation>
<translation id="2872961005593481000">ዝጋ</translation>
Expand Down
Loading

0 comments on commit eecf090

Please sign in to comment.