From 70ff8f874a74e30d5a17c89522437f40ecdd2bcb Mon Sep 17 00:00:00 2001 From: dcheng Date: Tue, 28 Oct 2014 22:02:15 -0700 Subject: [PATCH] Cleanups: add non-inline destructors for several ash classes. R=jamescook@chromium.org,oshima@chromium.org Review URL: https://codereview.chromium.org/687763002 Cr-Commit-Position: refs/heads/master@{#301788} --- ash/shell/app_list.cc | 19 ++++++++++++------- ash/shell/bubble.cc | 13 ++++++++++--- .../launcher/chrome_launcher_app_menu_item_v2app.cc | 3 +++ .../launcher/chrome_launcher_app_menu_item_v2app.h | 2 ++ 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/ash/shell/app_list.cc b/ash/shell/app_list.cc index 7b35902630a2..9686eddd7c79 100644 --- a/ash/shell/app_list.cc +++ b/ash/shell/app_list.cc @@ -49,13 +49,8 @@ class WindowTypeShelfItem : public app_list::AppListItem { LAST_TYPE, }; - explicit WindowTypeShelfItem(const std::string& id, Type type) - : app_list::AppListItem(id), - type_(type) { - std::string title(GetTitle(type)); - SetIcon(GetIcon(type), false); - SetName(title); - } + WindowTypeShelfItem(const std::string& id, Type type); + ~WindowTypeShelfItem() override; static gfx::ImageSkia GetIcon(Type type) { static const SkColor kColors[] = { @@ -146,6 +141,16 @@ class WindowTypeShelfItem : public app_list::AppListItem { DISALLOW_COPY_AND_ASSIGN(WindowTypeShelfItem); }; +WindowTypeShelfItem::WindowTypeShelfItem(const std::string& id, Type type) + : app_list::AppListItem(id), type_(type) { + std::string title(GetTitle(type)); + SetIcon(GetIcon(type), false); + SetName(title); +} + +WindowTypeShelfItem::~WindowTypeShelfItem() { +} + // ExampleSearchResult is an app list search result. It provides what icon to // show, what should title and details text look like. It also carries the // matching window launch type so that AppListViewDelegate knows how to open diff --git a/ash/shell/bubble.cc b/ash/shell/bubble.cc index 5c157ee1eac5..1ecd7f5d7cdb 100644 --- a/ash/shell/bubble.cc +++ b/ash/shell/bubble.cc @@ -20,9 +20,8 @@ struct BubbleConfig { class ExampleBubbleDelegateView : public views::BubbleDelegateView { public: - ExampleBubbleDelegateView(const BubbleConfig& config) - : BubbleDelegateView(config.anchor_view, config.arrow), - label_(config.label) {} + explicit ExampleBubbleDelegateView(const BubbleConfig& config); + ~ExampleBubbleDelegateView() override; void Init() override { SetLayoutManager(new views::FillLayout()); @@ -34,6 +33,14 @@ class ExampleBubbleDelegateView : public views::BubbleDelegateView { base::string16 label_; }; +ExampleBubbleDelegateView::ExampleBubbleDelegateView(const BubbleConfig& config) + : BubbleDelegateView(config.anchor_view, config.arrow), + label_(config.label) { +} + +ExampleBubbleDelegateView::~ExampleBubbleDelegateView() { +} + void CreatePointyBubble(views::View* anchor_view) { BubbleConfig config; config.label = base::ASCIIToUTF16("PointyBubble"); diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_v2app.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_v2app.cc index 8c812d622157..5c61a1f6a10a 100644 --- a/chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_v2app.cc +++ b/chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_v2app.cc @@ -19,6 +19,9 @@ ChromeLauncherAppMenuItemV2App::ChromeLauncherAppMenuItemV2App( app_index_(app_index) { } +ChromeLauncherAppMenuItemV2App::~ChromeLauncherAppMenuItemV2App() { +} + bool ChromeLauncherAppMenuItemV2App::IsEnabled() const { return true; } diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_v2app.h b/chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_v2app.h index 25ab9046e04d..e05d25c76b81 100644 --- a/chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_v2app.h +++ b/chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_v2app.h @@ -27,6 +27,8 @@ class ChromeLauncherAppMenuItemV2App : public ChromeLauncherAppMenuItem { ChromeLauncherController* launcher_controller, int app_index, bool has_leading_separator); + ~ChromeLauncherAppMenuItemV2App() override; + bool IsEnabled() const override; void Execute(int event_flags) override; -- 2.11.4.GIT