Commit 686756be authored by Nico Weber's avatar Nico Weber

mac: Remove more uses of BUILDFLAG(MAC_VIEWS_BROWSER).

Bug: 832676
Change-Id: Iaac83b8248816993554baeefc03740d21f870370
Reviewed-on: https://chromium-review.googlesource.com/1256145Reviewed-by: default avatarMark Mentovai <mark@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595832}
parent eaacef69
...@@ -58,7 +58,6 @@ ...@@ -58,7 +58,6 @@
#include "net/test/embedded_test_server/embedded_test_server.h" #include "net/test/embedded_test_server/embedded_test_server.h"
#include "services/service_manager/sandbox/switches.h" #include "services/service_manager/sandbox/switches.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
#include "ui/base/ui_features.h"
#if !defined(OS_CHROMEOS) #if !defined(OS_CHROMEOS)
#include "chrome/browser/ui/startup/default_browser_infobar_delegate.h" #include "chrome/browser/ui/startup/default_browser_infobar_delegate.h"
...@@ -68,10 +67,6 @@ ...@@ -68,10 +67,6 @@
#include "chrome/browser/ui/cocoa/keystone_infobar_delegate.h" #include "chrome/browser/ui/cocoa/keystone_infobar_delegate.h"
#endif #endif
#if defined(OS_MACOSX) && !BUILDFLAG(MAC_VIEWS_BROWSER)
#include "chrome/browser/ui/startup/session_crashed_infobar_delegate.h"
#endif
#if !defined(USE_AURA) #if !defined(USE_AURA)
#include "chrome/browser/translate/chrome_translate_client.h" #include "chrome/browser/translate/chrome_translate_client.h"
#include "components/translate/core/browser/translate_infobar_delegate.h" #include "components/translate/core/browser/translate_infobar_delegate.h"
......
...@@ -146,7 +146,6 @@ jumbo_split_static_library("ui") { ...@@ -146,7 +146,6 @@ jumbo_split_static_library("ui") {
# See crbug.com/590850 # See crbug.com/590850
"content_settings/content_setting_media_menu_model.cc", "content_settings/content_setting_media_menu_model.cc",
"content_settings/content_setting_media_menu_model.h", "content_settings/content_setting_media_menu_model.h",
"proximity_auth/proximity_auth_error_bubble_stub.cc",
] ]
} }
...@@ -1942,12 +1941,7 @@ jumbo_split_static_library("ui") { ...@@ -1942,12 +1941,7 @@ jumbo_split_static_library("ui") {
"webui/signin/sync_confirmation_ui.h", "webui/signin/sync_confirmation_ui.h",
"webui/signin/user_manager_screen_handler.cc", "webui/signin/user_manager_screen_handler.cc",
"webui/signin/user_manager_screen_handler.h", "webui/signin/user_manager_screen_handler.h",
"webui/welcome/nux_helper.cc",
"webui/welcome/nux_helper.h",
"webui/welcome/welcome_handler.cc",
"webui/welcome/welcome_handler.h",
"webui/welcome/welcome_ui.cc",
"webui/welcome/welcome_ui.h",
# TODO(scottchen): nux/set_as_default_handler is here because it depends # TODO(scottchen): nux/set_as_default_handler is here because it depends
# on settings_default_browser_handler, but that deps currently can't # on settings_default_browser_handler, but that deps currently can't
# be added in nux/BUILD.gn due to circular dependency. # be added in nux/BUILD.gn due to circular dependency.
...@@ -1955,6 +1949,12 @@ jumbo_split_static_library("ui") { ...@@ -1955,6 +1949,12 @@ jumbo_split_static_library("ui") {
# a shareable location (e.g. ui/webui/settings/BUILD.gn). # a shareable location (e.g. ui/webui/settings/BUILD.gn).
"webui/welcome/nux/set_as_default_handler.cc", "webui/welcome/nux/set_as_default_handler.cc",
"webui/welcome/nux/set_as_default_handler.h", "webui/welcome/nux/set_as_default_handler.h",
"webui/welcome/nux_helper.cc",
"webui/welcome/nux_helper.h",
"webui/welcome/welcome_handler.cc",
"webui/welcome/welcome_handler.h",
"webui/welcome/welcome_ui.cc",
"webui/welcome/welcome_ui.h",
] ]
# TODO(scottchen): Remove if-check once nux files are non-exclusive # TODO(scottchen): Remove if-check once nux files are non-exclusive
......
...@@ -2640,15 +2640,16 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, DISABLED_ChangeDisplayMode) { ...@@ -2640,15 +2640,16 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, DISABLED_ChangeDisplayMode) {
CheckDisplayModeMQ(ASCIIToUTF16("fullscreen"), app_contents); CheckDisplayModeMQ(ASCIIToUTF16("fullscreen"), app_contents);
} }
#if defined(OS_MACOSX)
// The size computation on popups is wrong in MacViews, https://crbug.com/834908
#define MAYBE_TestPopupBounds DISABLED_TestPopupBounds
#else
#define MAYBE_TestPopupBounds TestPopupBounds
#endif
// Test to ensure the bounds of popup, devtool, and app windows are properly // Test to ensure the bounds of popup, devtool, and app windows are properly
// restored. // restored.
IN_PROC_BROWSER_TEST_F(BrowserTest, TestPopupBounds) { IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_TestPopupBounds) {
#if BUILDFLAG(MAC_VIEWS_BROWSER)
// The size computation on popups is wrong in MacViews:
// https://crbug.com/834908.
if (!views_mode_controller::IsViewsBrowserCocoa())
return;
#endif
// TODO(tdanderson|pkasting): Change this to verify that the contents bounds // TODO(tdanderson|pkasting): Change this to verify that the contents bounds
// set by params.initial_bounds are the same as the contents bounds in the // set by params.initial_bounds are the same as the contents bounds in the
// initialized window. See crbug.com/585856. // initialized window. See crbug.com/585856.
......
...@@ -108,18 +108,6 @@ void ShowSSLClientCertificateSelectorCocoa( ...@@ -108,18 +108,6 @@ void ShowSSLClientCertificateSelectorCocoa(
[selector displayForWebContents:contents clientCerts:std::move(client_certs)]; [selector displayForWebContents:contents clientCerts:std::move(client_certs)];
} }
#if !BUILDFLAG(MAC_VIEWS_BROWSER)
void ShowSSLClientCertificateSelector(
content::WebContents* contents,
net::SSLCertRequestInfo* cert_request_info,
net::ClientCertIdentityList client_certs,
std::unique_ptr<content::ClientCertificateDelegate> delegate) {
return ShowSSLClientCertificateSelectorCocoa(contents, cert_request_info,
std::move(client_certs),
std::move(delegate));
}
#endif
} // namespace chrome } // namespace chrome
namespace { namespace {
......
...@@ -726,9 +726,6 @@ void ContentSettingSensorsImageModel::UpdateFromWebContents( ...@@ -726,9 +726,6 @@ void ContentSettingSensorsImageModel::UpdateFromWebContents(
gfx::Image ContentSettingImageModel::GetIcon(SkColor icon_color) const { gfx::Image ContentSettingImageModel::GetIcon(SkColor icon_color) const {
int icon_size = GetLayoutConstant(LOCATION_BAR_ICON_SIZE); int icon_size = GetLayoutConstant(LOCATION_BAR_ICON_SIZE);
#if defined(OS_MACOSX) && !BUILDFLAG(MAC_VIEWS_BROWSER)
icon_size = gfx::kFaviconSize;
#endif
return gfx::Image(gfx::CreateVectorIconWithBadge(*icon_, icon_size, return gfx::Image(gfx::CreateVectorIconWithBadge(*icon_, icon_size,
icon_color, *icon_badge_)); icon_color, *icon_badge_));
} }
......
// Copyright 2015 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/ui/proximity_auth/proximity_auth_error_bubble.h"
#include "base/logging.h"
#include "ui/base/ui_features.h"
#if !BUILDFLAG(MAC_VIEWS_BROWSER)
void ShowProximityAuthErrorBubble(const base::string16& message,
const gfx::Range& link_range,
const GURL& link_url,
const gfx::Rect& anchor_rect,
content::WebContents* web_contents) {
NOTIMPLEMENTED();
}
void HideProximityAuthErrorBubble() {
NOTIMPLEMENTED();
}
#endif
...@@ -11,18 +11,14 @@ ...@@ -11,18 +11,14 @@
#include "chrome/browser/ui/exclusive_access/fullscreen_controller_test.h" #include "chrome/browser/ui/exclusive_access/fullscreen_controller_test.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/test/test_browser_dialog.h" #include "chrome/browser/ui/test/test_browser_dialog.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/frame/immersive_mode_controller.h"
#include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/in_process_browser_test.h"
#include "components/zoom/zoom_controller.h" #include "components/zoom/zoom_controller.h"
#include "extensions/browser/extension_zoom_request_client.h" #include "extensions/browser/extension_zoom_request_client.h"
#include "extensions/common/extension_builder.h" #include "extensions/common/extension_builder.h"
#include "ui/base/ui_features.h"
#include "ui/views/test/test_widget_observer.h" #include "ui/views/test/test_widget_observer.h"
#if !defined(OS_MACOSX) || BUILDFLAG(MAC_VIEWS_BROWSER)
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/frame/immersive_mode_controller.h"
#endif
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
#include "ash/public/cpp/immersive/immersive_fullscreen_controller_test_api.h" #include "ash/public/cpp/immersive/immersive_fullscreen_controller_test_api.h"
#include "chrome/browser/ui/views/frame/immersive_mode_controller_ash.h" #include "chrome/browser/ui/views/frame/immersive_mode_controller_ash.h"
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include "net/test/embedded_test_server/http_request.h" #include "net/test/embedded_test_server/http_request.h"
#include "net/test/embedded_test_server/http_response.h" #include "net/test/embedded_test_server/http_response.h"
#include "testing/gmock/include/gmock/gmock.h" #include "testing/gmock/include/gmock/gmock.h"
#include "ui/base/ui_features.h"
#include "ui/views/window/dialog_client_view.h" #include "ui/views/window/dialog_client_view.h"
using net::test_server::BasicHttpResponse; using net::test_server::BasicHttpResponse;
...@@ -380,12 +379,5 @@ IN_PROC_BROWSER_TEST_F(PasswordBubbleInteractiveUiTest, AutoSigninNoFocus) { ...@@ -380,12 +379,5 @@ IN_PROC_BROWSER_TEST_F(PasswordBubbleInteractiveUiTest, AutoSigninNoFocus) {
ui_test_utils::BrowserActivationWaiter waiter(browser()); ui_test_utils::BrowserActivationWaiter waiter(browser());
waiter.WaitForActivation(); waiter.WaitForActivation();
// Sign-in dialogs opened for inactive browser windows do not auto-close on
// MacOS. This matches existing Cocoa bubble behavior.
// TODO(varkha): Remove the limitation as part of http://crbug/671916 .
#if !defined(OS_MACOSX) || BUILDFLAG(MAC_VIEWS_BROWSER)
EXPECT_FALSE(IsBubbleShowing()); EXPECT_FALSE(IsBubbleShowing());
#else
EXPECT_TRUE(IsBubbleShowing());
#endif
} }
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/test/test_browser_dialog.h" #include "chrome/browser/ui/test/test_browser_dialog.h"
#include "chrome/browser/ui/user_manager.h" #include "chrome/browser/ui/user_manager.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/profiles/user_manager_view.h" #include "chrome/browser/ui/views/profiles/user_manager_view.h"
#include "chrome/browser/ui/views/toolbar/toolbar_view.h" #include "chrome/browser/ui/views/toolbar/toolbar_view.h"
#include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_paths.h"
...@@ -45,10 +46,6 @@ ...@@ -45,10 +46,6 @@
#include "ui/views/controls/button/label_button.h" #include "ui/views/controls/button/label_button.h"
#include "ui/views/controls/webview/webview.h" #include "ui/views/controls/webview/webview.h"
#if !defined(OS_MACOSX) || BUILDFLAG(MAC_VIEWS_BROWSER)
#include "chrome/browser/ui/views/frame/browser_view.h"
#endif
namespace { namespace {
Profile* CreateTestingProfile(const base::FilePath& path) { Profile* CreateTestingProfile(const base::FilePath& path) {
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h" #include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "build/buildflag.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/tabs/tab_strip_model.h"
...@@ -24,7 +23,6 @@ ...@@ -24,7 +23,6 @@
#include "content/public/browser/web_contents_observer.h" #include "content/public/browser/web_contents_observer.h"
#include "content/public/test/browser_test_utils.h" #include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_navigation_observer.h" #include "content/public/test/test_navigation_observer.h"
#include "ui/base/ui_features.h"
#include "ui/web_dialogs/test/test_web_dialog_delegate.h" #include "ui/web_dialogs/test/test_web_dialog_delegate.h"
using content::WebContents; using content::WebContents;
...@@ -198,11 +196,6 @@ IN_PROC_BROWSER_TEST_F(ConstrainedWebDialogBrowserTest, ...@@ -198,11 +196,6 @@ IN_PROC_BROWSER_TEST_F(ConstrainedWebDialogBrowserTest,
gfx::Size max_size = gfx::Size(200, 200); gfx::Size max_size = gfx::Size(200, 200);
gfx::Size initial_dialog_size; gfx::Size initial_dialog_size;
// When using Cocoa windows, the initial dimensions must be nonzero.
#if defined(OS_MACOSX) && !BUILDFLAG(MAC_VIEWS_BROWSER)
initial_dialog_size = gfx::Size(1, 1);
#endif
delegate->GetDialogSize(&initial_dialog_size); delegate->GetDialogSize(&initial_dialog_size);
ConstrainedWebDialogDelegate* dialog_delegate = ConstrainedWebDialogDelegate* dialog_delegate =
......
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