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

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: comment 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)
53 // This is deliberately used only in linux. For an aura build on windows, the
54 // above block of code is fine.
55 switch (ui::EventTypeFromNative(event)) {
56 case ui::ET_MOUSE_MOVED:
57 case ui::ET_MOUSE_DRAGGED:
58 case ui::ET_MOUSE_EXITED:
59 HandleMouseMoveEvent();
60 break;
61 default:
62 break;
63 }
52 #else 64 #else
53 NOTIMPLEMENTED(); 65 NOTIMPLEMENTED();
54 #endif 66 #endif
55 } 67 }
56 68
57 bool BalloonCollectionImpl::IsCursorInBalloonCollection() const { 69 bool BalloonCollectionImpl::IsCursorInBalloonCollection() const {
58 #if defined(OS_WIN) 70 #if defined(OS_WIN)
59 DWORD pos = GetMessagePos(); 71 DWORD pos = GetMessagePos();
60 gfx::Point cursor(pos); 72 gfx::Point cursor(pos);
61 #else 73 #else
(...skipping 22 matching lines...) Expand all
84 else 96 else
85 NOTREACHED(); 97 NOTREACHED();
86 98
87 PositionBalloons(true); 99 PositionBalloons(true);
88 } 100 }
89 101
90 // static 102 // static
91 BalloonCollection* BalloonCollection::Create() { 103 BalloonCollection* BalloonCollection::Create() {
92 return new BalloonCollectionImpl(); 104 return new BalloonCollectionImpl();
93 } 105 }
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