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

Unified Diff: ash/common/system/date/date_default_view.cc

Issue 2330403002: Do not activate system tray bubble by default (Closed)
Patch Set: Do not activate system tray bubble by default Created 4 years, 3 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
« no previous file with comments | « ash/common/system/date/date_default_view.h ('k') | ash/common/system/date/date_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/date/date_default_view.cc
diff --git a/ash/common/system/date/date_default_view.cc b/ash/common/system/date/date_default_view.cc
index e7f0f883813620f5959472d6fd14a66c6c81811c..6c03a9697c408dfdea1f6f57b14db67fc88dd2d7 100644
--- a/ash/common/system/date/date_default_view.cc
+++ b/ash/common/system/date/date_default_view.cc
@@ -9,6 +9,7 @@
#include "ash/common/session/session_state_delegate.h"
#include "ash/common/system/date/date_view.h"
#include "ash/common/system/tray/special_popup_row.h"
+#include "ash/common/system/tray/system_tray.h"
#include "ash/common/system/tray/system_tray_delegate.h"
#include "ash/common/system/tray/tray_constants.h"
#include "ash/common/system/tray/tray_popup_header_button.h"
@@ -41,15 +42,15 @@ const int kPaddingVertical = 19;
namespace ash {
-DateDefaultView::DateDefaultView(LoginStatus login)
- : help_button_(NULL),
- shutdown_button_(NULL),
- lock_button_(NULL),
- date_view_(NULL),
+DateDefaultView::DateDefaultView(SystemTrayItem* owner, LoginStatus login)
+ : help_button_(nullptr),
+ shutdown_button_(nullptr),
+ lock_button_(nullptr),
+ date_view_(nullptr),
weak_factory_(this) {
SetLayoutManager(new views::FillLayout);
- date_view_ = new tray::DateView();
+ date_view_ = new tray::DateView(owner);
date_view_->SetBorder(views::Border::CreateEmptyBorder(
kPaddingVertical, ash::kTrayPopupPaddingHorizontal, 0, 0));
SpecialPopupRow* view = new SpecialPopupRow();
@@ -166,6 +167,7 @@ void DateDefaultView::ButtonPressed(views::Button* sender,
} else {
NOTREACHED();
}
+ date_view_->CloseSystemBubble();
}
void DateDefaultView::OnShutdownPolicyChanged(bool reboot_on_shutdown) {
« no previous file with comments | « ash/common/system/date/date_default_view.h ('k') | ash/common/system/date/date_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698