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

Unified Diff: ash/system/web_notification/web_notification_view.h

Issue 11229022: Move ash/system/web_notification message_center to ui/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase again. Created 8 years, 2 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
Index: ash/system/web_notification/web_notification_view.h
diff --git a/ash/system/web_notification/web_notification_view.h b/ash/system/web_notification/web_notification_view.h
deleted file mode 100644
index 2606166e61d051e4531c447d6e50abdc2e7f965d..0000000000000000000000000000000000000000
--- a/ash/system/web_notification/web_notification_view.h
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) 2012 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.
-
-#ifndef ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_VIEW_H_
-#define ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_VIEW_H_
-
-#include "ash/system/web_notification/web_notification.h"
-#include "ash/system/web_notification/web_notification_list.h"
-#include "ui/compositor/layer_animation_observer.h"
-#include "ui/views/controls/button/button.h"
-#include "ui/views/view.h"
-
-namespace views {
-class ImageButton;
-class ImageView;
-class ScrollView;
-}
-
-namespace message_center {
-
-// Individual notifications constants
-const int kWebNotificationWidth = 320;
-const int kWebNotificationButtonWidth = 32;
-const int kWebNotificationIconSize = 40;
-
-// The view for a notification entry (icon + message + buttons).
-class WebNotificationView : public views::View,
- public views::ButtonListener,
- public ui::ImplicitAnimationObserver {
- public:
- WebNotificationView(WebNotificationList::Delegate* list_delegate,
- const WebNotification& notification,
- int scroll_bar_width);
-
- virtual ~WebNotificationView();
-
- void set_scroller(views::ScrollView* scroller) { scroller_ = scroller; }
-
- // views::View overrides.
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
-
- virtual ui::EventResult OnGestureEvent(
- const ui::GestureEvent& event) OVERRIDE;
-
- // Overridden from ButtonListener.
- virtual void ButtonPressed(views::Button* sender,
- const ui::Event& event) OVERRIDE;
-
- // Overridden from ImplicitAnimationObserver.
- virtual void OnImplicitAnimationsCompleted() OVERRIDE;
-
- private:
- enum SlideDirection {
- SLIDE_LEFT,
- SLIDE_RIGHT
- };
-
- // Shows the menu for the notification.
- void ShowMenu(gfx::Point screen_location);
-
- // Restores the transform and opacity of the view.
- void RestoreVisualState();
-
- // Slides the view out and closes it after the animation.
- void SlideOutAndClose(SlideDirection direction);
-
- WebNotificationList::Delegate* list_delegate_;
- WebNotification notification_;
- views::ImageView* icon_;
- views::ImageButton* close_button_;
-
- views::ScrollView* scroller_;
- float gesture_scroll_amount_;
-
- DISALLOW_COPY_AND_ASSIGN(WebNotificationView);
-};
-
-} // namespace message_center
-
-#endif // ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_VIEW_H_
« no previous file with comments | « ash/system/web_notification/web_notification_tray_unittest.cc ('k') | ash/system/web_notification/web_notification_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698