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

Side by Side Diff: Source/core/page/DOMWindow.cpp

Issue 15901021: Move window.crypto to modules/crypto (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix compile error in debug mode Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/page/DOMWindow.h ('k') | Source/core/page/DOMWindow.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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 #include "core/inspector/ScriptCallStack.h" 63 #include "core/inspector/ScriptCallStack.h"
64 #include "core/loader/DocumentLoader.h" 64 #include "core/loader/DocumentLoader.h"
65 #include "core/loader/FrameLoadRequest.h" 65 #include "core/loader/FrameLoadRequest.h"
66 #include "core/loader/FrameLoader.h" 66 #include "core/loader/FrameLoader.h"
67 #include "core/loader/FrameLoaderClient.h" 67 #include "core/loader/FrameLoaderClient.h"
68 #include "core/loader/appcache/DOMApplicationCache.h" 68 #include "core/loader/appcache/DOMApplicationCache.h"
69 #include "core/page/BarProp.h" 69 #include "core/page/BarProp.h"
70 #include "core/page/Chrome.h" 70 #include "core/page/Chrome.h"
71 #include "core/page/ChromeClient.h" 71 #include "core/page/ChromeClient.h"
72 #include "core/page/Console.h" 72 #include "core/page/Console.h"
73 #include "core/page/Crypto.h"
74 #include "core/page/DOMPoint.h" 73 #include "core/page/DOMPoint.h"
75 #include "core/page/DOMTimer.h" 74 #include "core/page/DOMTimer.h"
76 #include "core/page/EventHandler.h" 75 #include "core/page/EventHandler.h"
77 #include "core/page/FocusController.h" 76 #include "core/page/FocusController.h"
78 #include "core/page/Frame.h" 77 #include "core/page/Frame.h"
79 #include "core/page/FrameTree.h" 78 #include "core/page/FrameTree.h"
80 #include "core/page/FrameView.h" 79 #include "core/page/FrameView.h"
81 #include "core/page/History.h" 80 #include "core/page/History.h"
82 #include "core/page/Location.h" 81 #include "core/page/Location.h"
83 #include "core/page/Navigator.h" 82 #include "core/page/Navigator.h"
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 m_frame->page()->mainFrame()->notifyChromeClientWheelEventHandlerCountCh anged(); 432 m_frame->page()->mainFrame()->notifyChromeClientWheelEventHandlerCountCh anged();
434 if (m_document && m_document->hasTouchEventHandlers()) 433 if (m_document && m_document->hasTouchEventHandlers())
435 m_frame->page()->chrome().client()->needTouchEvents(true); 434 m_frame->page()->chrome().client()->needTouchEvents(true);
436 } 435 }
437 } 436 }
438 437
439 DOMWindow::~DOMWindow() 438 DOMWindow::~DOMWindow()
440 { 439 {
441 ASSERT(!m_screen); 440 ASSERT(!m_screen);
442 ASSERT(!m_history); 441 ASSERT(!m_history);
443 ASSERT(!m_crypto);
444 ASSERT(!m_locationbar); 442 ASSERT(!m_locationbar);
445 ASSERT(!m_menubar); 443 ASSERT(!m_menubar);
446 ASSERT(!m_personalbar); 444 ASSERT(!m_personalbar);
447 ASSERT(!m_scrollbars); 445 ASSERT(!m_scrollbars);
448 ASSERT(!m_statusbar); 446 ASSERT(!m_statusbar);
449 ASSERT(!m_toolbar); 447 ASSERT(!m_toolbar);
450 ASSERT(!m_console); 448 ASSERT(!m_console);
451 ASSERT(!m_navigator); 449 ASSERT(!m_navigator);
452 ASSERT(!m_performance); 450 ASSERT(!m_performance);
453 ASSERT(!m_location); 451 ASSERT(!m_location);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 willDestroyDocumentInFrame(); 533 willDestroyDocumentInFrame();
536 resetDOMWindowProperties(); 534 resetDOMWindowProperties();
537 } 535 }
538 536
539 void DOMWindow::resetDOMWindowProperties() 537 void DOMWindow::resetDOMWindowProperties()
540 { 538 {
541 m_properties.clear(); 539 m_properties.clear();
542 540
543 m_screen = 0; 541 m_screen = 0;
544 m_history = 0; 542 m_history = 0;
545 m_crypto = 0;
546 m_locationbar = 0; 543 m_locationbar = 0;
547 m_menubar = 0; 544 m_menubar = 0;
548 m_personalbar = 0; 545 m_personalbar = 0;
549 m_scrollbars = 0; 546 m_scrollbars = 0;
550 m_statusbar = 0; 547 m_statusbar = 0;
551 m_toolbar = 0; 548 m_toolbar = 0;
552 m_console = 0; 549 m_console = 0;
553 m_navigator = 0; 550 m_navigator = 0;
554 m_performance = 0; 551 m_performance = 0;
555 m_location = 0; 552 m_location = 0;
(...skipping 29 matching lines...) Expand all
585 582
586 History* DOMWindow::history() const 583 History* DOMWindow::history() const
587 { 584 {
588 if (!isCurrentlyDisplayedInFrame()) 585 if (!isCurrentlyDisplayedInFrame())
589 return 0; 586 return 0;
590 if (!m_history) 587 if (!m_history)
591 m_history = History::create(m_frame); 588 m_history = History::create(m_frame);
592 return m_history.get(); 589 return m_history.get();
593 } 590 }
594 591
595 Crypto* DOMWindow::crypto() const
596 {
597 if (!isCurrentlyDisplayedInFrame())
598 return 0;
599 if (!m_crypto)
600 m_crypto = Crypto::create();
601 return m_crypto.get();
602 }
603
604 BarProp* DOMWindow::locationbar() const 592 BarProp* DOMWindow::locationbar() const
605 { 593 {
606 if (!isCurrentlyDisplayedInFrame()) 594 if (!isCurrentlyDisplayedInFrame())
607 return 0; 595 return 0;
608 if (!m_locationbar) 596 if (!m_locationbar)
609 m_locationbar = BarProp::create(m_frame, BarProp::Locationbar); 597 m_locationbar = BarProp::create(m_frame, BarProp::Locationbar);
610 return m_locationbar.get(); 598 return m_locationbar.get();
611 } 599 }
612 600
613 BarProp* DOMWindow::menubar() const 601 BarProp* DOMWindow::menubar() const
(...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after
1909 1897
1910 Frame* child = frame->tree()->scopedChild(index); 1898 Frame* child = frame->tree()->scopedChild(index);
1911 if (child) 1899 if (child)
1912 return child->document()->domWindow(); 1900 return child->document()->domWindow();
1913 1901
1914 return 0; 1902 return 0;
1915 } 1903 }
1916 1904
1917 1905
1918 } // namespace WebCore 1906 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/DOMWindow.h ('k') | Source/core/page/DOMWindow.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698