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

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

Issue 1859293002: [DevTools] Move Console to v8_inspector (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 8 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) 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 30 matching lines...) Expand all
41 #include "core/dom/SandboxFlags.h" 41 #include "core/dom/SandboxFlags.h"
42 #include "core/dom/custom/CustomElementsRegistry.h" 42 #include "core/dom/custom/CustomElementsRegistry.h"
43 #include "core/editing/Editor.h" 43 #include "core/editing/Editor.h"
44 #include "core/events/DOMWindowEventQueue.h" 44 #include "core/events/DOMWindowEventQueue.h"
45 #include "core/events/HashChangeEvent.h" 45 #include "core/events/HashChangeEvent.h"
46 #include "core/events/MessageEvent.h" 46 #include "core/events/MessageEvent.h"
47 #include "core/events/PageTransitionEvent.h" 47 #include "core/events/PageTransitionEvent.h"
48 #include "core/events/PopStateEvent.h" 48 #include "core/events/PopStateEvent.h"
49 #include "core/events/ScopedEventQueue.h" 49 #include "core/events/ScopedEventQueue.h"
50 #include "core/frame/BarProp.h" 50 #include "core/frame/BarProp.h"
51 #include "core/frame/Console.h"
52 #include "core/frame/EventHandlerRegistry.h" 51 #include "core/frame/EventHandlerRegistry.h"
53 #include "core/frame/FrameConsole.h" 52 #include "core/frame/FrameConsole.h"
54 #include "core/frame/FrameView.h" 53 #include "core/frame/FrameView.h"
55 #include "core/frame/History.h" 54 #include "core/frame/History.h"
56 #include "core/frame/Navigator.h" 55 #include "core/frame/Navigator.h"
57 #include "core/frame/Screen.h" 56 #include "core/frame/Screen.h"
58 #include "core/frame/ScrollToOptions.h" 57 #include "core/frame/ScrollToOptions.h"
59 #include "core/frame/Settings.h" 58 #include "core/frame/Settings.h"
60 #include "core/frame/SuspendableTimer.h" 59 #include "core/frame/SuspendableTimer.h"
61 #include "core/html/HTMLFrameOwnerElement.h" 60 #include "core/html/HTMLFrameOwnerElement.h"
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 m_frameObserver->contextDestroyed(); 523 m_frameObserver->contextDestroyed();
525 524
526 m_screen = nullptr; 525 m_screen = nullptr;
527 m_history = nullptr; 526 m_history = nullptr;
528 m_locationbar = nullptr; 527 m_locationbar = nullptr;
529 m_menubar = nullptr; 528 m_menubar = nullptr;
530 m_personalbar = nullptr; 529 m_personalbar = nullptr;
531 m_scrollbars = nullptr; 530 m_scrollbars = nullptr;
532 m_statusbar = nullptr; 531 m_statusbar = nullptr;
533 m_toolbar = nullptr; 532 m_toolbar = nullptr;
534 m_console = nullptr;
535 m_navigator = nullptr; 533 m_navigator = nullptr;
536 m_media = nullptr; 534 m_media = nullptr;
537 m_customElements = nullptr; 535 m_customElements = nullptr;
538 m_applicationCache = nullptr; 536 m_applicationCache = nullptr;
539 #if ENABLE(ASSERT) 537 #if ENABLE(ASSERT)
540 m_hasBeenReset = true; 538 m_hasBeenReset = true;
541 #endif 539 #endif
542 540
543 LocalDOMWindow::notifyContextDestroyed(); 541 LocalDOMWindow::notifyContextDestroyed();
544 } 542 }
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 return m_statusbar.get(); 625 return m_statusbar.get();
628 } 626 }
629 627
630 BarProp* LocalDOMWindow::toolbar() const 628 BarProp* LocalDOMWindow::toolbar() const
631 { 629 {
632 if (!m_toolbar) 630 if (!m_toolbar)
633 m_toolbar = BarProp::create(frame(), BarProp::Toolbar); 631 m_toolbar = BarProp::create(frame(), BarProp::Toolbar);
634 return m_toolbar.get(); 632 return m_toolbar.get();
635 } 633 }
636 634
637 Console* LocalDOMWindow::console() const
638 {
639 if (!m_console)
640 m_console = Console::create(frame());
641 return m_console.get();
642 }
643
644 FrameConsole* LocalDOMWindow::frameConsole() const 635 FrameConsole* LocalDOMWindow::frameConsole() const
645 { 636 {
646 if (!isCurrentlyDisplayedInFrame()) 637 if (!isCurrentlyDisplayedInFrame())
647 return nullptr; 638 return nullptr;
648 return &frame()->console(); 639 return &frame()->console();
649 } 640 }
650 641
651 ApplicationCache* LocalDOMWindow::applicationCache() const 642 ApplicationCache* LocalDOMWindow::applicationCache() const
652 { 643 {
653 if (!isCurrentlyDisplayedInFrame()) 644 if (!isCurrentlyDisplayedInFrame())
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after
1484 visitor->trace(m_document); 1475 visitor->trace(m_document);
1485 visitor->trace(m_properties); 1476 visitor->trace(m_properties);
1486 visitor->trace(m_screen); 1477 visitor->trace(m_screen);
1487 visitor->trace(m_history); 1478 visitor->trace(m_history);
1488 visitor->trace(m_locationbar); 1479 visitor->trace(m_locationbar);
1489 visitor->trace(m_menubar); 1480 visitor->trace(m_menubar);
1490 visitor->trace(m_personalbar); 1481 visitor->trace(m_personalbar);
1491 visitor->trace(m_scrollbars); 1482 visitor->trace(m_scrollbars);
1492 visitor->trace(m_statusbar); 1483 visitor->trace(m_statusbar);
1493 visitor->trace(m_toolbar); 1484 visitor->trace(m_toolbar);
1494 visitor->trace(m_console);
1495 visitor->trace(m_navigator); 1485 visitor->trace(m_navigator);
1496 visitor->trace(m_media); 1486 visitor->trace(m_media);
1497 visitor->trace(m_customElements); 1487 visitor->trace(m_customElements);
1498 visitor->trace(m_applicationCache); 1488 visitor->trace(m_applicationCache);
1499 visitor->trace(m_eventQueue); 1489 visitor->trace(m_eventQueue);
1500 visitor->trace(m_postMessageTimers); 1490 visitor->trace(m_postMessageTimers);
1501 DOMWindow::trace(visitor); 1491 DOMWindow::trace(visitor);
1502 Supplementable<LocalDOMWindow>::trace(visitor); 1492 Supplementable<LocalDOMWindow>::trace(visitor);
1503 DOMWindowLifecycleNotifier::trace(visitor); 1493 DOMWindowLifecycleNotifier::trace(visitor);
1504 } 1494 }
1505 1495
1506 LocalFrame* LocalDOMWindow::frame() const 1496 LocalFrame* LocalDOMWindow::frame() const
1507 { 1497 {
1508 // If the LocalDOMWindow still has a frame reference, that frame must point 1498 // If the LocalDOMWindow still has a frame reference, that frame must point
1509 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation 1499 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation
1510 // where script execution leaks between different LocalDOMWindows. 1500 // where script execution leaks between different LocalDOMWindows.
1511 if (m_frameObserver->frame()) 1501 if (m_frameObserver->frame())
1512 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() = = this); 1502 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() = = this);
1513 return m_frameObserver->frame(); 1503 return m_frameObserver->frame();
1514 } 1504 }
1515 1505
1516 } // namespace blink 1506 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalDOMWindow.h ('k') | third_party/WebKit/Source/core/frame/RemoteDOMWindow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698