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

Side by Side Diff: Source/core/frame/LocalDOMWindow.cpp

Issue 700803002: bindings: Window must be LocalDOMWindow by definition. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/LocalDOMWindow.h ('k') | Source/core/frame/Window.idl » ('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, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
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 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after
1289 return; 1289 return;
1290 1290
1291 FrameHost* host = frame()->host(); 1291 FrameHost* host = frame()->host();
1292 if (!host) 1292 if (!host)
1293 return; 1293 return;
1294 1294
1295 ASSERT(frame()->document()); // Client calls shouldn't be made when the fram e is in inconsistent state. 1295 ASSERT(frame()->document()); // Client calls shouldn't be made when the fram e is in inconsistent state.
1296 host->chrome().setStatusbarText(frame(), m_defaultStatus); 1296 host->chrome().setStatusbarText(frame(), m_defaultStatus);
1297 } 1297 }
1298 1298
1299 DOMWindow* LocalDOMWindow::self() const 1299 LocalDOMWindow* LocalDOMWindow::self() const
1300 { 1300 {
1301 if (!frame()) 1301 if (!frame())
1302 return 0; 1302 return 0;
1303 1303
1304 return frame()->domWindow(); 1304 return frame()->domWindow();
1305 } 1305 }
1306 1306
1307 DOMWindow* LocalDOMWindow::opener() const 1307 LocalDOMWindow* LocalDOMWindow::opener() const
1308 { 1308 {
1309 if (!frame()) 1309 if (!frame())
1310 return 0; 1310 return 0;
1311 1311
1312 Frame* opener = frame()->loader().opener(); 1312 Frame* opener = frame()->loader().opener();
1313 if (!opener) 1313 if (!opener)
1314 return 0; 1314 return 0;
1315 1315
1316 return opener->domWindow(); 1316 return opener->domWindow();
1317 } 1317 }
1318 1318
1319 DOMWindow* LocalDOMWindow::parent() const 1319 LocalDOMWindow* LocalDOMWindow::parent() const
1320 { 1320 {
1321 if (!frame()) 1321 if (!frame())
1322 return 0; 1322 return 0;
1323 1323
1324 Frame* parent = frame()->tree().parent(); 1324 Frame* parent = frame()->tree().parent();
1325 if (parent) 1325 if (parent)
1326 return parent->domWindow(); 1326 return parent->domWindow();
1327 1327
1328 return frame()->domWindow(); 1328 return frame()->domWindow();
1329 } 1329 }
1330 1330
1331 DOMWindow* LocalDOMWindow::top() const 1331 LocalDOMWindow* LocalDOMWindow::top() const
1332 { 1332 {
1333 if (!frame()) 1333 if (!frame())
1334 return 0; 1334 return 0;
1335 1335
1336 return frame()->tree().top()->domWindow(); 1336 return frame()->tree().top()->domWindow();
1337 } 1337 }
1338 1338
1339 Document* LocalDOMWindow::document() const 1339 Document* LocalDOMWindow::document() const
1340 { 1340 {
1341 return m_document.get(); 1341 return m_document.get();
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
1958 return m_frameObserver->frame(); 1958 return m_frameObserver->frame();
1959 } 1959 }
1960 1960
1961 v8::Handle<v8::Object> LocalDOMWindow::wrap(v8::Handle<v8::Object> creationConte xt, v8::Isolate* isolate) 1961 v8::Handle<v8::Object> LocalDOMWindow::wrap(v8::Handle<v8::Object> creationConte xt, v8::Isolate* isolate)
1962 { 1962 {
1963 ASSERT_NOT_REACHED(); // LocalDOMWindow has [Custom=ToV8]. 1963 ASSERT_NOT_REACHED(); // LocalDOMWindow has [Custom=ToV8].
1964 return v8::Handle<v8::Object>(); 1964 return v8::Handle<v8::Object>();
1965 } 1965 }
1966 1966
1967 } // namespace blink 1967 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/LocalDOMWindow.h ('k') | Source/core/frame/Window.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698