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

Side by Side Diff: ui/arc/notification/arc_custom_notification_view.h

Issue 2581703003: Defer focus handling to the content if it claims to have focus. (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_VIEW_H_ 5 #ifndef UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_VIEW_H_
6 #define UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_VIEW_H_ 6 #define UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_VIEW_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "ui/arc/notification/arc_custom_notification_item.h" 12 #include "ui/arc/notification/arc_custom_notification_item.h"
13 #include "ui/arc/notification/arc_notification_surface_manager.h" 13 #include "ui/arc/notification/arc_notification_surface_manager.h"
14 #include "ui/aura/window_observer.h" 14 #include "ui/aura/window_observer.h"
15 #include "ui/message_center/views/custom_notification_content_view_delegate.h" 15 #include "ui/message_center/views/custom_notification_content_view_delegate.h"
16 #include "ui/views/controls/button/button.h" 16 #include "ui/views/controls/button/button.h"
17 #include "ui/views/controls/native/native_view_host.h" 17 #include "ui/views/controls/native/native_view_host.h"
18 18
19 namespace exo { 19 namespace exo {
20 class NotificationSurface; 20 class NotificationSurface;
21 } 21 }
22 22
23 namespace views { 23 namespace views {
24 class ImageButton; 24 class ImageButton;
25 class Painter;
25 class Widget; 26 class Widget;
26 } 27 }
27 28
28 namespace arc { 29 namespace arc {
29 30
30 class ArcCustomNotificationView 31 class ArcCustomNotificationView
31 : public views::NativeViewHost, 32 : public views::NativeViewHost,
32 public views::ButtonListener, 33 public views::ButtonListener,
33 public aura::WindowObserver, 34 public aura::WindowObserver,
34 public ArcCustomNotificationItem::Observer, 35 public ArcCustomNotificationItem::Observer,
(...skipping 20 matching lines...) Expand all
55 56
56 // views::NativeViewHost 57 // views::NativeViewHost
57 void ViewHierarchyChanged( 58 void ViewHierarchyChanged(
58 const ViewHierarchyChangedDetails& details) override; 59 const ViewHierarchyChangedDetails& details) override;
59 void Layout() override; 60 void Layout() override;
60 void OnPaint(gfx::Canvas* canvas) override; 61 void OnPaint(gfx::Canvas* canvas) override;
61 void OnKeyEvent(ui::KeyEvent* event) override; 62 void OnKeyEvent(ui::KeyEvent* event) override;
62 void OnGestureEvent(ui::GestureEvent* event) override; 63 void OnGestureEvent(ui::GestureEvent* event) override;
63 void OnMouseEntered(const ui::MouseEvent& event) override; 64 void OnMouseEntered(const ui::MouseEvent& event) override;
64 void OnMouseExited(const ui::MouseEvent& event) override; 65 void OnMouseExited(const ui::MouseEvent& event) override;
66 void OnFocus() override;
67 void OnBlur() override;
65 68
66 // views::ButtonListener 69 // views::ButtonListener
67 void ButtonPressed(views::Button* sender, const ui::Event& event) override; 70 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
68 71
69 // aura::WindowObserver 72 // aura::WindowObserver
70 void OnWindowBoundsChanged(aura::Window* window, 73 void OnWindowBoundsChanged(aura::Window* window,
71 const gfx::Rect& old_bounds, 74 const gfx::Rect& old_bounds,
72 const gfx::Rect& new_bounds) override; 75 const gfx::Rect& new_bounds) override;
73 void OnWindowDestroying(aura::Window* window) override; 76 void OnWindowDestroying(aura::Window* window) override;
74 77
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 109
107 // Protects from call loops between Layout and OnWindowBoundsChanged. 110 // Protects from call loops between Layout and OnWindowBoundsChanged.
108 bool in_layout_ = false; 111 bool in_layout_ = false;
109 112
110 DISALLOW_COPY_AND_ASSIGN(ArcCustomNotificationView); 113 DISALLOW_COPY_AND_ASSIGN(ArcCustomNotificationView);
111 }; 114 };
112 115
113 } // namespace arc 116 } // namespace arc
114 117
115 #endif // UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_VIEW_H_ 118 #endif // UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698