Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(259)

Unified Diff: ui/message_center/views/message_view.h

Issue 2850153003: Revert of CrOS: Fix appearance of notification toasts when sliding out via gesture (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/message_center/views/message_center_view_unittest.cc ('k') | ui/message_center/views/message_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/views/message_view.h
diff --git a/ui/message_center/views/message_view.h b/ui/message_center/views/message_view.h
index c35d539444b864f755c36eb18d130e46c4247a9d..147e99414561d4a78f28d029fa7d2ed214e33533 100644
--- a/ui/message_center/views/message_view.h
+++ b/ui/message_center/views/message_view.h
@@ -16,8 +16,7 @@
#include "ui/gfx/image/image_skia.h"
#include "ui/message_center/message_center_export.h"
#include "ui/message_center/notification.h"
-#include "ui/message_center/views/slide_out_controller.h"
-#include "ui/views/view.h"
+#include "ui/views/controls/slide_out_view.h"
namespace views {
class Painter;
@@ -36,9 +35,7 @@
// An base class for a notification entry. Contains background and other
// elements shared by derived notification views.
-class MESSAGE_CENTER_EXPORT MessageView
- : public views::View,
- public views::SlideOutController::Delegate {
+class MESSAGE_CENTER_EXPORT MessageView : public views::SlideOutView {
public:
MessageView(MessageCenterController* controller,
const Notification& notification);
@@ -50,8 +47,8 @@
// Returns the insets for the shadow it will have for rich notification.
static gfx::Insets GetShadowInsets();
- // Creates a shadow around the notification and changes slide-out behavior.
- void SetIsNested();
+ // Creates a shadow around the notification.
+ void CreateShadowBorder();
virtual bool IsCloseButtonFocused() const = 0;
virtual void RequestFocusOnCloseButton() = 0;
@@ -60,7 +57,7 @@
void OnCloseButtonPressed();
- // views::View
+ // Overridden from views::View:
void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
bool OnMousePressed(const ui::MouseEvent& event) override;
bool OnKeyPressed(const ui::KeyEvent& event) override;
@@ -69,11 +66,9 @@
void OnFocus() override;
void OnBlur() override;
void Layout() override;
+
+ // Overridden from ui::EventHandler:
void OnGestureEvent(ui::GestureEvent* event) override;
-
- // views::SlideOutController::Delegate
- ui::Layer* GetSlideOutLayer() override;
- void OnSlideOut() override;
void set_scroller(views::ScrollView* scroller) { scroller_ = scroller; }
std::string notification_id() { return notification_id_; }
@@ -85,6 +80,9 @@
}
protected:
+ // Overridden from views::SlideOutView:
+ void OnSlideOut() override;
+
// Creates and add close button to view hierarchy when necessary. Derived
// classes should call this after its view hierarchy is populated to ensure
// it is on top of other views.
@@ -111,12 +109,6 @@
std::unique_ptr<views::Painter> focus_painter_;
- views::SlideOutController slide_out_controller_;
-
- // True if |this| is embedded in another view. Equivalent to |!top_level| in
- // MessageViewFactory parlance.
- bool is_nested_ = false;
-
DISALLOW_COPY_AND_ASSIGN(MessageView);
};
« no previous file with comments | « ui/message_center/views/message_center_view_unittest.cc ('k') | ui/message_center/views/message_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698