Commit 4aa80a4b authored by mgiuca's avatar mgiuca Committed by Commit bot

Remove deprecation warning banner from App Launcher code.

Should have no visible effect (since the banner wasn't visible on CrOS).

This reverts commit 192a6f00.
This reverts commit c00f1d07.

BUG=576531

Review-Url: https://codereview.chromium.org/2341113003
Cr-Commit-Position: refs/heads/master@{#419111}
parent 9dcdbe36
...@@ -905,14 +905,6 @@ Signing in anyway will merge Chromium information like bookmarks, history, and o ...@@ -905,14 +905,6 @@ Signing in anyway will merge Chromium information like bookmarks, history, and o
Remove From Chromium... Remove From Chromium...
</message> </message>
</if> </if>
<if expr="not chromeos">
<message name="IDS_APP_LIST_MESSAGE_TITLE" desc="Title given to the message displayed in the app launcher to say it is going away">
The Chromium App Launcher is going away.
</message>
<message name="IDS_APP_LIST_MESSAGE_TEXT" desc="The message body text displayed in the app launcher to say it is going away">
Use the <ph name="APPS_ICON_IMAGE">$1<ex>Apps</ex></ph> shortcut in the Chromium bookmarks bar to continue accessing your apps.
</message>
</if>
</if> </if>
<!-- App shortcuts --> <!-- App shortcuts -->
......
...@@ -13874,14 +13874,6 @@ Please check your email at <ph name="ACCOUNT_EMAIL">$2<ex>jane.doe@gmail.com</ex ...@@ -13874,14 +13874,6 @@ Please check your email at <ph name="ACCOUNT_EMAIL">$2<ex>jane.doe@gmail.com</ex
<message name="IDS_APP_LIST_SIGNIN_SETTINGS_TEXT" desc="App launcher sign-in settings link text."> <message name="IDS_APP_LIST_SIGNIN_SETTINGS_TEXT" desc="App launcher sign-in settings link text.">
App Launcher Settings App Launcher Settings
</message> </message>
<if expr="not chromeos">
<message name="IDS_APP_LIST_MESSAGE_LEARN_MORE_TEXT" desc="Link anchor text displayed at the end of a message in the app launcher linking to a site with additional information about the message.">
Learn more
</message>
<message name="IDS_APP_LIST_MESSAGE_LEARN_MORE_LINK" desc="URL for the Learn More link displayed at the end of the app launcher message.">
https://support.google.com/chrome/answer/3060053?hl=[GRITLANGCODE]
</message>
</if>
</if> </if>
<!-- iOS Chrome to Device strings--> <!-- iOS Chrome to Device strings-->
......
...@@ -906,14 +906,6 @@ Signing in anyway will merge Chrome information like bookmarks, history, and oth ...@@ -906,14 +906,6 @@ Signing in anyway will merge Chrome information like bookmarks, history, and oth
Remove From Chrome... Remove From Chrome...
</message> </message>
</if> </if>
<if expr="not chromeos">
<message name="IDS_APP_LIST_MESSAGE_TITLE" desc="Title given to the message displayed in the app launcher to say it is going away">
The Chrome App Launcher is going away.
</message>
<message name="IDS_APP_LIST_MESSAGE_TEXT" desc="The message body text displayed in the app launcher to say it is going away">
Use the <ph name="APPS_ICON_IMAGE">$1<ex>Apps</ex></ph> shortcut in the Chrome bookmarks bar to continue accessing your apps.
</message>
</if>
</if> </if>
<!-- App shortcuts --> <!-- App shortcuts -->
......
...@@ -76,12 +76,6 @@ ...@@ -76,12 +76,6 @@
#include "chrome/browser/ui/ash/app_list/app_sync_ui_state_watcher.h" #include "chrome/browser/ui/ash/app_list/app_sync_ui_state_watcher.h"
#endif #endif
#if !defined(OS_CHROMEOS)
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
#endif
namespace chrome { namespace chrome {
const char kAppLauncherCategoryTag[] = "AppLauncher"; const char kAppLauncherCategoryTag[] = "AppLauncher";
} // namespace chrome } // namespace chrome
...@@ -728,43 +722,6 @@ void AppListViewDelegate::RemoveObserver( ...@@ -728,43 +722,6 @@ void AppListViewDelegate::RemoveObserver(
observers_.RemoveObserver(observer); observers_.RemoveObserver(observer);
} }
#if !defined(OS_CHROMEOS)
base::string16 AppListViewDelegate::GetMessageTitle() const {
return l10n_util::GetStringUTF16(IDS_APP_LIST_MESSAGE_TITLE);
}
base::string16 AppListViewDelegate::GetMessageText(
size_t* message_break) const {
return l10n_util::GetStringFUTF16(IDS_APP_LIST_MESSAGE_TEXT, base::string16(),
message_break);
}
base::string16 AppListViewDelegate::GetAppsShortcutName() const {
return l10n_util::GetStringUTF16(IDS_BOOKMARK_BAR_APPS_SHORTCUT_NAME);
}
base::string16 AppListViewDelegate::GetLearnMoreText() const {
return l10n_util::GetStringUTF16(IDS_APP_LIST_MESSAGE_LEARN_MORE_TEXT);
}
base::string16 AppListViewDelegate::GetLearnMoreLink() const {
return l10n_util::GetStringUTF16(IDS_APP_LIST_MESSAGE_LEARN_MORE_LINK);
}
gfx::ImageSkia* AppListViewDelegate::GetAppsIcon() const {
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
// Ensure it's backed by a native image type in the ResourceBundle cache.
rb.GetNativeImageNamed(IDR_BOOKMARK_BAR_APPS_SHORTCUT);
return rb.GetImageSkiaNamed(IDR_BOOKMARK_BAR_APPS_SHORTCUT);
}
void AppListViewDelegate::OpenLearnMoreLink() {
controller_->OpenURL(profile_, GURL(GetLearnMoreLink()),
ui::PAGE_TRANSITION_LINK,
WindowOpenDisposition::CURRENT_TAB);
}
#endif // !defined(OS_CHROMEOS)
void AppListViewDelegate::OnTemplateURLServiceChanged() { void AppListViewDelegate::OnTemplateURLServiceChanged() {
if (!app_list::switches::IsExperimentalAppListEnabled()) if (!app_list::switches::IsExperimentalAppListEnabled())
return; return;
......
...@@ -115,15 +115,6 @@ class AppListViewDelegate : public app_list::AppListViewDelegate, ...@@ -115,15 +115,6 @@ class AppListViewDelegate : public app_list::AppListViewDelegate,
bool ShouldCenterWindow() const override; bool ShouldCenterWindow() const override;
void AddObserver(app_list::AppListViewDelegateObserver* observer) override; void AddObserver(app_list::AppListViewDelegateObserver* observer) override;
void RemoveObserver(app_list::AppListViewDelegateObserver* observer) override; void RemoveObserver(app_list::AppListViewDelegateObserver* observer) override;
#if !defined(OS_CHROMEOS)
base::string16 GetMessageTitle() const override;
base::string16 GetMessageText(size_t* message_break) const override;
base::string16 GetAppsShortcutName() const override;
base::string16 GetLearnMoreText() const override;
base::string16 GetLearnMoreLink() const override;
gfx::ImageSkia* GetAppsIcon() const override;
void OpenLearnMoreLink() override;
#endif
// Overridden from TemplateURLServiceObserver: // Overridden from TemplateURLServiceObserver:
void OnTemplateURLServiceChanged() override; void OnTemplateURLServiceChanged() override;
......
...@@ -83,11 +83,7 @@ const gfx::Tween::Type kFolderFadeOutTweenType = gfx::Tween::FAST_OUT_LINEAR_IN; ...@@ -83,11 +83,7 @@ const gfx::Tween::Type kFolderFadeOutTweenType = gfx::Tween::FAST_OUT_LINEAR_IN;
// Preferred number of columns and rows in apps grid. // Preferred number of columns and rows in apps grid.
const int kPreferredCols = 4; const int kPreferredCols = 4;
#if defined(OS_CHROMEOS)
const int kPreferredRows = 4; const int kPreferredRows = 4;
#else
const int kPreferredRows = 3;
#endif // defined(OS_CHROMEOS)
const int kGridIconDimension = 48; const int kGridIconDimension = 48;
// Preferred search result icon sizes. // Preferred search result icon sizes.
......
...@@ -13,28 +13,4 @@ AppListViewDelegate::User::User(const User& other) = default; ...@@ -13,28 +13,4 @@ AppListViewDelegate::User::User(const User& other) = default;
AppListViewDelegate::User::~User() {} AppListViewDelegate::User::~User() {}
#if !defined(OS_CHROMEOS)
base::string16 AppListViewDelegate::GetMessageTitle() const {
return base::string16();
}
base::string16 AppListViewDelegate::GetMessageText(
size_t* message_break) const {
*message_break = 0;
return base::string16();
}
base::string16 AppListViewDelegate::GetAppsShortcutName() const {
return base::string16();
}
base::string16 AppListViewDelegate::GetLearnMoreText() const {
return base::string16();
}
base::string16 AppListViewDelegate::GetLearnMoreLink() const {
return base::string16();
}
gfx::ImageSkia* AppListViewDelegate::GetAppsIcon() const {
return nullptr;
}
void AppListViewDelegate::OpenLearnMoreLink() {}
#endif
} // namespace app_list } // namespace app_list
...@@ -153,21 +153,6 @@ class APP_LIST_EXPORT AppListViewDelegate { ...@@ -153,21 +153,6 @@ class APP_LIST_EXPORT AppListViewDelegate {
// Adds/removes an observer for profile changes. // Adds/removes an observer for profile changes.
virtual void AddObserver(AppListViewDelegateObserver* observer) {} virtual void AddObserver(AppListViewDelegateObserver* observer) {}
virtual void RemoveObserver(AppListViewDelegateObserver* observer) {} virtual void RemoveObserver(AppListViewDelegateObserver* observer) {}
#if !defined(OS_CHROMEOS)
// Methods to retrieve properties of the message displayed on the app launcher
// above the apps grid.
virtual base::string16 GetMessageTitle() const;
// Returns the message text (with the placeholder symbol removed).
// |message_break| is set to the index where the placeholder was in the
// string.
virtual base::string16 GetMessageText(size_t* message_break) const;
virtual base::string16 GetAppsShortcutName() const;
virtual base::string16 GetLearnMoreText() const;
virtual base::string16 GetLearnMoreLink() const;
virtual gfx::ImageSkia* GetAppsIcon() const;
virtual void OpenLearnMoreLink();
#endif
}; };
} // namespace app_list } // namespace app_list
......
...@@ -301,14 +301,9 @@ void AppListViewTestContext::RunDisplayTest() { ...@@ -301,14 +301,9 @@ void AppListViewTestContext::RunDisplayTest() {
Show(); Show();
#if defined(OS_CHROMEOS)
// Explicitly enforce the exact dimensions of the app list. Feel free to // Explicitly enforce the exact dimensions of the app list. Feel free to
// change these if you need to (they are just here to prevent against // change these if you need to (they are just here to prevent against
// accidental changes to the window size). // accidental changes to the window size).
//
// Note: Only test this on Chrome OS; the deprecation banner on other
// platforms makes the height variable so we can't reliably test it (nor do we
// really need to).
switch (test_type_) { switch (test_type_) {
case NORMAL: case NORMAL:
EXPECT_EQ("400x500", view_->bounds().size().ToString()); EXPECT_EQ("400x500", view_->bounds().size().ToString());
...@@ -326,7 +321,6 @@ void AppListViewTestContext::RunDisplayTest() { ...@@ -326,7 +321,6 @@ void AppListViewTestContext::RunDisplayTest() {
NOTREACHED(); NOTREACHED();
break; break;
} }
#endif // defined(OS_CHROMEOS)
if (is_landscape()) if (is_landscape())
EXPECT_EQ(2, GetPaginationModel()->total_pages()); EXPECT_EQ(2, GetPaginationModel()->total_pages());
......
...@@ -8,146 +8,21 @@ ...@@ -8,146 +8,21 @@
#include <vector> #include <vector>
#include "base/command_line.h" #include "base/command_line.h"
#include "base/strings/utf_string_conversions.h"
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkPaint.h"
#include "ui/app_list/app_list_constants.h" #include "ui/app_list/app_list_constants.h"
#include "ui/app_list/app_list_folder_item.h" #include "ui/app_list/app_list_folder_item.h"
#include "ui/app_list/app_list_switches.h" #include "ui/app_list/app_list_switches.h"
#include "ui/app_list/app_list_view_delegate.h"
#include "ui/app_list/views/app_list_folder_view.h" #include "ui/app_list/views/app_list_folder_view.h"
#include "ui/app_list/views/app_list_item_view.h" #include "ui/app_list/views/app_list_item_view.h"
#include "ui/app_list/views/app_list_main_view.h" #include "ui/app_list/views/app_list_main_view.h"
#include "ui/app_list/views/apps_grid_view.h" #include "ui/app_list/views/apps_grid_view.h"
#include "ui/app_list/views/folder_background_view.h" #include "ui/app_list/views/folder_background_view.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/events/event.h" #include "ui/events/event.h"
#include "ui/gfx/canvas.h"
#include "ui/views/background.h"
#include "ui/views/border.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/styled_label.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/view.h"
namespace app_list { namespace app_list {
namespace {
#if !defined(OS_CHROMEOS)
// Deprecation notice dimensions.
const int kDeprecationBannerLabelSpacingPx = 6;
const int kDeprecationBannerPaddingPx = 16;
const int kDeprecationBannerMarginPx = 12;
const SkColor kDeprecationBannerBackgroundColor =
SkColorSetRGB(0xff, 0xfd, 0xe7);
const SkColor kDeprecationBannerBorderColor = SkColorSetRGB(0xc1, 0xc1, 0xc1);
const int kDeprecationBannerBorderThickness = 1;
const int kDeprecationBannerBorderCornerRadius = 2;
// Relative to the platform-default font size.
const int kDeprecationBannerTitleSize = 2;
const int kDeprecationBannerTextSize = 0;
const SkColor kLinkColor = SkColorSetRGB(0x33, 0x67, 0xd6);
// A background that paints a filled rounded rectangle.
class RoundedRectBackground : public views::Background {
public:
RoundedRectBackground(SkColor color, int corner_radius)
: color_(color), corner_radius_(corner_radius) {}
~RoundedRectBackground() override {}
// views::Background overrides:
void Paint(gfx::Canvas* canvas, views::View* view) const override {
gfx::Rect bounds = view->GetContentsBounds();
SkPaint paint;
paint.setFlags(SkPaint::kAntiAlias_Flag);
paint.setColor(color_);
canvas->DrawRoundRect(bounds, corner_radius_, paint);
}
private:
SkColor color_;
int corner_radius_;
DISALLOW_COPY_AND_ASSIGN(RoundedRectBackground);
};
base::string16 GetDeprecationText(const AppListViewDelegate& delegate) {
size_t message_break;
base::string16 text = delegate.GetMessageText(&message_break);
base::string16 apps_shortcut_name = delegate.GetAppsShortcutName();
// TODO(mgiuca): Insert the Apps shortcut with an image, rather than just
// concatenating it into the string.
text.insert(message_break, apps_shortcut_name);
return text;
}
views::View* BuildDeprecationNotice(const AppListViewDelegate& delegate,
views::StyledLabelListener* listener) {
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
const gfx::FontList& title_font =
rb.GetFontListWithDelta(kDeprecationBannerTitleSize);
const gfx::FontList& text_font =
rb.GetFontListWithDelta(kDeprecationBannerTextSize);
base::string16 title = delegate.GetMessageTitle();
views::Label* title_label = new views::Label(title);
title_label->SetMultiLine(true);
title_label->SetHorizontalAlignment(gfx::HorizontalAlignment::ALIGN_LEFT);
title_label->SetFontList(title_font);
title_label->SetBackgroundColor(kDeprecationBannerBackgroundColor);
base::string16 text = GetDeprecationText(delegate);
base::string16 learn_more = delegate.GetLearnMoreText();
base::string16 message = text + base::ASCIIToUTF16(" ") + learn_more;
size_t learn_more_start = text.size() + 1;
size_t learn_more_end = learn_more_start + learn_more.size();
views::StyledLabel* text_label = new views::StyledLabel(message, listener);
auto learn_more_style = views::StyledLabel::RangeStyleInfo::CreateForLink();
learn_more_style.color = kLinkColor;
if (learn_more.size()) {
text_label->AddStyleRange(gfx::Range(learn_more_start, learn_more_end),
learn_more_style);
}
text_label->SetDisplayedOnBackgroundColor(kDeprecationBannerBackgroundColor);
text_label->SetBaseFontList(text_font);
views::View* deprecation_banner_box = new views::View;
deprecation_banner_box->SetLayoutManager(new views::BoxLayout(
views::BoxLayout::kVertical, kDeprecationBannerPaddingPx,
kDeprecationBannerPaddingPx, kDeprecationBannerLabelSpacingPx));
deprecation_banner_box->AddChildView(title_label);
deprecation_banner_box->AddChildView(text_label);
deprecation_banner_box->set_background(new RoundedRectBackground(
kDeprecationBannerBackgroundColor, kDeprecationBannerBorderCornerRadius));
deprecation_banner_box->SetBorder(views::Border::CreateRoundedRectBorder(
kDeprecationBannerBorderThickness, kDeprecationBannerBorderCornerRadius,
kDeprecationBannerBorderColor));
views::View* deprecation_banner_view = new views::View;
deprecation_banner_view->AddChildView(deprecation_banner_box);
deprecation_banner_view->SetLayoutManager(new views::BoxLayout(
views::BoxLayout::kVertical, kDeprecationBannerMarginPx,
kDeprecationBannerMarginPx, 0));
return deprecation_banner_view;
}
#endif // !defined(OS_CHROMEOS)
} // namespace
AppsContainerView::AppsContainerView(AppListMainView* app_list_main_view, AppsContainerView::AppsContainerView(AppListMainView* app_list_main_view,
AppListModel* model) AppListModel* model)
: show_state_(SHOW_NONE), : show_state_(SHOW_NONE), top_icon_animation_pending_count_(0) {
view_delegate_(app_list_main_view->view_delegate()),
top_icon_animation_pending_count_(0) {
#if !defined(OS_CHROMEOS)
deprecation_banner_view_ = BuildDeprecationNotice(*view_delegate_, this);
AddChildView(deprecation_banner_view_);
#endif // !defined(OS_CHROMEOS)
apps_grid_view_ = new AppsGridView(app_list_main_view); apps_grid_view_ = new AppsGridView(app_list_main_view);
int cols; int cols;
int rows; int rows;
...@@ -235,16 +110,11 @@ void AppsContainerView::ReparentDragEnded() { ...@@ -235,16 +110,11 @@ void AppsContainerView::ReparentDragEnded() {
} }
gfx::Size AppsContainerView::GetPreferredSize() const { gfx::Size AppsContainerView::GetPreferredSize() const {
const int deprecation_banner_height =
deprecation_banner_view_
? deprecation_banner_view_->GetPreferredSize().height()
: 0;
const gfx::Size grid_size = apps_grid_view_->GetPreferredSize(); const gfx::Size grid_size = apps_grid_view_->GetPreferredSize();
const gfx::Size folder_view_size = app_list_folder_view_->GetPreferredSize(); const gfx::Size folder_view_size = app_list_folder_view_->GetPreferredSize();
int width = std::max(grid_size.width(), folder_view_size.width()); int width = std::max(grid_size.width(), folder_view_size.width());
int height = std::max(grid_size.height() + deprecation_banner_height, int height = std::max(grid_size.height(), folder_view_size.height());
folder_view_size.height());
return gfx::Size(width, height); return gfx::Size(width, height);
} }
...@@ -253,18 +123,8 @@ void AppsContainerView::Layout() { ...@@ -253,18 +123,8 @@ void AppsContainerView::Layout() {
if (rect.IsEmpty()) if (rect.IsEmpty())
return; return;
int deprecation_banner_height = 0;
if (deprecation_banner_view_) {
deprecation_banner_height =
deprecation_banner_view_->GetPreferredSize().height();
gfx::Size deprecation_banner_size(rect.width(), deprecation_banner_height);
deprecation_banner_view_->SetBoundsRect(
gfx::Rect(rect.origin(), deprecation_banner_size));
}
switch (show_state_) { switch (show_state_) {
case SHOW_APPS: case SHOW_APPS:
rect.Inset(0, deprecation_banner_height, 0, 0);
apps_grid_view_->SetBoundsRect(rect); apps_grid_view_->SetBoundsRect(rect);
break; break;
case SHOW_ACTIVE_FOLDER: case SHOW_ACTIVE_FOLDER:
...@@ -314,16 +174,6 @@ void AppsContainerView::OnTopIconAnimationsComplete() { ...@@ -314,16 +174,6 @@ void AppsContainerView::OnTopIconAnimationsComplete() {
} }
} }
void AppsContainerView::StyledLabelLinkClicked(views::StyledLabel* label,
const gfx::Range& range,
int event_flags) {
#if !defined(OS_CHROMEOS)
// The only style label is the "Learn more" link in the deprecation banner, so
// assume that that's what was clicked.
view_delegate_->OpenLearnMoreLink();
#endif // !defined(OS_CHROMEOS)
}
void AppsContainerView::SetShowState(ShowState show_state, void AppsContainerView::SetShowState(ShowState show_state,
bool show_apps_with_animation) { bool show_apps_with_animation) {
if (show_state_ == show_state) if (show_state_ == show_state)
...@@ -333,8 +183,6 @@ void AppsContainerView::SetShowState(ShowState show_state, ...@@ -333,8 +183,6 @@ void AppsContainerView::SetShowState(ShowState show_state,
switch (show_state_) { switch (show_state_) {
case SHOW_APPS: case SHOW_APPS:
if (deprecation_banner_view_)
deprecation_banner_view_->SetVisible(true);
folder_background_view_->SetVisible(false); folder_background_view_->SetVisible(false);
if (show_apps_with_animation) { if (show_apps_with_animation) {
app_list_folder_view_->ScheduleShowHideAnimation(false, false); app_list_folder_view_->ScheduleShowHideAnimation(false, false);
...@@ -345,15 +193,11 @@ void AppsContainerView::SetShowState(ShowState show_state, ...@@ -345,15 +193,11 @@ void AppsContainerView::SetShowState(ShowState show_state,
} }
break; break;
case SHOW_ACTIVE_FOLDER: case SHOW_ACTIVE_FOLDER:
if (deprecation_banner_view_)
deprecation_banner_view_->SetVisible(false);
folder_background_view_->SetVisible(true); folder_background_view_->SetVisible(true);
apps_grid_view_->ScheduleShowHideAnimation(false); apps_grid_view_->ScheduleShowHideAnimation(false);
app_list_folder_view_->ScheduleShowHideAnimation(true, false); app_list_folder_view_->ScheduleShowHideAnimation(true, false);
break; break;
case SHOW_ITEM_REPARENT: case SHOW_ITEM_REPARENT:
if (deprecation_banner_view_)
deprecation_banner_view_->SetVisible(true);
folder_background_view_->SetVisible(false); folder_background_view_->SetVisible(false);
folder_background_view_->UpdateFolderContainerBubble( folder_background_view_->UpdateFolderContainerBubble(
FolderBackgroundView::NO_BUBBLE); FolderBackgroundView::NO_BUBBLE);
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
#include "ui/app_list/app_list_folder_item.h" #include "ui/app_list/app_list_folder_item.h"
#include "ui/app_list/views/app_list_page.h" #include "ui/app_list/views/app_list_page.h"
#include "ui/app_list/views/top_icon_animation_view.h" #include "ui/app_list/views/top_icon_animation_view.h"
#include "ui/gfx/range/range.h"
#include "ui/views/controls/styled_label_listener.h"
namespace gfx { namespace gfx {
class Rect; class Rect;
...@@ -28,16 +26,13 @@ class AppListFolderItem; ...@@ -28,16 +26,13 @@ class AppListFolderItem;
class AppListFolderView; class AppListFolderView;
class AppListMainView; class AppListMainView;
class AppListModel; class AppListModel;
class AppListViewDelegate;
class ContentsView; class ContentsView;
class FolderBackgroundView; class FolderBackgroundView;
// AppsContainerView contains a root level AppsGridView to render the root level // AppsContainerView contains a root level AppsGridView to render the root level
// app items, and a AppListFolderView to render the app items inside the // app items, and a AppListFolderView to render the app items inside the
// active folder. Only one if them is visible to user at any time. // active folder. Only one if them is visible to user at any time.
class AppsContainerView : public AppListPage, class AppsContainerView : public AppListPage, public TopIconAnimationObserver {
public TopIconAnimationObserver,
public views::StyledLabelListener {
public: public:
AppsContainerView(AppListMainView* app_list_main_view, AppsContainerView(AppListMainView* app_list_main_view,
AppListModel* model); AppListModel* model);
...@@ -83,11 +78,6 @@ class AppsContainerView : public AppListPage, ...@@ -83,11 +78,6 @@ class AppsContainerView : public AppListPage,
// TopIconAnimationObserver overrides: // TopIconAnimationObserver overrides:
void OnTopIconAnimationsComplete() override; void OnTopIconAnimationsComplete() override;
// StyledLabelListener overrides:
void StyledLabelLinkClicked(views::StyledLabel* label,
const gfx::Range& range,
int event_flags) override;
AppsGridView* apps_grid_view() { return apps_grid_view_; } AppsGridView* apps_grid_view() { return apps_grid_view_; }
FolderBackgroundView* folder_background_view() { FolderBackgroundView* folder_background_view() {
return folder_background_view_; return folder_background_view_;
...@@ -117,13 +107,10 @@ class AppsContainerView : public AppListPage, ...@@ -117,13 +107,10 @@ class AppsContainerView : public AppListPage,
void PrepareToShowApps(AppListFolderItem* folder_item); void PrepareToShowApps(AppListFolderItem* folder_item);
// Null on Chrome OS (unused).
View* deprecation_banner_view_ = nullptr; // Owned by views hierarchy.
AppsGridView* apps_grid_view_; // Owned by views hierarchy. AppsGridView* apps_grid_view_; // Owned by views hierarchy.
AppListFolderView* app_list_folder_view_; // Owned by views hierarchy. AppListFolderView* app_list_folder_view_; // Owned by views hierarchy.
FolderBackgroundView* folder_background_view_; // Owned by views hierarchy. FolderBackgroundView* folder_background_view_; // Owned by views hierarchy.
ShowState show_state_; ShowState show_state_;
AppListViewDelegate* view_delegate_;
// The transitional views for animating the top items in folder // The transitional views for animating the top items in folder
// when opening or closing a folder. // when opening or closing a folder.
......
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