Skip to content

Commit

Permalink
sync with 70.0.3538.102
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerwang committed Nov 10, 2018
1 parent 501cad8 commit e65c407
Show file tree
Hide file tree
Showing 46 changed files with 405 additions and 161 deletions.
6 changes: 3 additions & 3 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,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': '193565807f7fd2a2c14e21b44c545cc03ebe134f',
'skia_revision': '8adc53ec0ee4bbafbd9925024df38437c0fcf88a',
# 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': '2c2b5fba74a71300329a8e486cb523be1dead2e0',
'v8_revision': '2084ccf6b4b5bdadb6566b81ac4c350bb0b6b2ce',
# 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.
Expand Down Expand Up @@ -1134,7 +1134,7 @@ deps = {
# Var('chromium_git') + '/v8/v8.git' + '@' + Var('v8_revision'),

'src-internal': {
'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@b591c47fac8bf14a03aa7bd4e7936f52e9333563',
'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@d2d2cb4b73b14b71b7a8d2a90d61f9ff3c9168ea',
'condition': 'checkout_src_internal',
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace crash_reporter {
namespace {

// TODO(gsennton) lower the following value before pushing to stable:
const double minidump_generation_user_fraction = 1.0;
const double minidump_generation_user_fraction = 0.01;

// Returns whether the current process should be reporting crashes through
// minidumps. This function should only be called once per process - the return
Expand Down
22 changes: 9 additions & 13 deletions ash/accessibility/touch_exploration_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,11 @@ ui::EventRewriteStatus TouchExplorationController::RewriteEvent(
if (event.type() == ui::ET_TOUCH_PRESSED)
seen_press_ = true;

// Touch events come through in screen pixels, but untransformed. This is the
// raw coordinate not yet mapped to the root window's coordinate system or the
// screen. Convert it into the root window's coordinate system, in DIP which
// is what the rest of this class expects.
// Touch events come through in screen pixels.
gfx::Point location = touch_event.location();
gfx::Point root_location = touch_event.root_location();
root_window_->GetHost()->ConvertScreenInPixelsToDIP(&location);
root_window_->GetHost()->ConvertScreenInPixelsToDIP(&root_location);
root_window_->GetHost()->ConvertPixelsToDIP(&location);
root_window_->GetHost()->ConvertPixelsToDIP(&root_location);

if (!exclude_bounds_.IsEmpty()) {
bool in_exclude_area = exclude_bounds_.Contains(location);
Expand Down Expand Up @@ -473,7 +470,7 @@ ui::EventRewriteStatus TouchExplorationController::InTouchExploration(
// Rewrite as a mouse-move event.
// |event| locations are in DIP; see |RewriteEvent|. We need to dispatch
// |screen coords.
gfx::PointF location_f(ConvertDIPToScreenInPixels(event.location_f()));
gfx::PointF location_f(ConvertDIPToPixels(event.location_f()));
*rewritten_event = CreateMouseMoveEvent(location_f, event.flags());
last_touch_exploration_ = std::make_unique<ui::TouchEvent>(event);
if (anchor_point_state_ != ANCHOR_POINT_EXPLICITLY_SET)
Expand Down Expand Up @@ -507,7 +504,7 @@ ui::EventRewriteStatus TouchExplorationController::InOneFingerPassthrough(
// |event| locations are in DIP; see |RewriteEvent|. We need to dispatch
// screen coordinates.
gfx::PointF location_f(
ConvertDIPToScreenInPixels(event.location_f() - passthrough_offset_));
ConvertDIPToPixels(event.location_f() - passthrough_offset_));
std::unique_ptr<ui::TouchEvent> new_event(new ui::TouchEvent(
event.type(), gfx::Point(), event.time_stamp(), event.pointer_details()));
new_event->set_location_f(location_f);
Expand Down Expand Up @@ -535,7 +532,7 @@ ui::EventRewriteStatus TouchExplorationController::InTouchExploreSecondPress(
// TODO(dmazzoni): fix for multiple displays. http://crbug.com/616793
// |event| locations are in DIP; see |RewriteEvent|. We need to dispatch
// screen coordinates.
gfx::PointF location_f(ConvertDIPToScreenInPixels(anchor_point_dip_));
gfx::PointF location_f(ConvertDIPToPixels(anchor_point_dip_));
new_event->set_location_f(location_f);
new_event->set_root_location_f(location_f);
new_event->set_flags(event.flags());
Expand Down Expand Up @@ -786,8 +783,7 @@ void TouchExplorationController::DispatchEvent(ui::Event* event) {
SetTouchAccessibilityFlag(event);
if (event->IsLocatedEvent()) {
ui::LocatedEvent* located_event = event->AsLocatedEvent();
gfx::PointF screen_point(
ConvertDIPToScreenInPixels(located_event->location_f()));
gfx::PointF screen_point(ConvertDIPToPixels(located_event->location_f()));
located_event->set_location_f(screen_point);
located_event->set_root_location_f(screen_point);
}
Expand Down Expand Up @@ -1148,10 +1144,10 @@ float TouchExplorationController::GetSplitTapTouchSlop() {
return gesture_detector_config_.touch_slop * 3;
}

gfx::PointF TouchExplorationController::ConvertDIPToScreenInPixels(
gfx::PointF TouchExplorationController::ConvertDIPToPixels(
const gfx::PointF& location_f) {
gfx::Point location(gfx::ToFlooredPoint(location_f));
root_window_->GetHost()->ConvertDIPToScreenInPixels(&location);
root_window_->GetHost()->ConvertDIPToPixels(&location);
return gfx::PointF(location);
}

Expand Down
11 changes: 8 additions & 3 deletions ash/accessibility/touch_exploration_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,9 @@ class ASH_EXPORT TouchExplorationController
// fingers in place is a bit harder.
float GetSplitTapTouchSlop();

// Convert a gfx::PointF from DIP back to raw screen coordinates.
gfx::PointF ConvertDIPToScreenInPixels(const gfx::PointF& location);
// Convert a gfx::PointF from DIP back to raw screen coordinates. Origin is
// based on its root window host.
gfx::PointF ConvertDIPToPixels(const gfx::PointF& location);

enum State {
// No fingers are down and no events are pending.
Expand Down Expand Up @@ -485,7 +486,7 @@ class ASH_EXPORT TouchExplorationController
// point used when the user double-taps, holds, and drags. This can be
// set either via touch exploration, or by a call to
// SetTouchAccessibilityAnchorPoint when focus moves due to something other
// than touch exploration.
// than touch exploration. Origin of this coordinate is its root window host.
gfx::PointF anchor_point_dip_;

// The current state of the anchor point.
Expand Down Expand Up @@ -517,6 +518,8 @@ class ASH_EXPORT TouchExplorationController
bool VLOG_on_;

// LocatedEvents within this area should be left alone.
// TODO(crbug.com/616793): Multi display support. With this implementation, we
// cannot specify display.
gfx::Rect exclude_bounds_;

// Code that detects a touch-screen gesture to enable or disable
Expand All @@ -528,6 +531,8 @@ class ASH_EXPORT TouchExplorationController
// Any touch exploration that both starts and ends (touch pressed, and
// released) within this rectangle, triggers a simulated single finger tap at
// the anchor point on release.
// TODO(crbug.com/616793): Multi display support. With this implementation, we
// cannot specify display.
gfx::Rect lift_activation_bounds_;

// Whether or not we've seen a touch press event yet.
Expand Down
8 changes: 8 additions & 0 deletions ash/session/session_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,14 @@ bool SessionController::IsUserChild() const {
return active_user_type == user_manager::USER_TYPE_CHILD;
}

bool SessionController::IsUserPublicAccount() const {
if (!IsActiveUserSessionStarted())
return false;

user_manager::UserType active_user_type = GetUserSession(0)->user_info->type;
return active_user_type == user_manager::USER_TYPE_PUBLIC_ACCOUNT;
}

base::Optional<user_manager::UserType> SessionController::GetUserType() const {
if (!IsActiveUserSessionStarted())
return base::nullopt;
Expand Down
3 changes: 3 additions & 0 deletions ash/session/session_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ class ASH_EXPORT SessionController : public mojom::SessionController {
// Returns true if the current user is a child account.
bool IsUserChild() const;

// Returns true if the current user is a public account.
bool IsUserPublicAccount() const;

// Returns the type of the current user, or empty if there is no current user
// logged in.
base::Optional<user_manager::UserType> GetUserType() const;
Expand Down
26 changes: 5 additions & 21 deletions ash/system/unified/managed_device_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,23 @@
namespace ash {

ManagedDeviceView::ManagedDeviceView() : TrayItemView(nullptr) {
Shell::Get()->system_tray_model()->enterprise_domain()->AddObserver(this);
Shell::Get()->session_controller()->AddObserver(this);
CreateImageView();
Update();
OnLoginStatusChanged(Shell::Get()->session_controller()->login_status());
}

ManagedDeviceView::~ManagedDeviceView() {
Shell::Get()->system_tray_model()->enterprise_domain()->RemoveObserver(this);
Shell::Get()->session_controller()->RemoveObserver(this);
}

void ManagedDeviceView::OnEnterpriseDomainChanged() {
EnterpriseDomainModel* model =
Shell::Get()->system_tray_model()->enterprise_domain();
bool old_value = is_enterprise_;
is_enterprise_ = model->active_directory_managed() ||
!model->enterprise_display_domain().empty();
if (is_enterprise_ != old_value)
Update();
}

void ManagedDeviceView::Update() {
if (is_enterprise_) {
void ManagedDeviceView::OnLoginStatusChanged(LoginStatus status) {
SessionController* session = Shell::Get()->session_controller();
if (session->IsUserPublicAccount()) {
image_view()->SetImage(gfx::CreateVectorIcon(
kSystemTrayManagedIcon,
TrayIconColor(Shell::Get()->session_controller()->GetSessionState())));
SetVisible(true);
} else if (is_child_) {
} else if (session->IsUserChild()) {
image_view()->SetImage(gfx::CreateVectorIcon(
kSystemTrayFamilyLinkIcon,
TrayIconColor(Shell::Get()->session_controller()->GetSessionState())));
Expand All @@ -54,9 +43,4 @@ void ManagedDeviceView::Update() {
}
}

void ManagedDeviceView::OnLoginStatusChanged(LoginStatus status) {
SessionController* session = Shell::Get()->session_controller();
is_child_ = status == LoginStatus::SUPERVISED && session->IsUserChild();
}

} // namespace ash
13 changes: 2 additions & 11 deletions ash/system/unified/managed_device_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,24 @@
#define ASH_SYSTEM_UNIFIED_MANAGED_DEVICE_VIEW_H_

#include "ash/session/session_observer.h"
#include "ash/system/enterprise/enterprise_domain_observer.h"
#include "ash/system/tray/tray_item_view.h"
#include "base/macros.h"

namespace ash {

// A view to show an icon in the status tray when the device is managed by
// an organization admin. Observes change of the enterprise domain in order to
// show/hide the icon reflecting the latest status.
// an organization admin. Observes login status in order to show/hide the
// icon reflecting the latest status.
class ManagedDeviceView : public TrayItemView,
public EnterpriseDomainObserver,
public SessionObserver {
public:
ManagedDeviceView();
~ManagedDeviceView() override;

// EnterpriseDomainObserver:
void OnEnterpriseDomainChanged() override;

// SessionObserver:
void OnLoginStatusChanged(LoginStatus status) override;

private:
void Update();

bool is_child_ = false;
bool is_enterprise_ = false;

DISALLOW_COPY_AND_ASSIGN(ManagedDeviceView);
};
Expand Down
2 changes: 1 addition & 1 deletion chrome/VERSION
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MAJOR=70
MINOR=0
BUILD=3538
PATCH=77
PATCH=102
2 changes: 1 addition & 1 deletion chrome/app/google_chrome_strings.grd
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ chromium_strings.grd. -->
Chrome OS is made possible by additional <ph name="BEGIN_LINK_CROS_OSS">&lt;a target="_blank" href="$1"&gt;</ph>open source software<ph name="END_LINK_CROS_OSS">&lt;/a&gt;</ph>.
</message>
<message name="IDS_ABOUT_CROS_WITH_LINUX_VERSION_LICENSE" desc="Additional text displayed beneath the Chromium open source URLs for Chrome OS when Crostini is installed.">
Chrome OS is made possible by additional <ph name="BEGIN_LINK_CROS_OSS">&lt;a target="_blank" href="$1"&gt;</ph>open source software<ph name="END_LINK_CROS_OSS">&lt;/a&gt;</ph>, as is <ph name="BEGIN_LINK_LINUX_OSS">&lt;a target="_blank" href="$1"&gt;</ph>Linux (Beta)<ph name="END_LINK_LINUX_OSS">&lt;/a&gt;</ph>.
Chrome OS is made possible by additional <ph name="BEGIN_LINK_CROS_OSS">&lt;a target="_blank" href="$1"&gt;</ph>open source software<ph name="END_LINK_CROS_OSS">&lt;/a&gt;</ph>, as is <ph name="BEGIN_LINK_LINUX_OSS">&lt;a target="_blank" href="$2"&gt;</ph>Linux (Beta)<ph name="END_LINK_LINUX_OSS">&lt;/a&gt;</ph>.
</message>
<message name="IDS_ABOUT_TERMS_OF_SERVICE" desc="The terms of service label in the About box.">
Google Chrome OS <ph name="TERMS_OF_SERVICE_LINK">&lt;a target="_blank" href="$1"&gt;</ph>Terms of Service<ph name="END_TERMS_OF_SERVICE_LINK">&lt;/a&gt;</ph>
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ jumbo_split_static_library("browser") {
"bookmarks/startup_task_runner_service_factory.h",
"browser_about_handler.cc",
"browser_about_handler.h",
"browser_features.cc",
"browser_features.h",
"browser_process.cc",
"browser_process.h",
"browser_process_impl.cc",
Expand Down
5 changes: 5 additions & 0 deletions chrome/browser/about_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "base/values.h"
#include "build/build_config.h"
#include "cc/base/switches.h"
#include "chrome/browser/browser_features.h"
#include "chrome/browser/data_use_measurement/page_load_capping/chrome_page_load_capping_features.h"
#include "chrome/browser/flag_descriptions.h"
#include "chrome/browser/predictors/loading_predictor_config.h"
Expand Down Expand Up @@ -3579,6 +3580,10 @@ const FeatureEntry kFeatureEntries[] = {
{"disable-lock-screen-apps", flag_descriptions::kDisableLockScreenAppsName,
flag_descriptions::kDisableLockScreenAppsDescription, kOsCrOS,
SINGLE_VALUE_TYPE(chromeos::switches::kDisableLockScreenApps)},
{"double-tap-to-zoom-in-tablet-mode",
flag_descriptions::kDoubleTapToZoomInTabletModeName,
flag_descriptions::kDoubleTapToZoomInTabletModeDescription, kOsCrOS,
FEATURE_VALUE_TYPE(features::kDoubleTapToZoomInTabletMode)},
#endif // defined(OS_CHROMEOS)

#if defined(OS_ANDROID)
Expand Down
16 changes: 16 additions & 0 deletions chrome/browser/browser_features.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/browser_features.h"

namespace features {

#if defined(OS_CHROMEOS)
// Enables being able to zoom a web page by double tapping in Chrome OS tablet
// mode.
const base::Feature kDoubleTapToZoomInTabletMode{
"DoubleTapToZoomInTabletMode", base::FEATURE_DISABLED_BY_DEFAULT};
#endif

} // namespace features
24 changes: 24 additions & 0 deletions chrome/browser/browser_features.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// This file defines the browser-specific base::FeatureList features that are
// not shared with other process types.

#ifndef CHROME_BROWSER_BROWSER_FEATURES_H_
#define CHROME_BROWSER_BROWSER_FEATURES_H_

#include "base/feature_list.h"

namespace features {

// All features in alphabetical order. The features should be documented
// alongside the definition of their values in the .cc file.

#if defined(OS_CHROMEOS)
extern const base::Feature kDoubleTapToZoomInTabletMode;
#endif

} // namespace features

#endif // CHROME_BROWSER_BROWSER_FEATURES_H_
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "chrome/browser/chromeos/chrome_content_browser_client_chromeos_part.h"

#include "base/feature_list.h"
#include "chrome/browser/browser_features.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search/search.h"
#include "chrome/browser/ui/ash/tablet_mode_client.h"
Expand Down Expand Up @@ -76,7 +78,8 @@ void ChromeContentBrowserClientChromeOsPart::OverrideWebkitPrefs(
if (ShouldExcludePage(contents))
return;

web_prefs->double_tap_to_zoom_enabled = true;
web_prefs->double_tap_to_zoom_enabled =
base::FeatureList::IsEnabled(features::kDoubleTapToZoomInTabletMode);
web_prefs->text_autosizing_enabled = true;
web_prefs->shrinks_viewport_contents_to_fit = true;
web_prefs->main_frame_resizes_are_orientation_changes = true;
Expand Down
6 changes: 6 additions & 0 deletions chrome/browser/flag_descriptions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3205,6 +3205,12 @@ const char kDisableTabletSplitViewName[] = "Disable split view in Tablet mode";
const char kDisableTabletSplitViewDescription[] =
"Disable split view for Chrome OS tablet mode.";

const char kDoubleTapToZoomInTabletModeName[] =
"Double-tap to zoom in tablet mode";
const char kDoubleTapToZoomInTabletModeDescription[] =
"If Enabled, double tapping in webpages while in tablet mode will zoom the "
"page.";

const char kEnableAppListSearchAutocompleteName[] =
"App List Search Autocomplete";
const char kEnableAppListSearchAutocompleteDescription[] =
Expand Down
3 changes: 3 additions & 0 deletions chrome/browser/flag_descriptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -1949,6 +1949,9 @@ extern const char kDisableTabletAutohideTitlebarsDescription[];
extern const char kDisableTabletSplitViewName[];
extern const char kDisableTabletSplitViewDescription[];

extern const char kDoubleTapToZoomInTabletModeName[];
extern const char kDoubleTapToZoomInTabletModeDescription[];

extern const char kEnableAppListSearchAutocompleteName[];
extern const char kEnableAppListSearchAutocompleteDescription[];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ void PluginResponseInterceptorURLLoaderThrottle::WillProcessResponse(
transferrable_loader->url_loader = original_loader.PassInterface();
transferrable_loader->url_loader_client = std::move(original_client);
transferrable_loader->head = std::move(deep_copied_response->head);
transferrable_loader->head.intercepted_by_plugin = true;

int64_t expected_content_size = response_head->content_length;
bool embedded = resource_type_ != content::RESOURCE_TYPE_MAIN_FRAME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ oobe-dialog .error-icon {
text-decoration: none;
}

#error-message-md-footer {
overflow: scroll;
}

#offline-network-control {
height: 200px;
margin-bottom: 20px;
Expand Down
Loading

0 comments on commit e65c407

Please sign in to comment.