Commit 6da4ffab authored by tfarina@chromium.org's avatar tfarina@chromium.org

ash: Rename LauncherButtonHost to ShelfButtonHost.

- move launcher_button_host.h from launcher/ to shelf/
- rename to shelf_button_host.h

BUG=248353
TEST=None, no functional changes
R=harrym@chromium.org,jamescook@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233337 0039d316-1c4b-4281-b951-d872f2087c98
parent 006f475c
...@@ -210,6 +210,7 @@ ...@@ -210,6 +210,7 @@
'shelf/shelf_alignment_menu.h', 'shelf/shelf_alignment_menu.h',
'shelf/shelf_bezel_event_filter.cc', 'shelf/shelf_bezel_event_filter.cc',
'shelf/shelf_bezel_event_filter.h', 'shelf/shelf_bezel_event_filter.h',
'shelf/shelf_button_host.h',
'shelf/shelf_icon_observer.h', 'shelf/shelf_icon_observer.h',
'shelf/shelf_layout_manager.cc', 'shelf/shelf_layout_manager.cc',
'shelf/shelf_layout_manager.h', 'shelf/shelf_layout_manager.h',
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include <algorithm> #include <algorithm>
#include "ash/ash_switches.h" #include "ash/ash_switches.h"
#include "ash/launcher/launcher_button_host.h" #include "ash/shelf/shelf_button_host.h"
#include "ash/shelf/shelf_layout_manager.h" #include "ash/shelf/shelf_layout_manager.h"
#include "grit/ash_resources.h" #include "grit/ash_resources.h"
#include "skia/ext/image_operations.h" #include "skia/ext/image_operations.h"
...@@ -221,7 +221,7 @@ bool LauncherButton::IconView::HitTestRect(const gfx::Rect& rect) const { ...@@ -221,7 +221,7 @@ bool LauncherButton::IconView::HitTestRect(const gfx::Rect& rect) const {
LauncherButton* LauncherButton::Create( LauncherButton* LauncherButton::Create(
views::ButtonListener* listener, views::ButtonListener* listener,
LauncherButtonHost* host, ShelfButtonHost* host,
ShelfLayoutManager* shelf_layout_manager) { ShelfLayoutManager* shelf_layout_manager) {
LauncherButton* button = LauncherButton* button =
new LauncherButton(listener, host, shelf_layout_manager); new LauncherButton(listener, host, shelf_layout_manager);
...@@ -230,7 +230,7 @@ LauncherButton* LauncherButton::Create( ...@@ -230,7 +230,7 @@ LauncherButton* LauncherButton::Create(
} }
LauncherButton::LauncherButton(views::ButtonListener* listener, LauncherButton::LauncherButton(views::ButtonListener* listener,
LauncherButtonHost* host, ShelfButtonHost* host,
ShelfLayoutManager* shelf_layout_manager) ShelfLayoutManager* shelf_layout_manager)
: CustomButton(listener), : CustomButton(listener),
host_(host), host_(host),
...@@ -355,24 +355,24 @@ void LauncherButton::ShowContextMenu(const gfx::Point& p, ...@@ -355,24 +355,24 @@ void LauncherButton::ShowContextMenu(const gfx::Point& p,
bool LauncherButton::OnMousePressed(const ui::MouseEvent& event) { bool LauncherButton::OnMousePressed(const ui::MouseEvent& event) {
CustomButton::OnMousePressed(event); CustomButton::OnMousePressed(event);
host_->PointerPressedOnButton(this, LauncherButtonHost::MOUSE, event); host_->PointerPressedOnButton(this, ShelfButtonHost::MOUSE, event);
return true; return true;
} }
void LauncherButton::OnMouseReleased(const ui::MouseEvent& event) { void LauncherButton::OnMouseReleased(const ui::MouseEvent& event) {
CustomButton::OnMouseReleased(event); CustomButton::OnMouseReleased(event);
host_->PointerReleasedOnButton(this, LauncherButtonHost::MOUSE, false); host_->PointerReleasedOnButton(this, ShelfButtonHost::MOUSE, false);
} }
void LauncherButton::OnMouseCaptureLost() { void LauncherButton::OnMouseCaptureLost() {
ClearState(STATE_HOVERED); ClearState(STATE_HOVERED);
host_->PointerReleasedOnButton(this, LauncherButtonHost::MOUSE, true); host_->PointerReleasedOnButton(this, ShelfButtonHost::MOUSE, true);
CustomButton::OnMouseCaptureLost(); CustomButton::OnMouseCaptureLost();
} }
bool LauncherButton::OnMouseDragged(const ui::MouseEvent& event) { bool LauncherButton::OnMouseDragged(const ui::MouseEvent& event) {
CustomButton::OnMouseDragged(event); CustomButton::OnMouseDragged(event);
host_->PointerDraggedOnButton(this, LauncherButtonHost::MOUSE, event); host_->PointerDraggedOnButton(this, ShelfButtonHost::MOUSE, event);
return true; return true;
} }
...@@ -481,16 +481,16 @@ void LauncherButton::OnGestureEvent(ui::GestureEvent* event) { ...@@ -481,16 +481,16 @@ void LauncherButton::OnGestureEvent(ui::GestureEvent* event) {
ClearState(STATE_HOVERED); ClearState(STATE_HOVERED);
return CustomButton::OnGestureEvent(event); return CustomButton::OnGestureEvent(event);
case ui::ET_GESTURE_SCROLL_BEGIN: case ui::ET_GESTURE_SCROLL_BEGIN:
host_->PointerPressedOnButton(this, LauncherButtonHost::TOUCH, *event); host_->PointerPressedOnButton(this, ShelfButtonHost::TOUCH, *event);
event->SetHandled(); event->SetHandled();
return; return;
case ui::ET_GESTURE_SCROLL_UPDATE: case ui::ET_GESTURE_SCROLL_UPDATE:
host_->PointerDraggedOnButton(this, LauncherButtonHost::TOUCH, *event); host_->PointerDraggedOnButton(this, ShelfButtonHost::TOUCH, *event);
event->SetHandled(); event->SetHandled();
return; return;
case ui::ET_GESTURE_SCROLL_END: case ui::ET_GESTURE_SCROLL_END:
case ui::ET_SCROLL_FLING_START: case ui::ET_SCROLL_FLING_START:
host_->PointerReleasedOnButton(this, LauncherButtonHost::TOUCH, false); host_->PointerReleasedOnButton(this, ShelfButtonHost::TOUCH, false);
event->SetHandled(); event->SetHandled();
return; return;
default: default:
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
namespace ash { namespace ash {
namespace internal { namespace internal {
class LauncherButtonHost; class ShelfButtonHost;
class ShelfLayoutManager; class ShelfLayoutManager;
// Button used for items on the launcher, except for the AppList. // Button used for items on the launcher, except for the AppList.
...@@ -41,7 +41,7 @@ class ASH_EXPORT LauncherButton : public views::CustomButton { ...@@ -41,7 +41,7 @@ class ASH_EXPORT LauncherButton : public views::CustomButton {
// Called to create an instance of a LauncherButton. // Called to create an instance of a LauncherButton.
static LauncherButton* Create(views::ButtonListener* listener, static LauncherButton* Create(views::ButtonListener* listener,
LauncherButtonHost* host, ShelfButtonHost* host,
ShelfLayoutManager* shelf_layout_manager); ShelfLayoutManager* shelf_layout_manager);
// Sets the image to display for this entry. // Sets the image to display for this entry.
...@@ -70,7 +70,7 @@ class ASH_EXPORT LauncherButton : public views::CustomButton { ...@@ -70,7 +70,7 @@ class ASH_EXPORT LauncherButton : public views::CustomButton {
protected: protected:
LauncherButton(views::ButtonListener* listener, LauncherButton(views::ButtonListener* listener,
LauncherButtonHost* host, ShelfButtonHost* host,
ShelfLayoutManager* shelf_layout_manager); ShelfLayoutManager* shelf_layout_manager);
// Class that draws the icon part of a button, so it can be animated // Class that draws the icon part of a button, so it can be animated
...@@ -118,7 +118,7 @@ class ASH_EXPORT LauncherButton : public views::CustomButton { ...@@ -118,7 +118,7 @@ class ASH_EXPORT LauncherButton : public views::CustomButton {
// Override to subclass IconView. // Override to subclass IconView.
virtual IconView* CreateIconView(); virtual IconView* CreateIconView();
IconView* icon_view() const { return icon_view_; } IconView* icon_view() const { return icon_view_; }
LauncherButtonHost* host() const { return host_; } ShelfButtonHost* host() const { return host_; }
private: private:
class BarView; class BarView;
...@@ -134,7 +134,7 @@ class ASH_EXPORT LauncherButton : public views::CustomButton { ...@@ -134,7 +134,7 @@ class ASH_EXPORT LauncherButton : public views::CustomButton {
// Updates the status bar (bitmap, orientation, visibility). // Updates the status bar (bitmap, orientation, visibility).
void UpdateBar(); void UpdateBar();
LauncherButtonHost* host_; ShelfButtonHost* host_;
IconView* icon_view_; IconView* icon_view_;
// Draws a bar underneath the image to represent the state of the application. // Draws a bar underneath the image to represent the state of the application.
BarView* bar_; BarView* bar_;
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
#include "ash/shelf/alternate_app_list_button.h" #include "ash/shelf/alternate_app_list_button.h"
#include "ash/ash_switches.h" #include "ash/ash_switches.h"
#include "ash/launcher/launcher_button_host.h"
#include "ash/launcher/launcher_types.h" #include "ash/launcher/launcher_types.h"
#include "ash/shelf/shelf_button_host.h"
#include "ash/shelf/shelf_layout_manager.h" #include "ash/shelf/shelf_layout_manager.h"
#include "ash/shelf/shelf_widget.h" #include "ash/shelf/shelf_widget.h"
#include "ash/shell.h" #include "ash/shell.h"
...@@ -31,7 +31,7 @@ const int AlternateAppListButton::kImageBoundsSize = 7; ...@@ -31,7 +31,7 @@ const int AlternateAppListButton::kImageBoundsSize = 7;
AlternateAppListButton::AlternateAppListButton(views::ButtonListener* listener, AlternateAppListButton::AlternateAppListButton(views::ButtonListener* listener,
LauncherButtonHost* host, ShelfButtonHost* host,
ShelfWidget* shelf_widget) ShelfWidget* shelf_widget)
: views::ImageButton(listener), : views::ImageButton(listener),
host_(host), host_(host),
...@@ -46,23 +46,23 @@ AlternateAppListButton::~AlternateAppListButton() { ...@@ -46,23 +46,23 @@ AlternateAppListButton::~AlternateAppListButton() {
bool AlternateAppListButton::OnMousePressed(const ui::MouseEvent& event) { bool AlternateAppListButton::OnMousePressed(const ui::MouseEvent& event) {
ImageButton::OnMousePressed(event); ImageButton::OnMousePressed(event);
host_->PointerPressedOnButton(this, LauncherButtonHost::MOUSE, event); host_->PointerPressedOnButton(this, ShelfButtonHost::MOUSE, event);
return true; return true;
} }
void AlternateAppListButton::OnMouseReleased(const ui::MouseEvent& event) { void AlternateAppListButton::OnMouseReleased(const ui::MouseEvent& event) {
ImageButton::OnMouseReleased(event); ImageButton::OnMouseReleased(event);
host_->PointerReleasedOnButton(this, LauncherButtonHost::MOUSE, false); host_->PointerReleasedOnButton(this, ShelfButtonHost::MOUSE, false);
} }
void AlternateAppListButton::OnMouseCaptureLost() { void AlternateAppListButton::OnMouseCaptureLost() {
host_->PointerReleasedOnButton(this, LauncherButtonHost::MOUSE, true); host_->PointerReleasedOnButton(this, ShelfButtonHost::MOUSE, true);
ImageButton::OnMouseCaptureLost(); ImageButton::OnMouseCaptureLost();
} }
bool AlternateAppListButton::OnMouseDragged(const ui::MouseEvent& event) { bool AlternateAppListButton::OnMouseDragged(const ui::MouseEvent& event) {
ImageButton::OnMouseDragged(event); ImageButton::OnMouseDragged(event);
host_->PointerDraggedOnButton(this, LauncherButtonHost::MOUSE, event); host_->PointerDraggedOnButton(this, ShelfButtonHost::MOUSE, event);
return true; return true;
} }
...@@ -84,16 +84,16 @@ void AlternateAppListButton::OnMouseExited(const ui::MouseEvent& event) { ...@@ -84,16 +84,16 @@ void AlternateAppListButton::OnMouseExited(const ui::MouseEvent& event) {
void AlternateAppListButton::OnGestureEvent(ui::GestureEvent* event) { void AlternateAppListButton::OnGestureEvent(ui::GestureEvent* event) {
switch (event->type()) { switch (event->type()) {
case ui::ET_GESTURE_SCROLL_BEGIN: case ui::ET_GESTURE_SCROLL_BEGIN:
host_->PointerPressedOnButton(this, LauncherButtonHost::TOUCH, *event); host_->PointerPressedOnButton(this, ShelfButtonHost::TOUCH, *event);
event->SetHandled(); event->SetHandled();
return; return;
case ui::ET_GESTURE_SCROLL_UPDATE: case ui::ET_GESTURE_SCROLL_UPDATE:
host_->PointerDraggedOnButton(this, LauncherButtonHost::TOUCH, *event); host_->PointerDraggedOnButton(this, ShelfButtonHost::TOUCH, *event);
event->SetHandled(); event->SetHandled();
return; return;
case ui::ET_GESTURE_SCROLL_END: case ui::ET_GESTURE_SCROLL_END:
case ui::ET_SCROLL_FLING_START: case ui::ET_SCROLL_FLING_START:
host_->PointerReleasedOnButton(this, LauncherButtonHost::TOUCH, false); host_->PointerReleasedOnButton(this, ShelfButtonHost::TOUCH, false);
event->SetHandled(); event->SetHandled();
return; return;
default: default:
......
...@@ -13,19 +13,19 @@ class ShelfWidget; ...@@ -13,19 +13,19 @@ class ShelfWidget;
namespace internal { namespace internal {
class LauncherButtonHost; class ShelfButtonHost;
// Button used for the AppList icon on the launcher. // Button used for the AppList icon on the shelf.
// This class is an alternate implementation to // This class is an alternate implementation to ash::internal::AppListButton
// ash::internal::AppListButton for the purposes of testing an // for the purposes of testing an alternate shelf layout
// alternate shelf layout (see ash_switches: UseAlternateShelfLayout). // (see ash_switches: UseAlternateShelfLayout).
class AlternateAppListButton : public views::ImageButton { class AlternateAppListButton : public views::ImageButton {
public: public:
// Bounds size (inset) required for the app icon image (in pixels). // Bounds size (inset) required for the app icon image (in pixels).
static const int kImageBoundsSize; static const int kImageBoundsSize;
AlternateAppListButton(views::ButtonListener* listener, AlternateAppListButton(views::ButtonListener* listener,
LauncherButtonHost* host, ShelfButtonHost* host,
ShelfWidget* shelf_widget); ShelfWidget* shelf_widget);
virtual ~AlternateAppListButton(); virtual ~AlternateAppListButton();
...@@ -45,7 +45,7 @@ class AlternateAppListButton : public views::ImageButton { ...@@ -45,7 +45,7 @@ class AlternateAppListButton : public views::ImageButton {
virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
private: private:
LauncherButtonHost* host_; ShelfButtonHost* host_;
// Reference to the shelf widget containing this button, owned by the // Reference to the shelf widget containing this button, owned by the
// root window controller. // root window controller.
ShelfWidget* shelf_widget_; ShelfWidget* shelf_widget_;
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
#include <vector> #include <vector>
#include "ash/launcher/launcher_button_host.h"
#include "ash/launcher/launcher_types.h" #include "ash/launcher/launcher_types.h"
#include "ash/shelf/shelf_button_host.h"
#include "grit/ash_resources.h" #include "grit/ash_resources.h"
#include "grit/ash_strings.h" #include "grit/ash_strings.h"
#include "ui/base/accessibility/accessible_view_state.h" #include "ui/base/accessibility/accessible_view_state.h"
...@@ -25,7 +25,7 @@ const int kAnimationDurationInMs = 600; ...@@ -25,7 +25,7 @@ const int kAnimationDurationInMs = 600;
const float kAnimationOpacity[] = { 1.0f, 0.4f, 1.0f }; const float kAnimationOpacity[] = { 1.0f, 0.4f, 1.0f };
AppListButton::AppListButton(views::ButtonListener* listener, AppListButton::AppListButton(views::ButtonListener* listener,
LauncherButtonHost* host) ShelfButtonHost* host)
: views::ImageButton(listener), : views::ImageButton(listener),
host_(host) { host_(host) {
ResourceBundle& rb = ResourceBundle::GetSharedInstance(); ResourceBundle& rb = ResourceBundle::GetSharedInstance();
...@@ -86,23 +86,23 @@ void AppListButton::StopLoadingAnimation() { ...@@ -86,23 +86,23 @@ void AppListButton::StopLoadingAnimation() {
bool AppListButton::OnMousePressed(const ui::MouseEvent& event) { bool AppListButton::OnMousePressed(const ui::MouseEvent& event) {
ImageButton::OnMousePressed(event); ImageButton::OnMousePressed(event);
host_->PointerPressedOnButton(this, LauncherButtonHost::MOUSE, event); host_->PointerPressedOnButton(this, ShelfButtonHost::MOUSE, event);
return true; return true;
} }
void AppListButton::OnMouseReleased(const ui::MouseEvent& event) { void AppListButton::OnMouseReleased(const ui::MouseEvent& event) {
ImageButton::OnMouseReleased(event); ImageButton::OnMouseReleased(event);
host_->PointerReleasedOnButton(this, LauncherButtonHost::MOUSE, false); host_->PointerReleasedOnButton(this, ShelfButtonHost::MOUSE, false);
} }
void AppListButton::OnMouseCaptureLost() { void AppListButton::OnMouseCaptureLost() {
host_->PointerReleasedOnButton(this, LauncherButtonHost::MOUSE, true); host_->PointerReleasedOnButton(this, ShelfButtonHost::MOUSE, true);
ImageButton::OnMouseCaptureLost(); ImageButton::OnMouseCaptureLost();
} }
bool AppListButton::OnMouseDragged(const ui::MouseEvent& event) { bool AppListButton::OnMouseDragged(const ui::MouseEvent& event) {
ImageButton::OnMouseDragged(event); ImageButton::OnMouseDragged(event);
host_->PointerDraggedOnButton(this, LauncherButtonHost::MOUSE, event); host_->PointerDraggedOnButton(this, ShelfButtonHost::MOUSE, event);
return true; return true;
} }
......
...@@ -10,13 +10,12 @@ ...@@ -10,13 +10,12 @@
namespace ash { namespace ash {
namespace internal { namespace internal {
class LauncherButtonHost; class ShelfButtonHost;
// Button used for the AppList icon on the launcher. // Button used for the AppList icon on the shelf.
class AppListButton : public views::ImageButton { class AppListButton : public views::ImageButton {
public: public:
AppListButton(views::ButtonListener* listener, AppListButton(views::ButtonListener* listener, ShelfButtonHost* host);
LauncherButtonHost* host);
virtual ~AppListButton(); virtual ~AppListButton();
void StartLoadingAnimation(); void StartLoadingAnimation();
...@@ -34,7 +33,7 @@ class AppListButton : public views::ImageButton { ...@@ -34,7 +33,7 @@ class AppListButton : public views::ImageButton {
virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
private: private:
LauncherButtonHost* host_; ShelfButtonHost* host_;
DISALLOW_COPY_AND_ASSIGN(AppListButton); DISALLOW_COPY_AND_ASSIGN(AppListButton);
}; };
......
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Copyright 2013 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.
#ifndef ASH_LAUNCHER_LAUNCHER_BUTTON_HOST_H_ #ifndef ASH_SHELF_SHELF_BUTTON_HOST_H_
#define ASH_LAUNCHER_LAUNCHER_BUTTON_HOST_H_ #define ASH_SHELF_SHELF_BUTTON_HOST_H_
#include "ash/ash_export.h" #include "ash/ash_export.h"
#include "base/strings/string16.h" #include "base/strings/string16.h"
...@@ -19,9 +19,9 @@ class View; ...@@ -19,9 +19,9 @@ class View;
namespace ash { namespace ash {
namespace internal { namespace internal {
// The launcher buttons communicate back to the host by way of this interface. // The shelf buttons communicate back to the host by way of this interface.
// This interface is used to enable reordering the items on the launcher. // This interface is used to enable reordering the items on the shelf.
class ASH_EXPORT LauncherButtonHost { class ASH_EXPORT ShelfButtonHost {
public: public:
enum Pointer { enum Pointer {
NONE, NONE,
...@@ -58,10 +58,10 @@ class ASH_EXPORT LauncherButtonHost { ...@@ -58,10 +58,10 @@ class ASH_EXPORT LauncherButtonHost {
virtual base::string16 GetAccessibleName(const views::View* view) = 0; virtual base::string16 GetAccessibleName(const views::View* view) = 0;
protected: protected:
virtual ~LauncherButtonHost() {} virtual ~ShelfButtonHost() {}
}; };
} // namespace internal } // namespace internal
} // namespace ash } // namespace ash
#endif // ASH_LAUNCHER_LAUNCHER_BUTTON_HOST_H_ #endif // ASH_SHELF_SHELF_BUTTON_HOST_H_
...@@ -633,7 +633,7 @@ bool ShelfView::StartDrag(const std::string& app_id, ...@@ -633,7 +633,7 @@ bool ShelfView::StartDrag(const std::string& app_id,
ui::MouseEvent event(ui::ET_MOUSE_PRESSED, ui::MouseEvent event(ui::ET_MOUSE_PRESSED,
pt, location_in_screen_coordinates, 0); pt, location_in_screen_coordinates, 0);
PointerPressedOnButton( PointerPressedOnButton(
drag_and_drop_view, LauncherButtonHost::DRAG_AND_DROP, event); drag_and_drop_view, ShelfButtonHost::DRAG_AND_DROP, event);
// Drag the item where it really belongs. // Drag the item where it really belongs.
Drag(location_in_screen_coordinates); Drag(location_in_screen_coordinates);
...@@ -652,7 +652,7 @@ bool ShelfView::Drag(const gfx::Point& location_in_screen_coordinates) { ...@@ -652,7 +652,7 @@ bool ShelfView::Drag(const gfx::Point& location_in_screen_coordinates) {
ui::MouseEvent event(ui::ET_MOUSE_DRAGGED, pt, gfx::Point(), 0); ui::MouseEvent event(ui::ET_MOUSE_DRAGGED, pt, gfx::Point(), 0);
PointerDraggedOnButton( PointerDraggedOnButton(
drag_and_drop_view, LauncherButtonHost::DRAG_AND_DROP, event); drag_and_drop_view, ShelfButtonHost::DRAG_AND_DROP, event);
return true; return true;
} }
...@@ -663,7 +663,7 @@ void ShelfView::EndDrag(bool cancel) { ...@@ -663,7 +663,7 @@ void ShelfView::EndDrag(bool cancel) {
views::View* drag_and_drop_view = view_model_->view_at( views::View* drag_and_drop_view = view_model_->view_at(
model_->ItemIndexByID(drag_and_drop_launcher_id_)); model_->ItemIndexByID(drag_and_drop_launcher_id_));
PointerReleasedOnButton( PointerReleasedOnButton(
drag_and_drop_view, LauncherButtonHost::DRAG_AND_DROP, cancel); drag_and_drop_view, ShelfButtonHost::DRAG_AND_DROP, cancel);
// Either destroy the temporarily created item - or - make the item visible. // Either destroy the temporarily created item - or - make the item visible.
if (drag_and_drop_item_pinned_ && cancel) if (drag_and_drop_item_pinned_ && cancel)
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "ash/launcher/launcher_button_host.h"
#include "ash/launcher/launcher_model_observer.h" #include "ash/launcher/launcher_model_observer.h"
#include "ash/shelf/shelf_button_host.h"
#include "ash/wm/gestures/shelf_gesture_handler.h" #include "ash/wm/gestures/shelf_gesture_handler.h"
#include "base/observer_list.h" #include "base/observer_list.h"
#include "ui/app_list/views/app_list_drag_and_drop_host.h" #include "ui/app_list/views/app_list_drag_and_drop_host.h"
...@@ -50,7 +50,7 @@ class ShelfTooltipManager; ...@@ -50,7 +50,7 @@ class ShelfTooltipManager;
class ASH_EXPORT ShelfView : public views::View, class ASH_EXPORT ShelfView : public views::View,
public LauncherModelObserver, public LauncherModelObserver,
public views::ButtonListener, public views::ButtonListener,
public LauncherButtonHost, public ShelfButtonHost,
public views::ContextMenuController, public views::ContextMenuController,
public views::FocusTraversable, public views::FocusTraversable,
public views::BoundsAnimatorObserver, public views::BoundsAnimatorObserver,
...@@ -245,15 +245,13 @@ class ASH_EXPORT ShelfView : public views::View, ...@@ -245,15 +245,13 @@ class ASH_EXPORT ShelfView : public views::View,
virtual void LauncherItemMoved(int start_index, int target_index) OVERRIDE; virtual void LauncherItemMoved(int start_index, int target_index) OVERRIDE;
virtual void LauncherStatusChanged() OVERRIDE; virtual void LauncherStatusChanged() OVERRIDE;
// Overridden from LauncherButtonHost: // Overridden from ShelfButtonHost:
virtual void PointerPressedOnButton( virtual void PointerPressedOnButton(views::View* view,
views::View* view, Pointer pointer,
Pointer pointer, const ui::LocatedEvent& event) OVERRIDE;
const ui::LocatedEvent& event) OVERRIDE; virtual void PointerDraggedOnButton(views::View* view,
virtual void PointerDraggedOnButton( Pointer pointer,
views::View* view, const ui::LocatedEvent& event) OVERRIDE;
Pointer pointer,
const ui::LocatedEvent& event) OVERRIDE;
virtual void PointerReleasedOnButton(views::View* view, virtual void PointerReleasedOnButton(views::View* view,
Pointer pointer, Pointer pointer,
bool canceled) OVERRIDE; bool canceled) OVERRIDE;
......
This diff is collapsed.
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