Commit e3a7c24a authored by sczs's avatar sczs Committed by Commit Bot

[ios] Moves history_popup into its own subdirectory.

For boxing purposes this CL moves the history_popup classes into a 
subdirectory of its own, this way boxing this component will be 
easier. 

Bug: 
Change-Id: If652c9ab145fd268231fee538bfbde048a2a40e4
Reviewed-on: https://chromium-review.googlesource.com/595224
Commit-Queue: Sergio Collazos <sczs@chromium.org>
Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491234}
parent 88d43ade
......@@ -32,12 +32,6 @@ source_set("history") {
"history_service_facade_delegate.h",
"history_util.h",
"history_util.mm",
"tab_history_cell.h",
"tab_history_cell.mm",
"tab_history_popup_controller.h",
"tab_history_popup_controller.mm",
"tab_history_view_controller.h",
"tab_history_view_controller.mm",
]
deps = [
"//base",
......@@ -80,7 +74,6 @@ source_set("history") {
"//net",
"//skia",
"//ui/base",
"//ui/gfx",
"//url",
]
libs = [
......@@ -100,7 +93,6 @@ source_set("unit_tests") {
"history_entry_item_unittest.mm",
"history_search_view_controller_unittest.mm",
"history_util_unittest.mm",
"tab_history_popup_controller_unittest.mm",
]
deps = [
":history",
......@@ -112,7 +104,6 @@ source_set("unit_tests") {
"//components/favicon_base",
"//components/history/core/browser",
"//components/keyed_service/core",
"//components/sessions",
"//components/strings",
"//ios/chrome/app/strings",
"//ios/chrome/browser",
......@@ -132,7 +123,6 @@ source_set("unit_tests") {
"//testing/gtest",
"//third_party/ocmock",
"//ui/base",
"//ui/gfx",
"//url",
]
......@@ -206,7 +196,6 @@ source_set("eg_tests") {
testonly = true
sources = [
"history_ui_egtest.mm",
"tab_history_popup_controller_egtest.mm",
]
deps = [
":history",
......
# Copyright 2017 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.
source_set("history_popup") {
configs += [ "//build/config/compiler:enable_arc" ]
sources = [
"tab_history_cell.h",
"tab_history_cell.mm",
"tab_history_popup_controller.h",
"tab_history_popup_controller.mm",
"tab_history_view_controller.h",
"tab_history_view_controller.mm",
]
deps = [
"//base",
"//ios/chrome/browser/ui",
"//ios/chrome/browser/ui/commands",
"//ios/chrome/browser/ui/popup_menu",
"//ios/chrome/browser/ui/util",
"//ios/chrome/common",
"//ios/third_party/material_components_ios",
"//ios/web",
"//ui/gfx",
"//url",
]
}
source_set("unit_tests") {
configs += [ "//build/config/compiler:enable_arc" ]
testonly = true
sources = [
"tab_history_popup_controller_unittest.mm",
]
deps = [
":history_popup",
"//components/sessions",
"//ios/chrome/browser/ui",
"//ios/chrome/browser/ui/util",
"//ios/web",
"//testing/gmock",
"//testing/gtest",
"//third_party/ocmock",
"//ui/gfx",
]
}
source_set("eg_tests") {
configs += [ "//build/config/compiler:enable_arc" ]
testonly = true
sources = [
"tab_history_popup_controller_egtest.mm",
]
deps = [
":history_popup",
"//base",
"//components/strings",
"//ios/chrome/test/app:test_support",
"//ios/chrome/test/earl_grey:test_support",
"//ios/web/public/test",
"//ios/web/public/test/http_server",
]
}
lpromero@chromium.org
sczs@chromium.org
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_CHROME_BROWSER_UI_HISTORY_TAB_HISTORY_CELL_H_
#define IOS_CHROME_BROWSER_UI_HISTORY_TAB_HISTORY_CELL_H_
#ifndef IOS_CHROME_BROWSER_UI_HISTORY_POPUP_TAB_HISTORY_CELL_H_
#define IOS_CHROME_BROWSER_UI_HISTORY_POPUP_TAB_HISTORY_CELL_H_
#import <UIKit/UIKit.h>
......@@ -27,4 +27,4 @@ class NavigationItem;
@interface TabHistorySectionFooter : UICollectionReusableView
@end
#endif // IOS_CHROME_BROWSER_UI_HISTORY_TAB_HISTORY_CELL_H_
#endif // IOS_CHROME_BROWSER_UI_HISTORY_POPUP_TAB_HISTORY_CELL_H_
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import "ios/chrome/browser/ui/history/tab_history_cell.h"
#import "ios/chrome/browser/ui/history_popup/tab_history_cell.h"
#include "base/strings/sys_string_conversions.h"
#include "ios/chrome/browser/ui/ui_util.h"
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_CHROME_BROWSER_UI_HISTORY_TAB_HISTORY_POPUP_CONTROLLER_H_
#define IOS_CHROME_BROWSER_UI_HISTORY_TAB_HISTORY_POPUP_CONTROLLER_H_
#ifndef IOS_CHROME_BROWSER_UI_HISTORY_POPUP_TAB_HISTORY_POPUP_CONTROLLER_H_
#define IOS_CHROME_BROWSER_UI_HISTORY_POPUP_TAB_HISTORY_POPUP_CONTROLLER_H_
#import "ios/chrome/browser/ui/popup_menu/popup_menu_controller.h"
......@@ -25,4 +25,4 @@
@end
#endif // IOS_CHROME_BROWSER_UI_HISTORY_TAB_HISTORY_POPUP_CONTROLLER_H_
#endif // IOS_CHROME_BROWSER_UI_HISTORY_POPUP_TAB_HISTORY_POPUP_CONTROLLER_H_
......@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import "ios/chrome/browser/ui/history/tab_history_popup_controller.h"
#import "ios/chrome/browser/ui/history_popup/tab_history_popup_controller.h"
#import <QuartzCore/QuartzCore.h>
#include "base/logging.h"
#include "base/mac/bundle_locations.h"
#include "base/strings/sys_string_conversions.h"
#import "ios/chrome/browser/ui/history/tab_history_view_controller.h"
#import "ios/chrome/browser/ui/history_popup/tab_history_view_controller.h"
#import "ios/chrome/browser/ui/popup_menu/popup_menu_view.h"
#include "ios/chrome/browser/ui/rtl_geometry.h"
#include "ios/chrome/browser/ui/ui_util.h"
......@@ -149,7 +149,7 @@ static const CGFloat kHeightPercentage = 0.85;
CGFloat cellWidth = kTabHistoryMinWidth;
UIFont* font = [[MDCTypography fontLoader] regularFontOfSize:16];
for (web::NavigationItem* item : items) {
// TODO(rohitrao): Can this be replaced with GetTitleForDisplay()?
// Can this be replaced with GetTitleForDisplay()?
NSString* cellText = item->GetTitle().empty()
? base::SysUTF8ToNSString(item->GetURL().spec())
: base::SysUTF16ToNSString(item->GetTitle());
......
......@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import "ios/chrome/browser/ui/history/tab_history_popup_controller.h"
#import "ios/chrome/browser/ui/history_popup/tab_history_popup_controller.h"
#include <memory>
#include <utility>
#include "components/sessions/core/session_types.h"
#import "ios/chrome/browser/ui/history/tab_history_view_controller.h"
#import "ios/chrome/browser/ui/history_popup/tab_history_view_controller.h"
#include "ios/chrome/browser/ui/ui_util.h"
#include "ios/web/public/navigation_item.h"
#include "ios/web/public/navigation_item_list.h"
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_CHROME_BROWSER_UI_HISTORY_TAB_HISTORY_VIEW_CONTROLLER_H_
#define IOS_CHROME_BROWSER_UI_HISTORY_TAB_HISTORY_VIEW_CONTROLLER_H_
#ifndef IOS_CHROME_BROWSER_UI_HISTORY_POPUP_TAB_HISTORY_VIEW_CONTROLLER_H_
#define IOS_CHROME_BROWSER_UI_HISTORY_POPUP_TAB_HISTORY_VIEW_CONTROLLER_H_
#import <UIKit/UIKit.h>
......@@ -36,4 +36,4 @@
@end
#endif // IOS_CHROME_BROWSER_UI_HISTORY_TAB_HISTORY_VIEW_CONTROLLER_H_
#endif // IOS_CHROME_BROWSER_UI_HISTORY_POPUP_TAB_HISTORY_VIEW_CONTROLLER_H_
......@@ -2,14 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import "ios/chrome/browser/ui/history/tab_history_view_controller.h"
#import "ios/chrome/browser/ui/history_popup/tab_history_view_controller.h"
#include "base/logging.h"
#include "base/mac/foundation_util.h"
#include "base/strings/sys_string_conversions.h"
#import "ios/chrome/browser/ui/commands/UIKit+ChromeExecuteCommand.h"
#include "ios/chrome/browser/ui/commands/browser_commands.h"
#import "ios/chrome/browser/ui/history/tab_history_cell.h"
#include "ios/chrome/browser/ui/commands/ios_command_ids.h"
#import "ios/chrome/browser/ui/history_popup/tab_history_cell.h"
#include "ios/chrome/browser/ui/rtl_geometry.h"
#import "ios/third_party/material_components_ios/src/components/Ink/src/MaterialInk.h"
#include "ios/web/public/favicon_status.h"
......
......@@ -63,6 +63,7 @@ source_set("toolbar") {
"//ios/chrome/browser/ui/commands",
"//ios/chrome/browser/ui/fancy_ui",
"//ios/chrome/browser/ui/history",
"//ios/chrome/browser/ui/history_popup",
"//ios/chrome/browser/ui/keyboard",
"//ios/chrome/browser/ui/popup_menu",
"//ios/chrome/browser/ui/qr_scanner",
......
......@@ -43,7 +43,7 @@
#import "ios/chrome/browser/ui/commands/generic_chrome_command.h"
#include "ios/chrome/browser/ui/commands/ios_command_ids.h"
#include "ios/chrome/browser/ui/commands/start_voice_search_command.h"
#import "ios/chrome/browser/ui/history/tab_history_popup_controller.h"
#import "ios/chrome/browser/ui/history_popup/tab_history_popup_controller.h"
#import "ios/chrome/browser/ui/image_util.h"
#include "ios/chrome/browser/ui/omnibox/location_bar_controller_impl.h"
#include "ios/chrome/browser/ui/omnibox/omnibox_view_ios.h"
......
......@@ -180,6 +180,7 @@ test("ios_chrome_unittests") {
"//ios/chrome/browser/ui/fancy_ui:unit_tests",
"//ios/chrome/browser/ui/first_run:unit_tests",
"//ios/chrome/browser/ui/history:unit_tests",
"//ios/chrome/browser/ui/history_popup:unit_tests",
"//ios/chrome/browser/ui/icons:unit_tests",
"//ios/chrome/browser/ui/infobars:unit_tests",
"//ios/chrome/browser/ui/keyboard:unit_tests",
......
......@@ -66,6 +66,7 @@ chrome_ios_eg_test("ios_chrome_ui_egtests") {
"//ios/chrome/browser/ui/find_bar:eg_tests",
"//ios/chrome/browser/ui/first_run:eg_tests",
"//ios/chrome/browser/ui/history:eg_tests",
"//ios/chrome/browser/ui/history_popup:eg_tests",
"//ios/chrome/browser/ui/infobars:eg_tests",
"//ios/chrome/browser/ui/ntp:eg_tests",
"//ios/chrome/browser/ui/ntp/recent_tabs:eg_tests",
......
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