Commit 018f5c02 authored by stuartmorgan's avatar stuartmorgan Committed by Commit bot

Eliminate ui/ios

Per the explanation in the bug, ui/ios should not have been created in
the first place; this code belongs in the ui/gfx subcomponent.

BUG=446643

Review URL: https://codereview.chromium.org/983413004

Cr-Commit-Position: refs/heads/master@{#319720}
parent 9b40df65
...@@ -66,7 +66,6 @@ ...@@ -66,7 +66,6 @@
'../third_party/mojo/mojo_public.gyp:mojo_public_test_utils', '../third_party/mojo/mojo_public.gyp:mojo_public_test_utils',
'../third_party/mojo/mojo_public.gyp:mojo_system', '../third_party/mojo/mojo_public.gyp:mojo_system',
'../ui/base/ui_base_tests.gyp:ui_base_unittests', '../ui/base/ui_base_tests.gyp:ui_base_unittests',
'../ui/ios/ui_ios_tests.gyp:ui_ios_unittests',
'../ui/gfx/gfx_tests.gyp:gfx_unittests', '../ui/gfx/gfx_tests.gyp:gfx_unittests',
], ],
}], }],
......
...@@ -64,11 +64,6 @@ ...@@ -64,11 +64,6 @@
"device type": "iPhone 5", "device type": "iPhone 5",
"os": "8.1" "os": "8.1"
}, },
{
"app": "ui_ios_unittests",
"device type": "iPhone 5",
"os": "8.1"
},
{ {
"app": "sync_unit_tests", "app": "sync_unit_tests",
"device type": "iPhone 5", "device type": "iPhone 5",
......
...@@ -64,11 +64,6 @@ ...@@ -64,11 +64,6 @@
"device type": "iPhone Retina (4-inch)", "device type": "iPhone Retina (4-inch)",
"os": "7.1" "os": "7.1"
}, },
{
"app": "ui_ios_unittests",
"device type": "iPhone Retina (4-inch)",
"os": "7.1"
},
{ {
"app": "sync_unit_tests", "app": "sync_unit_tests",
"device type": "iPhone Retina (4-inch)", "device type": "iPhone Retina (4-inch)",
......
...@@ -64,11 +64,6 @@ ...@@ -64,11 +64,6 @@
"device type": "iPhone Retina (4-inch)", "device type": "iPhone Retina (4-inch)",
"os": "7.1" "os": "7.1"
}, },
{
"app": "ui_ios_unittests",
"device type": "iPhone Retina (4-inch)",
"os": "7.1"
},
{ {
"app": "sync_unit_tests", "app": "sync_unit_tests",
"device type": "iPhone Retina (4-inch)", "device type": "iPhone Retina (4-inch)",
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include "base/ios/ios_util.h" #include "base/ios/ios_util.h"
#import "ios/chrome/browser/ui/uikit_ui_util.h" #import "ios/chrome/browser/ui/uikit_ui_util.h"
#include "ui/ios/uikit_util.h" #include "ui/gfx/ios/uikit_util.h"
bool IsIPadIdiom() { bool IsIPadIdiom() {
UIUserInterfaceIdiom idiom = [[UIDevice currentDevice] userInterfaceIdiom]; UIUserInterfaceIdiom idiom = [[UIDevice currentDevice] userInterfaceIdiom];
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
#include "ios/chrome/browser/ui/ui_util.h" #include "ios/chrome/browser/ui/ui_util.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
#include "ui/base/l10n/l10n_util_mac.h" #include "ui/base/l10n/l10n_util_mac.h"
#include "ui/gfx/ios/uikit_util.h"
#include "ui/gfx/scoped_cg_context_save_gstate_mac.h" #include "ui/gfx/scoped_cg_context_save_gstate_mac.h"
#include "ui/ios/uikit_util.h"
namespace { namespace {
......
...@@ -212,6 +212,10 @@ ...@@ -212,6 +212,10 @@
'image/image_util_ios.mm', 'image/image_util_ios.mm',
'interpolated_transform.cc', 'interpolated_transform.cc',
'interpolated_transform.h', 'interpolated_transform.h',
'ios/NSString+CrStringDrawing.h',
'ios/NSString+CrStringDrawing.mm',
'ios/uikit_util.h',
'ios/uikit_util.mm',
'linux_font_delegate.cc', 'linux_font_delegate.cc',
'linux_font_delegate.h', 'linux_font_delegate.h',
'mac/coordinate_conversion.h', 'mac/coordinate_conversion.h',
...@@ -313,12 +317,13 @@ ...@@ -313,12 +317,13 @@
], ],
'conditions': [ 'conditions': [
['OS=="ios"', { ['OS=="ios"', {
'dependencies': [ # Linkable dependents need to set the linker flag '-ObjC' in order to
'<(DEPTH)/ui/ios/ui_ios.gyp:ui_ios', # use the categories in this target (e.g. NSString+CrStringDrawing.h).
], 'link_settings': {
# iOS only uses a subset of UI. 'xcode_settings': {'OTHER_LDFLAGS': ['-ObjC']},
'sources/': [ },
['exclude', '^codec/jpeg_codec\\.cc$'], 'sources!': [
'codec/jpeg_codec.cc',
], ],
}, { }, {
'dependencies': [ 'dependencies': [
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
'image/image_ios_unittest.mm', 'image/image_ios_unittest.mm',
'image/image_skia_unittest.cc', 'image/image_skia_unittest.cc',
'image/image_unittest.cc', 'image/image_unittest.cc',
'ios/NSString+CrStringDrawing_unittest.mm',
'ios/uikit_util_unittest.mm',
'screen_unittest.cc', 'screen_unittest.cc',
'test/run_all_unittests.cc', 'test/run_all_unittests.cc',
'text_elider_unittest.cc', 'text_elider_unittest.cc',
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef UI_IOS_NSSTRING_CR_STRING_DRAWING_H_ #ifndef UI_GFX_IOS_NSSTRING_CR_STRING_DRAWING_H_
#define UI_IOS_NSSTRING_CR_STRING_DRAWING_H_ #define UI_GFX_IOS_NSSTRING_CR_STRING_DRAWING_H_
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
...@@ -52,4 +52,4 @@ ...@@ -52,4 +52,4 @@
@end @end
#endif // UI_IOS_NSSTRING_CR_STRING_DRAWING_H_ #endif // UI_GFX_IOS_NSSTRING_CR_STRING_DRAWING_H_
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#import "ui/ios/NSString+CrStringDrawing.h" #import "ui/gfx/ios/NSString+CrStringDrawing.h"
#include "base/logging.h" #include "base/logging.h"
#include "ui/ios/uikit_util.h" #include "ui/gfx/ios/uikit_util.h"
@implementation NSString (CrStringDrawing) @implementation NSString (CrStringDrawing)
......
// Copyright 2014 The Chromium Authors. All rights reserved. // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#import "ui/ios/NSString+CrStringDrawing.h" #import "ui/gfx/ios/NSString+CrStringDrawing.h"
#include "base/mac/scoped_nsobject.h" #include "base/mac/scoped_nsobject.h"
#include "base/strings/stringprintf.h" #include "base/strings/stringprintf.h"
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef UI_IOS_UIKIT_UTIL_H_ #ifndef UI_GFX_IOS_UIKIT_UTIL_H_
#define UI_IOS_UIKIT_UTIL_H_ #define UI_GFX_IOS_UIKIT_UTIL_H_
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
...@@ -23,4 +23,4 @@ CGSize AlignSizeToUpperPixel(CGSize size) WARN_UNUSED_RESULT; ...@@ -23,4 +23,4 @@ CGSize AlignSizeToUpperPixel(CGSize size) WARN_UNUSED_RESULT;
} // namespace ui } // namespace ui
#endif // UI_IOS_UIKIT_UTIL_H_ #endif // UI_GFX_IOS_UIKIT_UTIL_H_
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "ui/ios/uikit_util.h" #include "ui/gfx/ios/uikit_util.h"
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include "base/basictypes.h" #include "base/basictypes.h"
#include "testing/platform_test.h" #include "testing/platform_test.h"
#import "ui/ios/uikit_util.h" #import "ui/gfx/ios/uikit_util.h"
namespace { namespace {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "ui/gfx/font.h" #include "ui/gfx/font.h"
#include "ui/gfx/font_render_params.h" #include "ui/gfx/font_render_params.h"
#include "ui/ios/NSString+CrStringDrawing.h" #include "ui/gfx/ios/NSString+CrStringDrawing.h"
namespace gfx { namespace gfx {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include "base/strings/sys_string_conversions.h" #include "base/strings/sys_string_conversions.h"
#include "ui/gfx/font_list.h" #include "ui/gfx/font_list.h"
#include "ui/ios/NSString+CrStringDrawing.h" #include "ui/gfx/ios/NSString+CrStringDrawing.h"
namespace gfx { namespace gfx {
......
# Copyright 2014 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.
{
'variables': {
'chromium_code': 1,
},
'targets': [
{
'target_name': 'ui_ios',
'type': 'static_library',
# Linkable dependents need to set the linker flag '-ObjC' in order to use
# the categories in this target (e.g. NSString+CrStringDrawing.h).
'link_settings': {
'xcode_settings': {'OTHER_LDFLAGS': ['-ObjC']},
},
'include_dirs': [
'../..',
],
'sources': [
'NSString+CrStringDrawing.h',
'NSString+CrStringDrawing.mm',
'uikit_util.h',
'uikit_util.mm',
],
},
],
}
# Copyright 2014 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.
{
'variables': {
'chromium_code': 1,
},
'targets': [
{
'target_name': 'ui_ios_unittests',
'type': '<(gtest_target_type)',
'dependencies': [
'../../base/base.gyp:base',
'../../base/base.gyp:run_all_unittests',
'../../base/base.gyp:test_support_base',
'../../testing/gtest.gyp:gtest',
'ui_ios.gyp:ui_ios',
],
'sources' : [
'NSString+CrStringDrawing_unittest.mm',
'uikit_util_unittest.mm',
],
},
],
}
\ No newline at end of file
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