| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 return *networkStateNotifier; | 39 return *networkStateNotifier; |
| 40 } | 40 } |
| 41 | 41 |
| 42 void NetworkStateNotifier::setNetworkStateChangedFunction(void(*function)()) | 42 void NetworkStateNotifier::setNetworkStateChangedFunction(void(*function)()) |
| 43 { | 43 { |
| 44 ASSERT(!m_networkStateChangedFunction); | 44 ASSERT(!m_networkStateChangedFunction); |
| 45 | 45 |
| 46 m_networkStateChangedFunction = function; | 46 m_networkStateChangedFunction = function; |
| 47 } | 47 } |
| 48 | 48 |
| 49 #if PLATFORM(CHROMIUM) | |
| 50 void NetworkStateNotifier::setOnLine(bool onLine) | 49 void NetworkStateNotifier::setOnLine(bool onLine) |
| 51 { | 50 { |
| 52 if (m_isOnLine == onLine) | 51 if (m_isOnLine == onLine) |
| 53 return; | 52 return; |
| 54 | 53 |
| 55 m_isOnLine = onLine; | 54 m_isOnLine = onLine; |
| 56 | 55 |
| 57 if (m_networkStateChangedFunction) | 56 if (m_networkStateChangedFunction) |
| 58 m_networkStateChangedFunction(); | 57 m_networkStateChangedFunction(); |
| 59 } | 58 } |
| 60 #endif // PLATFORM(CHROMIUM) | |
| 61 | 59 |
| 62 } | 60 } |
| OLD | NEW |