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

Side by Side Diff: sky/engine/web/WebViewImpl.cpp

Issue 690433004: Add inspect command to skydb (Closed) Base URL: git@github.com:domokit/mojo.git@master
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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "core/editing/InputMethodController.h" 43 #include "core/editing/InputMethodController.h"
44 #include "core/editing/TextIterator.h" 44 #include "core/editing/TextIterator.h"
45 #include "core/editing/markup.h" 45 #include "core/editing/markup.h"
46 #include "core/events/KeyboardEvent.h" 46 #include "core/events/KeyboardEvent.h"
47 #include "core/events/WheelEvent.h" 47 #include "core/events/WheelEvent.h"
48 #include "core/frame/EventHandlerRegistry.h" 48 #include "core/frame/EventHandlerRegistry.h"
49 #include "core/frame/FrameHost.h" 49 #include "core/frame/FrameHost.h"
50 #include "core/frame/FrameView.h" 50 #include "core/frame/FrameView.h"
51 #include "core/frame/LocalFrame.h" 51 #include "core/frame/LocalFrame.h"
52 #include "core/frame/Settings.h" 52 #include "core/frame/Settings.h"
53 #include "core/html/HTMLLinkElement.h"
53 #include "core/html/HTMLMediaElement.h" 54 #include "core/html/HTMLMediaElement.h"
54 #include "core/html/ime/InputMethodContext.h" 55 #include "core/html/ime/InputMethodContext.h"
55 #include "core/loader/FrameLoader.h" 56 #include "core/loader/FrameLoader.h"
56 #include "core/loader/UniqueIdentifier.h" 57 #include "core/loader/UniqueIdentifier.h"
57 #include "core/page/Chrome.h" 58 #include "core/page/Chrome.h"
58 #include "core/page/EventHandler.h" 59 #include "core/page/EventHandler.h"
59 #include "core/page/EventWithHitTestResults.h" 60 #include "core/page/EventWithHitTestResults.h"
60 #include "core/page/FocusController.h" 61 #include "core/page/FocusController.h"
61 #include "core/page/Page.h" 62 #include "core/page/Page.h"
62 #include "core/page/TouchDisambiguation.h" 63 #include "core/page/TouchDisambiguation.h"
(...skipping 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after
1652 WebFrame* WebViewImpl::mainFrame() 1653 WebFrame* WebViewImpl::mainFrame()
1653 { 1654 {
1654 return WebFrame::fromFrame(m_page ? m_page->mainFrame() : 0); 1655 return WebFrame::fromFrame(m_page ? m_page->mainFrame() : 0);
1655 } 1656 }
1656 1657
1657 WebFrame* WebViewImpl::focusedFrame() 1658 WebFrame* WebViewImpl::focusedFrame()
1658 { 1659 {
1659 return WebFrame::fromFrame(focusedCoreFrame()); 1660 return WebFrame::fromFrame(focusedCoreFrame());
1660 } 1661 }
1661 1662
1663 void WebViewImpl::injectModule(const WebString& name)
eseidel 2014/10/29 00:05:56 relativeURL?
1664 {
1665 RefPtr<Document> document = m_page->mainFrame()->document();
1666 RefPtr<HTMLLinkElement> link = HTMLLinkElement::create(*document, false);
1667 link->setAttribute(HTMLNames::relAttr, "import");
1668 link->setAttribute(HTMLNames::hrefAttr, name);
1669 if (!document->documentElement())
1670 return;
1671 document->documentElement()->appendChild(link.release());
1672 }
1673
1662 void WebViewImpl::setFocusedFrame(WebFrame* frame) 1674 void WebViewImpl::setFocusedFrame(WebFrame* frame)
1663 { 1675 {
1664 if (!frame) { 1676 if (!frame) {
1665 // Clears the focused frame if any. 1677 // Clears the focused frame if any.
1666 LocalFrame* focusedFrame = focusedCoreFrame(); 1678 LocalFrame* focusedFrame = focusedCoreFrame();
1667 if (focusedFrame) 1679 if (focusedFrame)
1668 focusedFrame->selection().setFocused(false); 1680 focusedFrame->selection().setFocused(false);
1669 return; 1681 return;
1670 } 1682 }
1671 LocalFrame* coreFrame = toWebLocalFrameImpl(frame)->frame(); 1683 LocalFrame* coreFrame = toWebLocalFrameImpl(frame)->frame();
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
2428 m_layerTreeView->setVisible(visible); 2440 m_layerTreeView->setVisible(visible);
2429 } 2441 }
2430 } 2442 }
2431 2443
2432 bool WebViewImpl::shouldDisableDesktopWorkarounds() 2444 bool WebViewImpl::shouldDisableDesktopWorkarounds()
2433 { 2445 {
2434 return true; 2446 return true;
2435 } 2447 }
2436 2448
2437 } // namespace blink 2449 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698