| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_CHROMEOS_NETWORK_MESSAGE_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_NETWORK_MESSAGE_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_NETWORK_MESSAGE_OBSERVER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_NETWORK_MESSAGE_OBSERVER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/compiler_specific.h" |
| 13 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 14 #include "chrome/browser/chromeos/cros/network_library.h" | 15 #include "chrome/browser/chromeos/cros/network_library.h" |
| 15 #include "chrome/browser/chromeos/notifications/system_notification.h" | 16 #include "chrome/browser/chromeos/notifications/system_notification.h" |
| 16 | 17 |
| 17 class Profile; | 18 class Profile; |
| 18 | 19 |
| 19 namespace chromeos { | 20 namespace chromeos { |
| 20 | 21 |
| 21 // The network message observer displays a system notification for network | 22 // The network message observer displays a system notification for network |
| 22 // messages. | 23 // messages. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 34 const CellularDataPlan* other_plan); | 35 const CellularDataPlan* other_plan); |
| 35 private: | 36 private: |
| 36 virtual void OpenMobileSetupPage(const base::ListValue* args); | 37 virtual void OpenMobileSetupPage(const base::ListValue* args); |
| 37 virtual void OpenMoreInfoPage(const base::ListValue* args); | 38 virtual void OpenMoreInfoPage(const base::ListValue* args); |
| 38 virtual void InitNewPlan(const CellularDataPlan* plan); | 39 virtual void InitNewPlan(const CellularDataPlan* plan); |
| 39 virtual void ShowNeedsPlanNotification(const CellularNetwork* cellular); | 40 virtual void ShowNeedsPlanNotification(const CellularNetwork* cellular); |
| 40 virtual void ShowNoDataNotification(CellularDataPlanType plan_type); | 41 virtual void ShowNoDataNotification(CellularDataPlanType plan_type); |
| 41 virtual void ShowLowDataNotification(const CellularDataPlan* plan); | 42 virtual void ShowLowDataNotification(const CellularDataPlan* plan); |
| 42 | 43 |
| 43 // NetworkLibrary::NetworkManagerObserver implementation. | 44 // NetworkLibrary::NetworkManagerObserver implementation. |
| 44 virtual void OnNetworkManagerChanged(NetworkLibrary* obj); | 45 virtual void OnNetworkManagerChanged(NetworkLibrary* obj) OVERRIDE; |
| 45 // NetworkLibrary::CellularDataPlanObserver implementation. | 46 // NetworkLibrary::CellularDataPlanObserver implementation. |
| 46 virtual void OnCellularDataPlanChanged(NetworkLibrary* obj); | 47 virtual void OnCellularDataPlanChanged(NetworkLibrary* obj) OVERRIDE; |
| 47 // NetworkLibrary::UserActionObserver implementation. | 48 // NetworkLibrary::UserActionObserver implementation. |
| 48 virtual void OnConnectionInitiated(NetworkLibrary* obj, | 49 virtual void OnConnectionInitiated(NetworkLibrary* obj, |
| 49 const Network* network); | 50 const Network* network) OVERRIDE; |
| 50 | 51 |
| 51 // Saves the current cellular and plan information. | 52 // Saves the current cellular and plan information. |
| 52 // |plan| can be NULL. In that case, we set it to unknown. | 53 // |plan| can be NULL. In that case, we set it to unknown. |
| 53 void SaveLastCellularInfo(const CellularNetwork* cellular, | 54 void SaveLastCellularInfo(const CellularNetwork* cellular, |
| 54 const CellularDataPlan* plan); | 55 const CellularDataPlan* plan); |
| 55 | 56 |
| 56 typedef std::map<std::string, ConnectionState> NetworkStateMap; | 57 typedef std::map<std::string, ConnectionState> NetworkStateMap; |
| 57 | 58 |
| 58 // Current connect celluar service path. | 59 // Current connect celluar service path. |
| 59 std::string cellular_service_path_; | 60 std::string cellular_service_path_; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 70 SystemNotification notification_low_data_; | 71 SystemNotification notification_low_data_; |
| 71 // Notification for showing no data warning | 72 // Notification for showing no data warning |
| 72 SystemNotification notification_no_data_; | 73 SystemNotification notification_no_data_; |
| 73 | 74 |
| 74 DISALLOW_COPY_AND_ASSIGN(NetworkMessageObserver); | 75 DISALLOW_COPY_AND_ASSIGN(NetworkMessageObserver); |
| 75 }; | 76 }; |
| 76 | 77 |
| 77 } // namespace chromeos | 78 } // namespace chromeos |
| 78 | 79 |
| 79 #endif // CHROME_BROWSER_CHROMEOS_NETWORK_MESSAGE_OBSERVER_H_ | 80 #endif // CHROME_BROWSER_CHROMEOS_NETWORK_MESSAGE_OBSERVER_H_ |
| OLD | NEW |