Chromium Code Reviews| Index: chrome/browser/jumplist_listener.h |
| diff --git a/chrome/browser/jumplist_listener.h b/chrome/browser/jumplist_listener.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..7541db91b8f9bbb0f76eded62ac45923c5d5fe00 |
| --- /dev/null |
| +++ b/chrome/browser/jumplist_listener.h |
| @@ -0,0 +1,44 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_JUMPLIST_LISTENER_H_ |
| +#define CHROME_BROWSER_JUMPLIST_LISTENER_H_ |
| + |
| +#include "base/memory/ref_counted.h" |
| +#include "base/memory/weak_ptr.h" |
| +#include "content/public/browser/browser_thread.h" |
| +#include "content/public/browser/notification_observer.h" |
| + |
| +class JumpList; |
| +class Profile; |
| + |
| +namespace content { |
| +class NotificationSource; |
| +class NotificationRegistrar; |
| +class NotificationDetails; |
| +} |
| + |
| +class JumpListListener : public content::NotificationObserver { |
|
sky
2012/12/18 20:52:38
Add description.
sky
2012/12/18 20:52:38
Since this is only used by UI code, I would move i
Cait (Slow)
2012/12/19 19:27:01
Done.
Cait (Slow)
2012/12/19 19:27:01
Done.
|
| + public: |
| + explicit JumpListListener(base::Closure callback); |
|
sky
2012/12/18 20:52:38
const Closure& ?
Cait (Slow)
2012/12/19 19:27:01
Switched to delegate, rather than callback.
|
| + ~JumpListListener(); |
|
sky
2012/12/18 20:52:38
virtual
Cait (Slow)
2012/12/19 19:27:01
Done.
|
| + |
| + // NotificationObserver implementation. |
| + virtual void Observe(int type, |
| + const content::NotificationSource& source, |
| + const content::NotificationDetails& details); |
|
sky
2012/12/18 20:52:38
OVERRIDE
Cait (Slow)
2012/12/19 19:27:01
Done.
|
| + |
| + private: |
| + scoped_ptr<content::NotificationRegistrar> registrar_; |
|
sky
2012/12/18 20:52:38
Why the scoped_ptr?
Cait (Slow)
2012/12/19 19:27:01
Done.
|
| + |
| + // Callback to be called after the first pageload has completed. |
| + base::Closure callback_; |
| + |
| + // Flag denoting that the callback has been completed. |
| + bool called_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(JumpListListener); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_JUMPLIST_LISTENER_H_ |