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

Unified Diff: ui/message_center/views/notification_view.h

Issue 1292003004: Elide origins displayed on web notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Style nit Created 5 years, 4 months 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 side-by-side diff with in-line comments
Download patch
Index: ui/message_center/views/notification_view.h
diff --git a/ui/message_center/views/notification_view.h b/ui/message_center/views/notification_view.h
index 95bf7c20b2ae27f9f23aa23a940349283062a3f0..c7612cc6f55fc310543e26ae1de9f9f159f2611c 100644
--- a/ui/message_center/views/notification_view.h
+++ b/ui/message_center/views/notification_view.h
@@ -11,6 +11,8 @@
#include "ui/message_center/views/message_view.h"
#include "ui/views/view_targeter_delegate.h"
+class GURL;
+
namespace views {
class ProgressBar;
}
@@ -73,6 +75,7 @@ class MESSAGE_CENTER_EXPORT NotificationView
private:
FRIEND_TEST_ALL_PREFIXES(NotificationViewTest, CreateOrUpdateTest);
+ FRIEND_TEST_ALL_PREFIXES(NotificationViewTest, FormatContextMessageTest);
FRIEND_TEST_ALL_PREFIXES(NotificationViewTest, TestLineLimits);
FRIEND_TEST_ALL_PREFIXES(NotificationViewTest, TestIconSizing);
FRIEND_TEST_ALL_PREFIXES(NotificationViewTest, TestImageSizing);
@@ -99,6 +102,12 @@ class MESSAGE_CENTER_EXPORT NotificationView
int GetMessageLineLimit(int title_lines, int width) const;
int GetMessageHeight(int width, int limit) const;
+ // Formats the context message to be displayed based on |context|
+ // so it shows as much information as possible
+ // given the space available in the ContextMessage section of the
+ // notification.
+ base::string16 FormatContextMessage(const Notification& notification) const;
+
MessageCenterController* controller_; // Weak, lives longer then views.
// Describes whether the view should display a hand pointer or not.
« no previous file with comments | « ui/message_center/views/message_popup_collection_unittest.cc ('k') | ui/message_center/views/notification_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698