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

Side by Side Diff: chrome/browser/chromeos/status/data_promo_notification.cc

Issue 10834079: views: Extract Widget observer into its own header file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chromeos/status/data_promo_notification.h" 5 #include "chrome/browser/chromeos/status/data_promo_notification.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
11 #include "chrome/browser/chromeos/cros/cros_library.h" 11 #include "chrome/browser/chromeos/cros/cros_library.h"
12 #include "chrome/browser/chromeos/cros/network_library.h" 12 #include "chrome/browser/chromeos/cros/network_library.h"
13 #include "chrome/browser/chromeos/login/helper.h" 13 #include "chrome/browser/chromeos/login/helper.h"
14 #include "chrome/browser/chromeos/login/message_bubble.h" 14 #include "chrome/browser/chromeos/login/message_bubble.h"
15 #include "chrome/browser/chromeos/login/user_manager.h" 15 #include "chrome/browser/chromeos/login/user_manager.h"
16 #include "chrome/browser/chromeos/mobile_config.h" 16 #include "chrome/browser/chromeos/mobile_config.h"
17 #include "chrome/browser/prefs/pref_service.h" 17 #include "chrome/browser/prefs/pref_service.h"
18 #include "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
19 #include "chrome/browser/profiles/profile_manager.h" 19 #include "chrome/browser/profiles/profile_manager.h"
20 #include "chrome/browser/ui/browser.h" 20 #include "chrome/browser/ui/browser.h"
21 #include "chrome/browser/ui/browser_list.h" 21 #include "chrome/browser/ui/browser_list.h"
22 #include "chrome/common/pref_names.h" 22 #include "chrome/common/pref_names.h"
23 #include "grit/generated_resources.h" 23 #include "grit/generated_resources.h"
24 #include "grit/theme_resources.h" 24 #include "grit/theme_resources.h"
25 #include "ui/base/l10n/l10n_util.h" 25 #include "ui/base/l10n/l10n_util.h"
26 #include "ui/base/resource/resource_bundle.h" 26 #include "ui/base/resource/resource_bundle.h"
27 #include "ui/views/view.h" 27 #include "ui/views/view.h"
28 #include "ui/views/widget/widget.h"
28 29
29 namespace { 30 namespace {
30 31
31 // Time in milliseconds to delay showing of promo 32 // Time in milliseconds to delay showing of promo
32 // notification when Chrome window is not on screen. 33 // notification when Chrome window is not on screen.
33 const int kPromoShowDelayMs = 10000; 34 const int kPromoShowDelayMs = 10000;
34 35
35 const int kNotificationCountPrefDefault = -1; 36 const int kNotificationCountPrefDefault = -1;
36 37
37 bool GetBooleanPref(const char* pref_name) { 38 bool GetBooleanPref(const char* pref_name) {
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 void DataPromoNotification::OnWidgetClosing(views::Widget* widget) { 232 void DataPromoNotification::OnWidgetClosing(views::Widget* widget) {
232 if (!mobile_data_bubble_ || mobile_data_bubble_->GetWidget() != widget) 233 if (!mobile_data_bubble_ || mobile_data_bubble_->GetWidget() != widget)
233 return; 234 return;
234 235
235 mobile_data_bubble_ = NULL; 236 mobile_data_bubble_ = NULL;
236 deal_info_url_.clear(); 237 deal_info_url_.clear();
237 deal_topup_url_.clear(); 238 deal_topup_url_.clear();
238 } 239 }
239 240
240 } // namespace chromeos 241 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/status/data_promo_notification.h ('k') | chrome/browser/ui/panels/panel_browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698