OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "web/InspectorRenderingAgent.h" | 5 #include "web/InspectorRenderingAgent.h" |
6 | 6 |
7 #include "core/frame/FrameView.h" | 7 #include "core/frame/FrameView.h" |
8 #include "core/frame/Settings.h" | 8 #include "core/frame/Settings.h" |
9 #include "core/inspector/InspectorState.h" | |
10 #include "core/page/Page.h" | 9 #include "core/page/Page.h" |
11 #include "web/WebLocalFrameImpl.h" | 10 #include "web/WebLocalFrameImpl.h" |
12 #include "web/WebViewImpl.h" | 11 #include "web/WebViewImpl.h" |
13 | 12 |
14 namespace blink { | 13 namespace blink { |
15 | 14 |
16 namespace RenderingAgentState { | 15 namespace RenderingAgentState { |
17 static const char showDebugBorders[] = "showDebugBorders"; | 16 static const char showDebugBorders[] = "showDebugBorders"; |
18 static const char showFPSCounter[] = "showFPSCounter"; | 17 static const char showFPSCounter[] = "showFPSCounter"; |
19 static const char showPaintRects[] = "showPaintRects"; | 18 static const char showPaintRects[] = "showPaintRects"; |
(...skipping 12 matching lines...) Expand all Loading... |
32 } | 31 } |
33 | 32 |
34 WebViewImpl* InspectorRenderingAgent::webViewImpl() | 33 WebViewImpl* InspectorRenderingAgent::webViewImpl() |
35 { | 34 { |
36 return m_webLocalFrameImpl->viewImpl(); | 35 return m_webLocalFrameImpl->viewImpl(); |
37 } | 36 } |
38 | 37 |
39 void InspectorRenderingAgent::restore() | 38 void InspectorRenderingAgent::restore() |
40 { | 39 { |
41 ErrorString error; | 40 ErrorString error; |
42 setShowDebugBorders(&error, m_state->getBoolean(RenderingAgentState::showDeb
ugBorders)); | 41 setShowDebugBorders(&error, m_state->booleanProperty(RenderingAgentState::sh
owDebugBorders, false)); |
43 setShowFPSCounter(&error, m_state->getBoolean(RenderingAgentState::showFPSCo
unter)); | 42 setShowFPSCounter(&error, m_state->booleanProperty(RenderingAgentState::show
FPSCounter, false)); |
44 setShowPaintRects(&error, m_state->getBoolean(RenderingAgentState::showPaint
Rects)); | 43 setShowPaintRects(&error, m_state->booleanProperty(RenderingAgentState::show
PaintRects, false)); |
45 setShowScrollBottleneckRects(&error, m_state->getBoolean(RenderingAgentState
::showScrollBottleneckRects)); | 44 setShowScrollBottleneckRects(&error, m_state->booleanProperty(RenderingAgent
State::showScrollBottleneckRects, false)); |
46 } | 45 } |
47 | 46 |
48 void InspectorRenderingAgent::disable(ErrorString*) | 47 void InspectorRenderingAgent::disable(ErrorString*) |
49 { | 48 { |
50 ErrorString error; | 49 ErrorString error; |
51 setShowDebugBorders(&error, false); | 50 setShowDebugBorders(&error, false); |
52 setShowFPSCounter(&error, false); | 51 setShowFPSCounter(&error, false); |
53 setShowPaintRects(&error, false); | 52 setShowPaintRects(&error, false); |
54 setShowScrollBottleneckRects(&error, false); | 53 setShowScrollBottleneckRects(&error, false); |
55 } | 54 } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 return true; | 95 return true; |
97 } | 96 } |
98 | 97 |
99 DEFINE_TRACE(InspectorRenderingAgent) | 98 DEFINE_TRACE(InspectorRenderingAgent) |
100 { | 99 { |
101 visitor->trace(m_webLocalFrameImpl); | 100 visitor->trace(m_webLocalFrameImpl); |
102 InspectorBaseAgent::trace(visitor); | 101 InspectorBaseAgent::trace(visitor); |
103 } | 102 } |
104 | 103 |
105 } // namespace blink | 104 } // namespace blink |
OLD | NEW |