| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
| 3 * 1999-2001 Lars Knoll <knoll@kde.org> | 3 * 1999-2001 Lars Knoll <knoll@kde.org> |
| 4 * 1999-2001 Antti Koivisto <koivisto@kde.org> | 4 * 1999-2001 Antti Koivisto <koivisto@kde.org> |
| 5 * 2000-2001 Simon Hausmann <hausmann@kde.org> | 5 * 2000-2001 Simon Hausmann <hausmann@kde.org> |
| 6 * 2000-2001 Dirk Mueller <mueller@kde.org> | 6 * 2000-2001 Dirk Mueller <mueller@kde.org> |
| 7 * 2000 Stefan Schimanski <1Stein@gmx.de> | 7 * 2000 Stefan Schimanski <1Stein@gmx.de> |
| 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. | 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights |
| 9 * reserved. |
| 9 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 10 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 11 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
| 11 * | 12 * |
| 12 * This library is free software; you can redistribute it and/or | 13 * This library is free software; you can redistribute it and/or |
| 13 * modify it under the terms of the GNU Library General Public | 14 * modify it under the terms of the GNU Library General Public |
| 14 * License as published by the Free Software Foundation; either | 15 * License as published by the Free Software Foundation; either |
| 15 * version 2 of the License, or (at your option) any later version. | 16 * version 2 of the License, or (at your option) any later version. |
| 16 * | 17 * |
| 17 * This library is distributed in the hope that it will be useful, | 18 * This library is distributed in the hope that it will be useful, |
| 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 19 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 122 |
| 122 void detachChildren(); | 123 void detachChildren(); |
| 123 | 124 |
| 124 LocalDOMWindow* localDOMWindow() const; | 125 LocalDOMWindow* localDOMWindow() const; |
| 125 void setDOMWindow(LocalDOMWindow*); | 126 void setDOMWindow(LocalDOMWindow*); |
| 126 FrameView* view() const; | 127 FrameView* view() const; |
| 127 Document* document() const; | 128 Document* document() const; |
| 128 void setPagePopupOwner(Element&); | 129 void setPagePopupOwner(Element&); |
| 129 Element* pagePopupOwner() const { return m_pagePopupOwner.get(); } | 130 Element* pagePopupOwner() const { return m_pagePopupOwner.get(); } |
| 130 | 131 |
| 131 LayoutView* contentLayoutObject() | 132 // Root of the layout tree for the document contained in this frame. |
| 132 const; // Root of the layout tree for the document contained in this fram
e. | 133 LayoutView* contentLayoutObject() const; |
| 133 LayoutViewItem contentLayoutItem() const; | 134 LayoutViewItem contentLayoutItem() const; |
| 134 | 135 |
| 135 Editor& editor() const; | 136 Editor& editor() const; |
| 136 EventHandler& eventHandler() const; | 137 EventHandler& eventHandler() const; |
| 137 FrameLoader& loader() const; | 138 FrameLoader& loader() const; |
| 138 NavigationScheduler& navigationScheduler() const; | 139 NavigationScheduler& navigationScheduler() const; |
| 139 FrameSelection& selection() const; | 140 FrameSelection& selection() const; |
| 140 InputMethodController& inputMethodController() const; | 141 InputMethodController& inputMethodController() const; |
| 141 ScriptController& script() const; | 142 ScriptController& script() const; |
| 142 SpellChecker& spellChecker() const; | 143 SpellChecker& spellChecker() const; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 153 // change. | 154 // change. |
| 154 // In addition, this function will always return true for a detached frame. | 155 // In addition, this function will always return true for a detached frame. |
| 155 // TODO(dcheng): Move this to LocalDOMWindow and figure out the right | 156 // TODO(dcheng): Move this to LocalDOMWindow and figure out the right |
| 156 // behavior for detached windows. | 157 // behavior for detached windows. |
| 157 bool isCrossOriginSubframe() const; | 158 bool isCrossOriginSubframe() const; |
| 158 | 159 |
| 159 InstrumentingAgents* instrumentingAgents() { | 160 InstrumentingAgents* instrumentingAgents() { |
| 160 return m_instrumentingAgents.get(); | 161 return m_instrumentingAgents.get(); |
| 161 } | 162 } |
| 162 | 163 |
| 163 // ======== All public functions below this point are candidates to move out o
f LocalFrame into another class. ======== | 164 // ========================================================================= |
| 165 // All public functions below this point are candidates to move out of |
| 166 // LocalFrame into another class. |
| 164 | 167 |
| 165 // See GraphicsLayerClient.h for accepted flags. | 168 // See GraphicsLayerClient.h for accepted flags. |
| 166 String layerTreeAsText(unsigned flags = 0) const; | 169 String layerTreeAsText(unsigned flags = 0) const; |
| 167 | 170 |
| 168 void setPrinting(bool printing, | 171 void setPrinting(bool printing, |
| 169 const FloatSize& pageSize, | 172 const FloatSize& pageSize, |
| 170 const FloatSize& originalPageSize, | 173 const FloatSize& originalPageSize, |
| 171 float maximumShrinkRatio); | 174 float maximumShrinkRatio); |
| 172 bool shouldUsePrintingLayout() const; | 175 bool shouldUsePrintingLayout() const; |
| 173 FloatSize resizePageRectsKeepingRatio(const FloatSize& originalSize, | 176 FloatSize resizePageRectsKeepingRatio(const FloatSize& originalSize, |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 // of LocalFrame. Sample usage: | 346 // of LocalFrame. Sample usage: |
| 344 // | 347 // |
| 345 // void foo(LocalFrame* frame) | 348 // void foo(LocalFrame* frame) |
| 346 // { | 349 // { |
| 347 // ScopedFrameBlamer frameBlamer(frame); | 350 // ScopedFrameBlamer frameBlamer(frame); |
| 348 // TRACE_EVENT0("blink", "foo"); | 351 // TRACE_EVENT0("blink", "foo"); |
| 349 // // Do some real work... | 352 // // Do some real work... |
| 350 // } | 353 // } |
| 351 // | 354 // |
| 352 // In Trace Viewer, we can find the cost of slice |foo| attributed to |frame|. | 355 // In Trace Viewer, we can find the cost of slice |foo| attributed to |frame|. |
| 353 // Design doc: https://docs.google.com/document/d/15BB-suCb9j-nFt55yCFJBJCGzLg2q
Um3WaSOPb8APtI/edit?usp=sharing | 356 // Design doc: |
| 357 // https://docs.google.com/document/d/15BB-suCb9j-nFt55yCFJBJCGzLg2qUm3WaSOPb8AP
tI/edit?usp=sharing |
| 354 class ScopedFrameBlamer { | 358 class ScopedFrameBlamer { |
| 355 WTF_MAKE_NONCOPYABLE(ScopedFrameBlamer); | 359 WTF_MAKE_NONCOPYABLE(ScopedFrameBlamer); |
| 356 STACK_ALLOCATED(); | 360 STACK_ALLOCATED(); |
| 357 | 361 |
| 358 public: | 362 public: |
| 359 explicit ScopedFrameBlamer(LocalFrame*); | 363 explicit ScopedFrameBlamer(LocalFrame*); |
| 360 ~ScopedFrameBlamer(); | 364 ~ScopedFrameBlamer(); |
| 361 | 365 |
| 362 private: | 366 private: |
| 363 Member<LocalFrame> m_frame; | 367 Member<LocalFrame> m_frame; |
| 364 }; | 368 }; |
| 365 | 369 |
| 366 } // namespace blink | 370 } // namespace blink |
| 367 | 371 |
| 368 #endif // LocalFrame_h | 372 #endif // LocalFrame_h |
| OLD | NEW |