Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/WindowProxy.h

Issue 2702273004: bindings: Simplifies WindowProxyManager and its relation to Frame. (Closed)
Patch Set: Addressed review comments. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // persist between navigations. 47 // persist between navigations.
48 class WindowProxy : public GarbageCollectedFinalized<WindowProxy> { 48 class WindowProxy : public GarbageCollectedFinalized<WindowProxy> {
49 public: 49 public:
50 virtual ~WindowProxy(); 50 virtual ~WindowProxy();
51 51
52 DECLARE_TRACE(); 52 DECLARE_TRACE();
53 53
54 v8::Local<v8::Context> contextIfInitialized() const { 54 v8::Local<v8::Context> contextIfInitialized() const {
55 return m_scriptState ? m_scriptState->context() : v8::Local<v8::Context>(); 55 return m_scriptState ? m_scriptState->context() : v8::Local<v8::Context>();
56 } 56 }
57 bool isInitialized() const {
58 return m_lifecycle == Lifecycle::ContextInitialized;
59 }
57 void initializeIfNeeded(); 60 void initializeIfNeeded();
58 61
59 void clearForClose(); 62 void clearForClose();
60 void clearForNavigation(); 63 void clearForNavigation();
61 64
62 v8::Local<v8::Object> globalIfNotDetached(); 65 v8::Local<v8::Object> globalIfNotDetached();
63 v8::Local<v8::Object> releaseGlobal(); 66 v8::Local<v8::Object> releaseGlobal();
64 void setGlobal(v8::Local<v8::Object>); 67 void setGlobal(v8::Local<v8::Object>);
65 68
66 // TODO(dcheng): Temporarily exposed to avoid include cycles. Remove the need 69 // TODO(dcheng): Temporarily exposed to avoid include cycles. Remove the need
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 RefPtr<ScriptState> m_scriptState; 108 RefPtr<ScriptState> m_scriptState;
106 // TODO(dcheng): Consider making these private and using getters. 109 // TODO(dcheng): Consider making these private and using getters.
107 const RefPtr<DOMWrapperWorld> m_world; 110 const RefPtr<DOMWrapperWorld> m_world;
108 ScopedPersistent<v8::Object> m_globalProxy; 111 ScopedPersistent<v8::Object> m_globalProxy;
109 Lifecycle m_lifecycle; 112 Lifecycle m_lifecycle;
110 }; 113 };
111 114
112 } // namespace blink 115 } // namespace blink
113 116
114 #endif // WindowProxy_h 117 #endif // WindowProxy_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698