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

Side by Side Diff: chrome/browser/notifications/balloon_collection_views.cc

Issue 8355042: aura: Use the existing notification system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/notifications/balloon_collection_impl.h" 5 #include "chrome/browser/notifications/balloon_collection_impl.h"
6 6
7 #include "chrome/browser/notifications/balloon.h" 7 #include "chrome/browser/notifications/balloon.h"
8 #include "chrome/browser/ui/views/notifications/balloon_view.h" 8 #include "chrome/browser/ui/views/notifications/balloon_view.h"
9 #include "ui/base/events.h" 9 #include "ui/base/events.h"
10 #include "ui/gfx/rect.h" 10 #include "ui/gfx/rect.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 void BalloonCollectionImpl::DidProcessEvent(const base::NativeEvent& event) { 43 void BalloonCollectionImpl::DidProcessEvent(const base::NativeEvent& event) {
44 #if defined(OS_WIN) 44 #if defined(OS_WIN)
45 switch (event.message) { 45 switch (event.message) {
46 case WM_MOUSEMOVE: 46 case WM_MOUSEMOVE:
47 case WM_MOUSELEAVE: 47 case WM_MOUSELEAVE:
48 case WM_NCMOUSELEAVE: 48 case WM_NCMOUSELEAVE:
49 HandleMouseMoveEvent(); 49 HandleMouseMoveEvent();
50 break; 50 break;
51 } 51 }
52 #elif defined(USE_AURA)
Ben Goodger (Google) 2011/11/01 16:18:50 You will need to do this first, otherwise it won't
sadrul 2011/11/01 16:21:20 I think the above code is right even on WIN + AURA
Ben Goodger (Google) 2011/11/01 16:30:14 OK, can you note that the OS_WIN code is fine for
sadrul 2011/11/01 17:06:22 Done.
53 switch (ui::EventTypeFromNative(event)) {
54 case ui::ET_MOUSE_MOVED:
55 case ui::ET_MOUSE_DRAGGED:
56 case ui::ET_MOUSE_EXITED:
57 HandleMouseMoveEvent();
58 break;
59 default:
60 break;
61 }
52 #else 62 #else
53 NOTIMPLEMENTED(); 63 NOTIMPLEMENTED();
54 #endif 64 #endif
55 } 65 }
56 66
57 bool BalloonCollectionImpl::IsCursorInBalloonCollection() const { 67 bool BalloonCollectionImpl::IsCursorInBalloonCollection() const {
58 #if defined(OS_WIN) 68 #if defined(OS_WIN)
59 DWORD pos = GetMessagePos(); 69 DWORD pos = GetMessagePos();
60 gfx::Point cursor(pos); 70 gfx::Point cursor(pos);
61 #else 71 #else
(...skipping 22 matching lines...) Expand all
84 else 94 else
85 NOTREACHED(); 95 NOTREACHED();
86 96
87 PositionBalloons(true); 97 PositionBalloons(true);
88 } 98 }
89 99
90 // static 100 // static
91 BalloonCollection* BalloonCollection::Create() { 101 BalloonCollection* BalloonCollection::Create() {
92 return new BalloonCollectionImpl(); 102 return new BalloonCollectionImpl();
93 } 103 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros_stubs_aura.cc ('k') | chrome/browser/ui/views/notifications/balloon_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698