| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 Notification::Notification(const String& title, ExecutionContext* context, Notif
icationClient* client) | 70 Notification::Notification(const String& title, ExecutionContext* context, Notif
icationClient* client) |
| 71 : ActiveDOMObject(context) | 71 : ActiveDOMObject(context) |
| 72 , m_title(title) | 72 , m_title(title) |
| 73 , m_dir("auto") | 73 , m_dir("auto") |
| 74 , m_state(NotificationStateIdle) | 74 , m_state(NotificationStateIdle) |
| 75 , m_client(client) | 75 , m_client(client) |
| 76 , m_asyncRunner(this, &Notification::show) | 76 , m_asyncRunner(this, &Notification::show) |
| 77 { | 77 { |
| 78 ASSERT(m_client); | 78 ASSERT(m_client); |
| 79 ScriptWrappable::init(this); | |
| 80 | 79 |
| 81 m_asyncRunner.runAsync(); | 80 m_asyncRunner.runAsync(); |
| 82 } | 81 } |
| 83 | 82 |
| 84 Notification::~Notification() | 83 Notification::~Notification() |
| 85 { | 84 { |
| 86 } | 85 } |
| 87 | 86 |
| 88 void Notification::show() | 87 void Notification::show() |
| 89 { | 88 { |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 | 200 |
| 202 m_asyncRunner.stop(); | 201 m_asyncRunner.stop(); |
| 203 } | 202 } |
| 204 | 203 |
| 205 bool Notification::hasPendingActivity() const | 204 bool Notification::hasPendingActivity() const |
| 206 { | 205 { |
| 207 return m_state == NotificationStateShowing || m_asyncRunner.isActive(); | 206 return m_state == NotificationStateShowing || m_asyncRunner.isActive(); |
| 208 } | 207 } |
| 209 | 208 |
| 210 } // namespace blink | 209 } // namespace blink |
| OLD | NEW |