summaryrefslogtreecommitdiffstats
path: root/ui/message_center/base_format_view.cc
Commit message (Collapse)AuthorAgeFilesLines
* Added button support to image and list notifications.dharcourt@chromium.org2013-01-231-10/+13
| | | | | | | | | BUG=168730 Review URL: https://chromiumcodereview.appspot.com/12016030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178279 0039d316-1c4b-4281-b951-d872f2087c98
* Increased notification close button click area & added state images.dharcourt@chromium.org2013-01-231-17/+15
| | | | | | | | | | | | | | | | | | | | Expanded the clickable area for notifications from 8 x 8 pixels to 29 x 29 pixels and added hover and pressed state images. Implementing this required moving the close button from a grid layout column to a separate layer of the notification view, which caused a number of changes in NotificationView's drawing. In passing, references to one of the notification types the notification view supports were changed from "multiple-item notifications" to the new (and improved :-) "list notifications". BUG=168822 Review URL: https://chromiumcodereview.appspot.com/11946035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178196 0039d316-1c4b-4281-b951-d872f2087c98
* This is a modified version of http://crrev.com/11474003. That change dharcourt@chromium.org2013-01-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | list received a LGTM and was committed as 173387 but then reverted with 173388 because it generated some Clang errors that were not detected in local or try builds. This version's only changes relative to http://crrev.com/11474003 are: 1) The removal of the unused kNoBitmaps global object in balloon_view_ash.cc that was causing a |declaration requires an exit-time destructor| Clang error. 2) The addition of a BalloonViewAsh::DownloadImages::~DownloadImage() virtual destructor in balloon_view_ash.cc to avoid a |delete called on ... that has virtual functions but non-virtual destructor| Clang error. 3) The removal of unnecessary imports of <map> and notification_types.h and of an unnecessary forward declaration of skBitmap in balloon_view_ash.h. TBR=derat@chromium.org for OWNERS review of balloon_view_ash.{h,cc} changes. BUG=161101 Review URL: https://chromiumcodereview.appspot.com/11588009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174929 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 173387 - Broke compile on clang botsrsleevi@chromium.org2012-12-161-2/+2
| | | | | | | | | | | | | | Added support for secondary icon to multi-item notification view TBR=derat@chromium.org for c/b/ui/views/ash/balloon_view_ash.* BUG=161101 Review URL: https://chromiumcodereview.appspot.com/11474003 TBR=dharcourt@chromium.org Review URL: https://codereview.chromium.org/11593003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173388 0039d316-1c4b-4281-b951-d872f2087c98
* Added support for secondary icon to multi-item notification viewdharcourt@chromium.org2012-12-161-2/+2
| | | | | | | | | TBR=derat@chromium.org for c/b/ui/views/ash/balloon_view_ash.* BUG=161101 Review URL: https://chromiumcodereview.appspot.com/11474003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173387 0039d316-1c4b-4281-b951-d872f2087c98
* Set NULL to button_one_ and _two_ at ctor of BaseMessageView.mukai@chromium.org2012-12-151-4/+3
| | | | | | | | | BUG=none TBR=miket@chromium.org Review URL: https://codereview.chromium.org/11568053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173268 0039d316-1c4b-4281-b951-d872f2087c98
* This should have multiple-item view matching the mock-ups pixel fordharcourt@chromium.org2012-12-141-1/+1
| | | | | | | | | | | | | pixel except for the time display and the small icon which aren't supported yet. The time display has been laid out to match the mock-up, it just needs to get the time in an appropriate string format. BUG=161101 Review URL: https://chromiumcodereview.appspot.com/11434017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173094 0039d316-1c4b-4281-b951-d872f2087c98
* Plumb the ButtonPressed callback of the two buttons in BaseFormatView ↵miket@chromium.org2012-12-141-14/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | through to the NotificationDelegate's new ButtonClick() method. The practical point of this CL is twofold: (1) provide a good stopping point for the larger goal of sending this new ButtonClick event to JavaScript callers, and (2) provide new useful functionality to C++ code that is interested in button-click events. 0. Remove vestigal intents fields, which we're replacing with explicit callbacks. 1. Make BaseFormatView's ButtonPressed() send a new NotificationList::Delegate::OnButtonClicked(). 2. MessageCenter passes that through to MessageCenter::Delegate::OnButtonClicked(), which has the same name as the above delegate method but is NOT directly related. 3. BalloonCollectionImplAsh looks up the specific balloon whose button was clicked, then calls the appropriate OnButtonClick() (note the change in tense). 4. chrome/browser/notifications/balloon passes the baton to the Notification that it owns, calling its ButtonClick() method. 5. The Notification's delegate handles ButtonClick(). Again, these two method share the name but are not strictly related. 6. In the case we'll eventually care about, notification_api.cc will implement a functional ButtonClick(). But for now this implementation is a stub. BUG=164249 Review URL: https://chromiumcodereview.appspot.com/11546003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173043 0039d316-1c4b-4281-b951-d872f2087c98
* Calls SizeToFit() method for multi-lined Labels to return correct height.mukai@chromium.org2012-11-271-0/+5
| | | | | | | | | BUG=162146 Review URL: https://chromiumcodereview.appspot.com/11417129 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169550 0039d316-1c4b-4281-b951-d872f2087c98
* Reland 11358144 (Switch fields over to base format fields).miket@chromium.org2012-11-151-42/+114
| | | | | | | | | | | | | | | | | | | | | | | | Continuing TODO items from a previous CL, remove the "extra_field" and "second_extra_field" keys from the API and replace with real keys from the Base Format View spec. Implement a rough layout that resembles the expanded mode of the view. (Broke win_aura on original landing, now adds dependency on base.gyp:base_i18n.) Outstanding items: - As stated above, the layout is still ugly. - We don't gracefully handle empty buttons. We don't crash, either, but it looks even uglier when the buttons are missing. - The buttons don't do anything when the user clicks on them. - The second icon is just a redraw of the first. TBR=mukai@chromium.org BUG=161038 Review URL: https://chromiumcodereview.appspot.com/11312241 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167851 0039d316-1c4b-4281-b951-d872f2087c98
* views: Improve the constant names of the ButtonState enum.tfarina@chromium.org2012-11-141-1/+1
| | | | | | | | | | | | | | | | | | | | | We rename then to STATE_FOO, so it is less confusing: Rather than: if (state == views::CustomButton::BS_HOT) { ... } We now have: if (state == views::CustomButton::STATE_HOVERED) { ... } A bit more verbose, but much better to read. R=sky@chromium.org TBR=jochen@chromium.org # for content/shell Review URL: https://chromiumcodereview.appspot.com/11275272 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167684 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 167589 - Continuing TODO items from a previous CL, remove the ↵jochen@chromium.org2012-11-141-114/+42
| | | | | | | | | | | | | | | | | | | | | "extra_field" and "second_extra_field" keys from the API and replace with real keys from the Base Format View spec. Implement a rough layout that resembles the expanded mode of the view. Breaks win_aura, I guess you need to add a dependency on base.gyp:base_i18n Outstanding items: - As stated above, the layout is still ugly. - We don't gracefully handle empty buttons. We don't crash, either, but it looks even uglier when the buttons are missing. - The buttons don't do anything when the user clicks on them. - The second icon is just a redraw of the first. - The timestamp is hardcoded to "10:43 AM" for layout purposes. I need to do more research on the appropriate date-formatting facilities available to us, and from that back out the timestamp field format in the API itself. Review URL: https://chromiumcodereview.appspot.com/11358144 TBR=miket@chromium.org Review URL: https://codereview.chromium.org/11377156 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167662 0039d316-1c4b-4281-b951-d872f2087c98
* Continuing TODO items from a previous CL, remove the "extra_field" and ↵miket@chromium.org2012-11-141-42/+114
| | | | | | | | | | | | | | | | "second_extra_field" keys from the API and replace with real keys from the Base Format View spec. Implement a rough layout that resembles the expanded mode of the view. Outstanding items: - As stated above, the layout is still ugly. - We don't gracefully handle empty buttons. We don't crash, either, but it looks even uglier when the buttons are missing. - The buttons don't do anything when the user clicks on them. - The second icon is just a redraw of the first. - The timestamp is hardcoded to "10:43 AM" for layout purposes. I need to do more research on the appropriate date-formatting facilities available to us, and from that back out the timestamp field format in the API itself. Review URL: https://chromiumcodereview.appspot.com/11358144 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167589 0039d316-1c4b-4281-b951-d872f2087c98
* views: Add a new view that can be slided out using gestures.sadrul@chromium.org2012-11-091-2/+0
| | | | | | | | | | | | Refactor the code for sliding out a View from the message-center into views so that it can be used more generally. Use it for both system and message-center notifications. BUG=158075 Review URL: https://codereview.chromium.org/11361178 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166944 0039d316-1c4b-4281-b951-d872f2087c98
* Replace Label::Alignment with gfx::HorizontalAlignment.msw@chromium.org2012-11-071-4/+4
| | | | | | | | | | | | | | | | | Also remove unnecessary center alignment specifications in: ash/wm/maximize_bubble_controller.cc chrome/browser/ui/views/find_bar_view.cc chrome/browser/ui/views/panels/panel_frame_view.cc chrome/browser/ui/views/speech_recognition_bubble_views.cc ui/message_center/message_center_bubble.cc BUG=90426,155526 TEST=No behavioral changes. R=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/11377005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166462 0039d316-1c4b-4281-b951-d872f2087c98
* Add a second kind of WebContentsView called BaseFormatView that displays two ↵miket@chromium.org2012-11-021-0/+121
extra fields. Both the view and the two fields are contrived for the purposes of getting the design right before diving into UI polish/fit. Notes: - Notification and WebNotification need to be unified into a single structure. Once WebNotification moves out of ash/, it serves no separate purpose anymore. This work is blocked on that move (see http://codereview.chromium.org/11229022/). Review URL: https://chromiumcodereview.appspot.com/11196009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165786 0039d316-1c4b-4281-b951-d872f2087c98