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

Side by Side Diff: webkit/glue/webframe_impl.cc

Issue 147124: Add notifications for when V8Proxy creates or destroys a V8 Context. (Closed)
Patch Set: roll deps Created 11 years, 5 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
« no previous file with comments | « webkit/glue/webframe_impl.h ('k') | webkit/glue/webframeloaderclient_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. 3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 FrameContentAsPlainText(max_chars, frame_, text); 817 FrameContentAsPlainText(max_chars, frame_, text);
818 } 818 }
819 819
820 NPObject* WebFrameImpl::GetWindowNPObject() { 820 NPObject* WebFrameImpl::GetWindowNPObject() {
821 if (!frame_) 821 if (!frame_)
822 return NULL; 822 return NULL;
823 823
824 return frame_->script()->windowScriptNPObject(); 824 return frame_->script()->windowScriptNPObject();
825 } 825 }
826 826
827 #if USE(V8)
828 // Returns the V8 context for this frame, or an empty handle if there is
829 // none.
830 v8::Local<v8::Context> WebFrameImpl::GetScriptContext() {
831 if (!frame_)
832 return v8::Local<v8::Context>();
833
834 return frame_->script()->proxy()->GetContext();
835 }
836 #endif
837
827 void WebFrameImpl::InvalidateArea(AreaToInvalidate area) { 838 void WebFrameImpl::InvalidateArea(AreaToInvalidate area) {
828 ASSERT(frame() && frame()->view()); 839 ASSERT(frame() && frame()->view());
829 #if defined(OS_WIN) || defined(OS_LINUX) 840 #if defined(OS_WIN) || defined(OS_LINUX)
830 // TODO(pinkerton): Fix Mac invalidation to be more like Win ScrollView 841 // TODO(pinkerton): Fix Mac invalidation to be more like Win ScrollView
831 FrameView* view = frame()->view(); 842 FrameView* view = frame()->view();
832 843
833 if ((area & INVALIDATE_ALL) == INVALIDATE_ALL) { 844 if ((area & INVALIDATE_ALL) == INVALIDATE_ALL) {
834 view->invalidateRect(view->frameRect()); 845 view->invalidateRect(view->frameRect());
835 } else { 846 } else {
836 if ((area & INVALIDATE_CONTENT_AREA) == INVALIDATE_CONTENT_AREA) { 847 if ((area & INVALIDATE_CONTENT_AREA) == INVALIDATE_CONTENT_AREA) {
(...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after
1907 return password_listeners_.get(input_element); 1918 return password_listeners_.get(input_element);
1908 } 1919 }
1909 1920
1910 void WebFrameImpl::ClearPasswordListeners() { 1921 void WebFrameImpl::ClearPasswordListeners() {
1911 for (PasswordListenerMap::iterator iter = password_listeners_.begin(); 1922 for (PasswordListenerMap::iterator iter = password_listeners_.begin();
1912 iter != password_listeners_.end(); ++iter) { 1923 iter != password_listeners_.end(); ++iter) {
1913 delete iter->second; 1924 delete iter->second;
1914 } 1925 }
1915 password_listeners_.clear(); 1926 password_listeners_.clear();
1916 } 1927 }
OLDNEW
« no previous file with comments | « webkit/glue/webframe_impl.h ('k') | webkit/glue/webframeloaderclient_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698