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

Side by Side Diff: sky/engine/core/frame/LocalDOMWindow.cpp

Issue 1028243003: Let Dart code running in Sky add events to the trace timeline (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: more Created 5 years, 9 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 | « sky/engine/core/frame/LocalDOMWindow.h ('k') | sky/engine/core/frame/Tracing.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, 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #include "sky/engine/core/events/HashChangeEvent.h" 50 #include "sky/engine/core/events/HashChangeEvent.h"
51 #include "sky/engine/core/events/PageTransitionEvent.h" 51 #include "sky/engine/core/events/PageTransitionEvent.h"
52 #include "sky/engine/core/frame/DOMWindowLifecycleNotifier.h" 52 #include "sky/engine/core/frame/DOMWindowLifecycleNotifier.h"
53 #include "sky/engine/core/frame/FrameConsole.h" 53 #include "sky/engine/core/frame/FrameConsole.h"
54 #include "sky/engine/core/frame/FrameHost.h" 54 #include "sky/engine/core/frame/FrameHost.h"
55 #include "sky/engine/core/frame/FrameView.h" 55 #include "sky/engine/core/frame/FrameView.h"
56 #include "sky/engine/core/frame/LocalFrame.h" 56 #include "sky/engine/core/frame/LocalFrame.h"
57 #include "sky/engine/core/frame/Location.h" 57 #include "sky/engine/core/frame/Location.h"
58 #include "sky/engine/core/frame/Screen.h" 58 #include "sky/engine/core/frame/Screen.h"
59 #include "sky/engine/core/frame/Settings.h" 59 #include "sky/engine/core/frame/Settings.h"
60 #include "sky/engine/core/frame/Tracing.h"
60 #include "sky/engine/core/inspector/ConsoleMessage.h" 61 #include "sky/engine/core/inspector/ConsoleMessage.h"
61 #include "sky/engine/core/loader/FrameLoaderClient.h" 62 #include "sky/engine/core/loader/FrameLoaderClient.h"
62 #include "sky/engine/core/page/ChromeClient.h" 63 #include "sky/engine/core/page/ChromeClient.h"
63 #include "sky/engine/core/page/EventHandler.h" 64 #include "sky/engine/core/page/EventHandler.h"
64 #include "sky/engine/core/page/Page.h" 65 #include "sky/engine/core/page/Page.h"
65 #include "sky/engine/core/rendering/style/RenderStyle.h" 66 #include "sky/engine/core/rendering/style/RenderStyle.h"
66 #include "sky/engine/core/script/dart_controller.h" 67 #include "sky/engine/core/script/dart_controller.h"
67 #include "sky/engine/platform/EventDispatchForbiddenScope.h" 68 #include "sky/engine/platform/EventDispatchForbiddenScope.h"
68 #include "sky/engine/platform/PlatformScreen.h" 69 #include "sky/engine/platform/PlatformScreen.h"
69 #include "sky/engine/platform/geometry/FloatRect.h" 70 #include "sky/engine/platform/geometry/FloatRect.h"
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 return &m_frame->console(); 412 return &m_frame->console();
412 } 413 }
413 414
414 Location& LocalDOMWindow::location() const 415 Location& LocalDOMWindow::location() const
415 { 416 {
416 if (!m_location) 417 if (!m_location)
417 m_location = Location::create(m_frame); 418 m_location = Location::create(m_frame);
418 return *m_location; 419 return *m_location;
419 } 420 }
420 421
422 Tracing& LocalDOMWindow::tracing() const
423 {
424 if (!m_tracing)
425 m_tracing = Tracing::create();
426 return *m_tracing;
427 }
428
421 DOMSelection* LocalDOMWindow::getSelection() 429 DOMSelection* LocalDOMWindow::getSelection()
422 { 430 {
423 return m_frame->document()->getSelection(); 431 return m_frame->document()->getSelection();
424 } 432 }
425 433
426 void LocalDOMWindow::focus() 434 void LocalDOMWindow::focus()
427 { 435 {
428 if (!m_frame) 436 if (!m_frame)
429 return; 437 return;
430 438
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 { 727 {
720 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext<LocalDOMWin dow>::lifecycleNotifier()); 728 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext<LocalDOMWin dow>::lifecycleNotifier());
721 } 729 }
722 730
723 PassOwnPtr<LifecycleNotifier<LocalDOMWindow> > LocalDOMWindow::createLifecycleNo tifier() 731 PassOwnPtr<LifecycleNotifier<LocalDOMWindow> > LocalDOMWindow::createLifecycleNo tifier()
724 { 732 {
725 return DOMWindowLifecycleNotifier::create(this); 733 return DOMWindowLifecycleNotifier::create(this);
726 } 734 }
727 735
728 } // namespace blink 736 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/frame/LocalDOMWindow.h ('k') | sky/engine/core/frame/Tracing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698