summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/notifications/notification_panel.h
Commit message (Collapse)AuthorAgeFilesLines
* Replace ScopedRunnableMethodFactory with Closure in NotificationPanel.achuith@chromium.org2011-10-251-4/+3
| | | | | | | | BUG=chromium-os:22024 TEST=tests pass. Review URL: http://codereview.chromium.org/8387022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107166 0039d316-1c4b-4281-b951-d872f2087c98
* Move NotificationObserver, NotificationSource, and NotificationDetails to ↵jam@chromium.org2011-10-191-5/+5
| | | | | | | | | | | content/public/browser. This patch got way bigger than I wanted, but once I moved NotificationDetails, I figured I might as well mvoe the others since they're in the same files. In hindsight, I should have converted a subset of files at a time by leaving a using statement in the header. BUG=98716 TBR=joi git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106196 0039d316-1c4b-4281-b951-d872f2087c98
* CrOS - Fix use-after-free in balloon notificationsjamescook@chromium.org2011-09-131-12/+12
| | | | | | | | | | | The OnStale notification was using pointer to a closed (and hence deleted) balloon. BUG=chromium-os:20356 TEST=none Review URL: http://codereview.chromium.org/7887012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100960 0039d316-1c4b-4281-b951-d872f2087c98
* Moving notification types which are chrome specific to a new header file ↵ananta@chromium.org2011-07-101-1/+1
| | | | | | | | | | | | | chrome_notification_types.h. This file lives in chrome\common. The chrome specific notifications start from NOTIFICATION_CONTENT_END which defines the end of the enum used by content to define notification types. The notificaton_type.h file in content\common has been renamed to content_notification_types.h BUG=76698 Review URL: http://codereview.chromium.org/7327007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91972 0039d316-1c4b-4281-b951-d872f2087c98
* Set gtk urgency for panels when tab title changes.stevenjb@google.com2011-04-161-0/+1
| | | | | | | | | | | | | BUG=chromium-os:1486 TEST=See issue + test popup windows (panels) in general, especially minimizing and maximizing. Try popular apps that use panel windows in addition to the Talk app. Things to look for when testing: Highlighting should occur when the window title changes, unless the panel has focus. Focusing, minimizing or maximizing the panel should clear the highlight state. Review URL: http://codereview.chromium.org/6836008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81859 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: Update the references of notification includes to the new content ↵tfarina@chromium.org2011-03-071-2/+2
| | | | | | | | | | | location. BUG=None TEST=None Review URL: http://codereview.chromium.org/6628058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77199 0039d316-1c4b-4281-b951-d872f2087c98
* Change includes of gfx/* to ui/gfx/*sail@chromium.org2011-02-051-1/+1
| | | | | | | | | BUG=71063 TEST=compiled Review URL: http://codereview.chromium.org/6312156 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73890 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: Run beforeunload handlers when closing panels.derat@chromium.org2011-01-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | When a panel content window has a beforeunload handler, we'd previously close its titlebar (which would cause the window manager to also hide the content window in anticipation of it being closed too), but then leave the content window mapped and open a modal dialog (which would be kept invisible by the window manager). This would effectively freeze the UI unless the user happened to press the Escape key, which would still leave us in a state where we'd end up restoring the panel again the next time the session was restored. This change makes us instead call BrowserView::CanClose() first and avoid closing the panel if we're not supposed to. BUG=chromium-os:10910 TEST=went to air1.com/listen and checked that i get an alert when closing the panel with "leave this page" and "stay on this page" buttons that function as expected Review URL: http://codereview.chromium.org/6247002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71363 0039d316-1c4b-4281-b951-d872f2087c98
* Google codestyle prescribes sorting #include filenames within a section.dilmah@chromium.org2010-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | | Do it fast with following shell script: export LC_ALL=C find chrome/browser/chromeos/ -name '*.h' -o -name '*.cc' \ | xargs grep -C1 '^#include' \ | awk -F: '$2 !~ "include" { prev=""; next } ($2 <= prev) { print $1 } { prev=$2 }' \ | uniq \ | xargs -n1 sh -c 'cat "$1" \ | awk "{ tag=((/^#include/) \"_\" (/</) \"_\" (/third.party/)); print tag \"\t\" \$0 }" \ | awk -vi=0 -F\\t "{ if (!/^1_0_/ || \$1 != prev) { ++i } } { printf \"%09d\t%s\n\",i,\$0; prev=\$1 }" \ | sort \ | sed "s/^[0-9]*\t[0-9]_[0-9]_[0-9]\t//" > "$1".fixed; mv -f "$1".fixed "$1"' xxx BUG=None TEST=Manual Review URL: http://codereview.chromium.org/3402010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59646 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-261-0/+1
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* Add UpdateAndShowNotification API to BallonCollectionImloshima@chromium.org2010-05-071-5/+1
| | | | | | | | | | | | | | | | | I was going to do Show(std::stringi d), but it'd require some refactoring on notification framework, so I decided to have UPdateAndShow first. I'll do refactoring once I finish screen lock and will update the code accordingly. other minor changes: * removed is_visible() as it's unnecessary. * cleanup browsertests code. BUG=http://crosbug.com/2692 TEST=added test cases to existing browser tests. Review URL: http://codereview.chromium.org/1933008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46755 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crash bug when mouse hovers over system notification.oshima@chromium.org2010-04-301-0/+3
| | | | | | | | | BUG=http://crosbug.com/2940 TEST=new test NotificationTest.TestActivateDeactivate is added to cover this. Review URL: http://codereview.chromium.org/1824001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46139 0039d316-1c4b-4281-b951-d872f2087c98
* Use WidgetGtk as viewport of ScrollView to make scrolling renderers smoother.oshima@chromium.org2010-04-231-5/+12
| | | | | | | | | | | | | | | | | | | | | | Changed the layout of buttons on notification. This fits nicer because a notification can be shorter and menu requires more hight. Enable double buffer where necessary to avoid flicker. Fixed a condition to close ControlViewHost. It should be closed when renderer is deleted. Fixed notification_browsertest so that it passes on chromeos device. Note: changes to native_view_host_gtk and widget_gtk are being done separately in http://codereview.chromium.org/1725005 so you do not need to review them. I won't check this in unless that one is approved. BUG=23445,33306 TEST=no functional change. all tests must still pass. Review URL: http://codereview.chromium.org/1754003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45395 0039d316-1c4b-4281-b951-d872f2087c98
* Scroll notification panel so that new/updated notification is visible.oshima@chromium.org2010-04-191-2/+21
| | | | | | | | | | | | | | | | * Updated the test so that the notifications have some text and reasonable size. (Empty string was making them smaller.) * Don't leave KEEPS_SIZE state when new notification is added. (test updated) * A couple of clean ups - const - removed unused code - Added utility function to avoid repeating static_cast. BUG=41011 TEST=new TestScrollBalloonToVisible test is added. updated TestKeepSizeState. Review URL: http://codereview.chromium.org/1638017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44978 0039d316-1c4b-4281-b951-d872f2087c98
* Hover buttons for notification.oshima@chromium.org2010-04-161-2/+30
| | | | | | | | | | | | | | | * Chagned WidgetGtk so that any GtkFixed can be parent of WidgetGtk. * Close button and Options menu is moved to separate TYPE_CHILD WidgetGtk which is shown/hidden as mouse moves. TODO: host Widget is not transparent right now. I'll address this in separate CL. BUG=41011 TEST=none Review URL: http://codereview.chromium.org/1654006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44861 0039d316-1c4b-4281-b951-d872f2087c98
* notification panel fix on chromeos.oshima@chromium.org2010-04-081-2/+24
| | | | | | | | | | | | | | * Changed to use NotificationService instead of delegate to notify the panel state change. * Cleanup the client event signal handler so that event won't get fired on closed instance. * Added chromeos mode. Under ChromeOS, it will wait a message from WindowManager that tells the state of panel. * The StateTransition2 test relies on the fact that Panel state change takes longer than stale timeout, so we can't use zero stale timeout. Changed to explicitly update the stale state. BUG=http://crosbug.com/2346 TEST=NotificationPanelTest.TestStateTransition2 should pass on chromeos device. Review URL: http://codereview.chromium.org/1523012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43909 0039d316-1c4b-4281-b951-d872f2087c98
* * Add / exhanced tests for state transition.oshima@chromium.org2010-03-281-1/+5
| | | | | | | | | | | | | * Found and fixed the following bug in this test. (yay!) minimize if no sticky / new notification exists after Remove * Replaced RunAllPending with InProcessBrowserTest::RunAllPendingEvents BUG=http://crosbug/2027 TEST=two new browser tests and one updated browser test. Review URL: http://codereview.chromium.org/1357005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42921 0039d316-1c4b-4281-b951-d872f2087c98
* Add KEEP_SIZE state to panel and fixed misc bugs.oshima@chromium.org2010-03-221-42/+61
| | | | | | | | | | | | | | | * Replaced "closed_by_user, update_pane_on_leave_" flags with KEEP_SIZE state. The panel moves to this state when a user interacts with the panel. It keeps its size unless a notification is added, or removed, or it has more space than neccessary when mouse leaves the panel. * Fixed the crash when the preferred size is calculated to zero (can happen depending on timing) by adding minimum size. * fixed wrong return type (bool -> int) * GetNewBounds was using the panel's bounds instead of notification's bounds. * Refactored and clean up in tests.. BUG=33306 TEST=added two more browser tests for state transition. Review URL: http://codereview.chromium.org/1164004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42282 0039d316-1c4b-4281-b951-d872f2087c98
* Don't change the panel state when deleting notifications (and mouse is on ↵oshima@chromium.org2010-03-191-1/+18
| | | | | | | | | | | | | the panel) so that a user can delete multiple notification by clicking mouse on the same position. BUG=33306 TEST=none. I will add tests next week. Review URL: http://codereview.chromium.org/1147003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42161 0039d316-1c4b-4281-b951-d872f2087c98
* * Moved sticky/controls frag to chromeos::BalloonViewImploshima@chromium.org2010-03-171-0/+7
| | | | | | | | | | | | | | * Added AddSystemNotification to add system notification and UpdateNotification to update a notification. * refactored NotificationObjectProxy and added NotificationDelegate class. * Added notification_browser.cc. BUG=33306 TEST=added notification_browser.cc with minimal test. I'll add more in next step. Review URL: http://codereview.chromium.org/1013002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41801 0039d316-1c4b-4281-b951-d872f2087c98
* Fixing method signatures.oshima@chromium.org2010-03-151-1/+1
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/973002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41610 0039d316-1c4b-4281-b951-d872f2087c98
* Move base/gfx contents to gfx/ben@chromium.org2010-03-141-1/+1
| | | | | | | | | TBR=darin BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41559 0039d316-1c4b-4281-b951-d872f2087c98
* Autoslide/hide notifications after timeout.oshima@chromium.org2010-03-121-3/+59
| | | | | | | | | | | | | | * Introduced panel's state to manage which notifications will be shown.' * Added "OnPanelStateChanged" to PanelController::Delegate method to monitor the panel's state. * Removed unnecessary SetSize in BalloonViewImpl. The size is set in BalloonViewImpl::Layout. BUG=33306 TEST=This requires chromeos's wm and system notification to test (which does not exit yet). None for now but I am writing unittest now. Review URL: http://codereview.chromium.org/874004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41484 0039d316-1c4b-4281-b951-d872f2087c98
* Display sticky and non sticky notifications separately.oshima@chromium.org2010-03-061-6/+15
| | | | | | | | | | | | Added separate containers for sitcky, non sticky notifications. I copied most of desktop notification unittest. I'll refactor it and reduce duplicate in next CL. BUG=33306 TEST=added desktop_notification_unittests for chromeos. Review URL: http://codereview.chromium.org/661289 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40801 0039d316-1c4b-4281-b951-d872f2087c98
* Refactoring balloon collection and added chromeos's BalloonCollection.oshima@chromium.org2010-03-021-12/+12
| | | | | | | | | | | | | | * Separated BalloonCollection and BalloonCollectionImpl * Moved BalloonSpaceChangeListener to BalloonCollection from BalloonCollectionImpl as this listener is used by NotificationUIManager. * Added BalloonCollectionImpl for chromeos. (chromeos/notifications/balloon_collectino_impl.{h,cc}) * Changed NotificationPanel to use ScrollView to show all notifications in the panel. BUG=none TEST=none Review URL: http://codereview.chromium.org/660111 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40460 0039d316-1c4b-4281-b951-d872f2087c98
* Moved chromeos's frame classes under chromeos/frame.oshima@chromium.org2010-02-121-1/+1
| | | | | | | | | | | | - Made Init in BrowserFrameGtk virtual so that chromeos can use it's own frame view. - Introduced BrowserFrameChromeos (which is currently empty) BUG=none TEST=none Review URL: http://codereview.chromium.org/606014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38980 0039d316-1c4b-4281-b951-d872f2087c98
* 1st step to implement notification panel for chromeososhima@chromium.org2010-02-051-0/+58
- re-using views implementation, but removed layout related code - add NotificationPanel - added SetSize in BalloonViewHost. I needed this because I removed animation code and NativeViewHostGtk doesn't know about render view. I need to think a bit more to find out how to deal wit this. It's using existing balloon collection, but we may need one for chromeos (or may not). BUG=33306 TEST=none Review URL: http://codereview.chromium.org/572018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38255 0039d316-1c4b-4281-b951-d872f2087c98