Enable getting window from routing id and process id.

This commit is contained in:
Cheng Zhao 2013-04-30 20:32:23 +08:00
parent de94e4f37e
commit 74c519ac3f
2 changed files with 31 additions and 0 deletions

View file

@ -6,6 +6,7 @@
#define ATOM_BROWSER_NATIVE_WINDOW_H_
#include <iosfwd>
#include <vector>
#include "base/basictypes.h"
#include "base/compiler_specific.h"
@ -52,6 +53,10 @@ class NativeWindow : public content::WebContentsDelegate,
// Create window with new WebContents.
static NativeWindow* Create(base::DictionaryValue* options);
// Find a window from its process id and routing id.
static NativeWindow* FromProcessIDAndRoutingID(int process_id,
int routing_id);
void InitFromOptions(base::DictionaryValue* options);
virtual void Close() = 0;
@ -133,6 +138,9 @@ class NativeWindow : public content::WebContentsDelegate,
// Observers of this window.
ObserverList<NativeWindowObserver> observers_;
// Stores all windows.
static std::vector<NativeWindow*> windows_;
scoped_ptr<brightray::InspectableWebContents> inspectable_web_contents_;
DISALLOW_COPY_AND_ASSIGN(NativeWindow);