Emit 'page-title-updated' as javascript event for window.
This commit is contained in:
parent
1309d04ca7
commit
d3e4db7ba3
9 changed files with 82 additions and 4 deletions
|
@ -5,7 +5,9 @@
|
|||
#ifndef ATOM_BROWSER_API_ATOM_API_WINDOW_H_
|
||||
#define ATOM_BROWSER_API_ATOM_API_WINDOW_H_
|
||||
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "browser/api/atom_api_event_emitter.h"
|
||||
#include "browser/native_window_observer.h"
|
||||
|
||||
namespace base {
|
||||
class DictionaryValue;
|
||||
|
@ -17,7 +19,8 @@ class NativeWindow;
|
|||
|
||||
namespace api {
|
||||
|
||||
class Window : public EventEmitter {
|
||||
class Window : public EventEmitter,
|
||||
public NativeWindowObserver {
|
||||
public:
|
||||
virtual ~Window();
|
||||
|
||||
|
@ -29,6 +32,10 @@ class Window : public EventEmitter {
|
|||
explicit Window(v8::Handle<v8::Object> wrapper,
|
||||
base::DictionaryValue* options);
|
||||
|
||||
// Implementations of NativeWindowObserver.
|
||||
virtual void OnPageTitleUpdated(bool* prevent_default,
|
||||
const std::string& title) OVERRIDE;
|
||||
|
||||
private:
|
||||
static v8::Handle<v8::Value> New(const v8::Arguments &args);
|
||||
static v8::Handle<v8::Value> Destroy(const v8::Arguments &args);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue