Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
… into master.lion
  • Loading branch information
bluebox authored and bluebox committed Jan 21, 2021
2 parents a81dd35 + bd4ea4a commit 76c64c1
Show file tree
Hide file tree
Showing 4,002 changed files with 29,948 additions and 487,561 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 0 additions & 2 deletions .gn
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,7 @@ no_check_targets = [
"//third_party/openscreen/src/osp/public:*", # 1 error
"//third_party/openscreen/src/osp:*", # 13 errors
"//third_party/openscreen/src/util:*", # 29 errors
"//third_party/pdfium/samples:*", # 1 error
"//third_party/pdfium/third_party:*", # 2 errors
"//third_party/pdfium:*", # 1 error

# //v8/*, https://crbug.com/v8/7330
"//v8/src/inspector:*", # 20 errors
Expand Down
36 changes: 18 additions & 18 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -199,23 +199,23 @@ 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': '6eb610f75caddf4a59cc8aa960df86c2b1417ffc',
'skia_revision': 'dd069a9188cc3700d56cabf54e032351340a23b1',
# 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': '0c46f3e0ded50952ed6f46254bbd16776f532aa0',
'v8_revision': 'f9759b6f3a4521d370e66aec8240fcc731cd8fdd',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling swarming_client
# and whatever else without interference from each other.
'swarming_revision': '1a072711d4388c62e02480fabc26c68c24494be9',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling ANGLE
# and whatever else without interference from each other.
'angle_revision': '186fe99034047745c4a626935b3ac2cce557f8f3',
'angle_revision': 'bb3adfa42822d73420ca6a8e96863dcb6a35fc65',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling SwiftShader
# and whatever else without interference from each other.
'swiftshader_revision': '22be66d4071284ffeeef424adc068e9e400835ab',
'swiftshader_revision': '1d5174b9dc3be500d63daf227b163b5e86bbc7b5',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling PDFium
# and whatever else without interference from each other.
Expand All @@ -226,7 +226,7 @@ vars = {
#
# Note this revision should be updated with
# third_party/boringssl/roll_boringssl.py, not roll-dep.
'boringssl_revision': 'f8f35c95550e6796ab8b2c0f8e37e7ce4bc67302',
'boringssl_revision': 'c47bfce062cc5a1b462176be626338224ae2a346',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling google-toolbox-for-mac
# 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 freetype
# and whatever else without interference from each other.
'freetype_revision': 'b594cd90bd053061ea8437bd9f219ee1ced956da',
'freetype_revision': '03ceda9701cd8c08ea5b4ee0c2d558a98fc4ed7d',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling freetype
# and whatever else without interference from each other.
Expand All @@ -270,15 +270,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': 'cc0d6b82f912eb8ce4d5cb00229efc4bf7703f00',
'catapult_revision': 'beb8370c49f2d4942bee5b55c2038996e0ecba37',
# 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': 'a709974a868b7b9e4f638c6a6ab5420404728acc',
'devtools_frontend_revision': '3195d3ea0758fa04ca6cbad72de0dad1e526409d',
# 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 @@ -318,7 +318,7 @@ vars = {
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling feed
# and whatever else without interference from each other.
'dawn_revision': '4b316994ad01ab6b87032c5fd9b53c6d18956d8d',
'dawn_revision': '762814bd922932d3d9da9b220463b6ce5f167d76',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling feed
# and whatever else without interference from each other.
Expand Down Expand Up @@ -350,14 +350,14 @@ vars = {
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling securemessage
# and whatever else without interference from each other.
'securemessage_revision': 'f1637ffadae5638e37d6a97f97d90eb3d9e3f841',
'securemessage_revision': 'fa07beb12babc3b25e0c5b1f38c16aa8cb6b8f84',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling ukey2
# and whatever else without interference from each other.
'ukey2_revision': '0275885d8e6038c39b8a8ca55e75d1d4d1727f47',
# the commit queue can handle CLs rolling feed
# and whatever else without interference from each other.
'tint_revision': '4a110c2726e960502f57a71d30965485b35ab8e4',
'tint_revision': 'afb8cfb2544ba27d0f53d698201d5f24549dab4c',

# TODO(crbug.com/941824): The values below need to be kept in sync
# between //DEPS and //buildtools/DEPS, so if you're updating one,
Expand Down Expand Up @@ -877,7 +877,7 @@ deps = {
# Tools used when building Chrome for Chrome OS. This affects both the Simple
# Chrome workflow, as well as the chromeos-chrome ebuild.
'src/third_party/chromite': {
'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + 'c895583f931412f19fa1222a487ea7cc14e7986a',
'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '54d70996a75a29392f034b91e364e474eecacc33',
'condition': 'checkout_chromeos',
},

Expand All @@ -897,7 +897,7 @@ deps = {
},

'src/third_party/depot_tools':
Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '3253a1deca587cc8dd5d83d790cea8f9654e2c33',
Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '13ea7423612a0766371b1920b15c2273c9c22880',

'src/third_party/devtools-frontend/src':
Var('chromium_git') + '/devtools/devtools-frontend' + '@' + Var('devtools_frontend_revision'),
Expand Down Expand Up @@ -1273,7 +1273,7 @@ deps = {
},

'src/third_party/perfetto':
Var('android_git') + '/platform/external/perfetto.git' + '@' + '2d79f95e908dcbae188e1fedd12e8424cbd14392',
Var('android_git') + '/platform/external/perfetto.git' + '@' + '477bd92472cc77f4579076921ec180b2cea594b2',

'src/third_party/perl': {
'url': Var('chromium_git') + '/chromium/deps/perl.git' + '@' + '6f3e5028eb65d0b4c5fdd792106ac4c84eee1eb3',
Expand Down Expand Up @@ -1515,7 +1515,7 @@ deps = {
Var('chromium_git') + '/external/github.com/gpuweb/cts.git' + '@' + '3c2fe3888658d82b47ca831d59a2e07579619c2d',

'src/third_party/webrtc':
Var('webrtc_git') + '/src.git' + '@' + '6dcbcead3da45604b84aef9d9496689fef5ff8f5',
Var('webrtc_git') + '/src.git' + '@' + '0be1846477949c472a7a2bf42134a7bb08570ac4',

'src/third_party/libgifcodec':
Var('skia_git') + '/libgifcodec' + '@'+ Var('libgifcodec_revision'),
Expand Down Expand Up @@ -1587,15 +1587,15 @@ deps = {
Var('chromium_git') + '/v8/v8.git' + '@' + Var('v8_revision'),

'src-internal': {
'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@6f24f9c44a65ebad096b9e15eb3665b6e45e28db',
'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@ec4d81245d2c688f7ea9fed56962dc90be87e68a',
'condition': 'checkout_src_internal',
},

'src/chromeos/components/help_app_ui/resources/prod': {
'packages': [
{
'package': 'chromeos_internal/apps/help_app/app',
'version': '8CHDR6OyUJOhDursCeohpsk9HLyo0NS2MhikX4GjSPgC',
'version': 'q5f0_t4xSQ4mERL5xl7GFgy2LTd5J4sdL_sUp44LNFUC',
},
],
'condition': 'checkout_chromeos and checkout_src_internal',
Expand All @@ -1606,7 +1606,7 @@ deps = {
'packages': [
{
'package': 'chromeos_internal/apps/media_app/app',
'version': 'V5FYlmqYUEfkAqfSEHzekB27KIr2sLJjCa2Z4wp13lYC',
'version': 'LTwCHYV_Qb_5UAU6yqK2ddjnDLJwx7QJG5dCp9yUO-UC',
},
],
'condition': 'checkout_chromeos and checkout_src_internal',
Expand Down
3 changes: 2 additions & 1 deletion WATCHLISTS
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@
},
'apps_intent_helper': {
'filepath': 'chrome/browser/apps/intent_helper/|'\
'chrome/browser/chromeos/apps/intent_helper/'
'chrome/browser/chromeos/apps/intent_helper/|'\
'components/arc/intent_helper/'
},
'arc': {
'filepath': 'arc/',
Expand Down
2 changes: 1 addition & 1 deletion android_webview/browser/aw_feature_list_creator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ GetSwitchDependentFeatureOverrides(const base::CommandLine& command_line) {
// default.
if (command_line.HasSwitch(switches::kWebViewEnableModernCookieSameSite)) {
feature_overrides.push_back(
std::make_pair(net::features::kSchemefulSameSite,
std::make_pair(std::cref(net::features::kSchemefulSameSite),
base::FeatureList::OVERRIDE_ENABLE_FEATURE));
}

Expand Down
5 changes: 3 additions & 2 deletions android_webview/browser/gfx/aw_vulkan_context_provider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,9 @@ void AwVulkanContextProvider::EnqueueSecondaryCBPostSubmitTask(
post_submit_tasks_.push_back(std::move(closure));
}

uint32_t AwVulkanContextProvider::GetSyncCpuMemoryLimit() const {
return 0;
base::Optional<uint32_t> AwVulkanContextProvider::GetSyncCpuMemoryLimit()
const {
return base::Optional<uint32_t>();
}

bool AwVulkanContextProvider::Initialize(AwDrawFn_InitVkParams* params) {
Expand Down
2 changes: 1 addition & 1 deletion android_webview/browser/gfx/aw_vulkan_context_provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class AwVulkanContextProvider final : public viz::VulkanContextProvider {
void EnqueueSecondaryCBSemaphores(
std::vector<VkSemaphore> semaphores) override;
void EnqueueSecondaryCBPostSubmitTask(base::OnceClosure closure) override;
uint32_t GetSyncCpuMemoryLimit() const override;
base::Optional<uint32_t> GetSyncCpuMemoryLimit() const override;

VkDevice device() { return globals_->device_queue->GetVulkanDevice(); }
VkQueue queue() { return globals_->device_queue->GetVulkanQueue(); }
Expand Down
3 changes: 2 additions & 1 deletion android_webview/tools/record_netlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import argparse
import logging
import os
import posixpath
import re
import sys
import time
Expand Down Expand Up @@ -90,7 +91,7 @@ def main():

package_name = args.package
device_netlog_file_name = 'netlog.json'
device_netlog_path = os.path.join(
device_netlog_path = posixpath.join(
device.GetApplicationDataDirectory(package_name), 'app_webview',
device_netlog_file_name)

Expand Down
15 changes: 15 additions & 0 deletions ash/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,14 @@ component("ash") {
"policy/policy_recommendation_restorer.h",
"power/hid_battery_util.cc",
"power/hid_battery_util.h",
"projector/projector_controller.cc",
"projector/projector_controller.h",
"projector/projector_metadata_controller.cc",
"projector/projector_metadata_controller.h",
"projector/projector_metadata_model.cc",
"projector/projector_metadata_model.h",
"projector/projector_ui_controller.cc",
"projector/projector_ui_controller.h",
"quick_answers/quick_answers_controller_impl.cc",
"quick_answers/quick_answers_controller_impl.h",
"quick_answers/quick_answers_ui_controller.cc",
Expand Down Expand Up @@ -1746,6 +1754,7 @@ component("ash") {
"//ash/public/cpp/resources:ash_public_unscaled_resources",
"//ash/resources/vector_icons",
"//ash/strings",
"//chromeos/services/machine_learning/public/mojom",
"//chromeos/services/multidevice_setup/public/mojom",
"//chromeos/ui/vector_icons",
"//components/discardable_memory/public/mojom",
Expand Down Expand Up @@ -2149,6 +2158,8 @@ test("ash_unittests") {
"multi_device_setup/multi_device_notification_presenter_unittest.cc",
"policy/policy_recommendation_restorer_unittest.cc",
"power/hid_battery_util_unittest.cc",
"projector/projector_controller_unittest.cc",
"projector/projector_metadata_model_unittest.cc",
"quick_answers/quick_answers_controller_unittest.cc",
"quick_answers/quick_answers_ui_controller_unittest.cc",
"quick_answers/ui/quick_answers_view_unittest.cc",
Expand Down Expand Up @@ -2646,6 +2657,10 @@ static_library("test_support") {
"metrics/task_switch_time_tracker_test_api.h",
"metrics/user_metrics_recorder_test_api.cc",
"metrics/user_metrics_recorder_test_api.h",
"projector/test/mock_projector_metadata_controller.cc",
"projector/test/mock_projector_metadata_controller.h",
"projector/test/mock_projector_ui_controller.cc",
"projector/test/mock_projector_ui_controller.h",
"public/cpp/test/app_list_test_api.h",
"public/cpp/test/shell_test_api.h",
"rotator/screen_rotation_animator_test_api.cc",
Expand Down
1 change: 1 addition & 0 deletions ash/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ include_rules = [
"+chromeos/network",
"+chromeos/services/assistant/public" ,
"+chromeos/services/assistant/test_support",
"+chromeos/services/machine_learning/public",
"+chromeos/services/multidevice_setup/public",
"+chromeos/services/nearby/public",
"+chromeos/services/network_config/public",
Expand Down
21 changes: 20 additions & 1 deletion ash/ambient/ambient_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ void AmbientController::OnAutoShowTimeOut() {
DCHECK(IsUiHidden(ambient_ui_model_.ui_visibility()));

// Show ambient screen after time out.
ambient_ui_model_.SetUiVisibility(AmbientUiVisibility::kShown);
ShowUi();
}

void AmbientController::OnLockStateChanged(bool locked) {
Expand Down Expand Up @@ -403,6 +403,15 @@ void AmbientController::SuspendImminent(
// closing finished.
CloseAllWidgets(/*immediately=*/true);
CloseUi();
is_suspend_imminent_ = true;
}

void AmbientController::SuspendDone(base::TimeDelta sleep_duration) {
is_suspend_imminent_ = false;
// |DismissUI| will restart the lock screen timer if lock screen is active and
// if Ambient mode is enabled, so call it when resuming from suspend to
// restart Ambient mode if applicable.
DismissUI();
}

void AmbientController::OnAuthScanDone(
Expand Down Expand Up @@ -441,6 +450,11 @@ void AmbientController::ShowUi() {
return;
}

if (is_suspend_imminent_) {
VLOG(1) << "Do not show UI when suspend imminent";
return;
}

ambient_ui_model_.SetUiVisibility(AmbientUiVisibility::kShown);
}

Expand All @@ -452,6 +466,11 @@ void AmbientController::ShowHiddenUi() {
return;
}

if (is_suspend_imminent_) {
VLOG(1) << "Do not start hidden UI when suspend imminent";
return;
}

ambient_ui_model_.SetUiVisibility(AmbientUiVisibility::kHidden);
}

Expand Down
7 changes: 7 additions & 0 deletions ash/ambient/ambient_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/scoped_observation.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
#include "chromeos/dbus/power/power_manager_client.h"
#include "components/prefs/pref_change_registrar.h"
Expand Down Expand Up @@ -77,6 +78,7 @@ class ASH_EXPORT AmbientController
void ScreenIdleStateChanged(
const power_manager::ScreenIdleState& idle_state) override;
void SuspendImminent(power_manager::SuspendImminent::Reason reason) override;
void SuspendDone(base::TimeDelta sleep_duration) override;

// fingerprint::mojom::FingerprintObserver:
void OnAuthScanDone(
Expand Down Expand Up @@ -215,6 +217,11 @@ class ASH_EXPORT AmbientController
mojo::Receiver<device::mojom::FingerprintObserver>
fingerprint_observer_receiver_{this};

// Set when |SuspendImminent| is called and cleared when |SuspendDone| is
// called. Used to prevent Ambient mode from reactivating while device is
// going to suspend.
bool is_suspend_imminent_ = false;

base::WeakPtrFactory<AmbientController> weak_ptr_factory_{this};
DISALLOW_COPY_AND_ASSIGN(AmbientController);
};
Expand Down
25 changes: 24 additions & 1 deletion ash/ambient/ambient_controller_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "chromeos/dbus/power/fake_power_manager_client.h"
#include "chromeos/dbus/power/power_manager_client.h"
#include "chromeos/dbus/power_manager/power_supply_properties.pb.h"
#include "chromeos/dbus/power_manager/suspend.pb.h"
#include "ui/events/event.h"
#include "ui/events/keycodes/keyboard_codes_posix.h"
#include "ui/events/pointer_details.h"
Expand Down Expand Up @@ -802,10 +803,32 @@ TEST_F(AmbientControllerTest, ClosesAmbientBeforeSuspend) {
EXPECT_FALSE(ambient_controller()->IsShown());

FastForwardToLockScreenTimeout();
// Ambient mode should not resume after suspend.
// Ambient mode should not resume until SuspendDone is received.
EXPECT_FALSE(ambient_controller()->IsShown());
}

TEST_F(AmbientControllerTest, RestartsAmbientAfterSuspend) {
LockScreen();
FastForwardToLockScreenTimeout();

EXPECT_TRUE(ambient_controller()->IsShown());

SimulateSystemSuspendAndWait(
power_manager::SuspendImminent::Reason::SuspendImminent_Reason_IDLE);

EXPECT_FALSE(ambient_controller()->IsShown());

// This call should be blocked by prior |SuspendImminent| until |SuspendDone|.
ambient_controller()->ShowUi();
EXPECT_FALSE(ambient_controller()->IsShown());

SimulateSystemResumeAndWait();

FastForwardToLockScreenTimeout();

EXPECT_TRUE(ambient_controller()->IsShown());
}

TEST_F(AmbientControllerTest, ObservesPrefsWhenAmbientEnabled) {
SetAmbientModeEnabled(false);

Expand Down
Loading

0 comments on commit 76c64c1

Please sign in to comment.