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

Side by Side Diff: third_party/WebKit/Source/web/InspectorEmulationAgent.cpp

Issue 2251343003: [DevTools] Generate separate copies of inspector_protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 // 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/InspectorEmulationAgent.h" 5 #include "web/InspectorEmulationAgent.h"
6 6
7 #include "core/frame/FrameHost.h" 7 #include "core/frame/FrameHost.h"
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/frame/Settings.h" 9 #include "core/frame/Settings.h"
10 #include "core/page/Page.h" 10 #include "core/page/Page.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 WebViewImpl* InspectorEmulationAgent::webViewImpl() 43 WebViewImpl* InspectorEmulationAgent::webViewImpl()
44 { 44 {
45 return m_webLocalFrameImpl->viewImpl(); 45 return m_webLocalFrameImpl->viewImpl();
46 } 46 }
47 47
48 void InspectorEmulationAgent::restore() 48 void InspectorEmulationAgent::restore()
49 { 49 {
50 ErrorString error; 50 ErrorString error;
51 setScriptExecutionDisabled(&error, m_state->booleanProperty(EmulationAgentSt ate::scriptExecutionDisabled, false)); 51 setScriptExecutionDisabled(&error, m_state->booleanProperty(EmulationAgentSt ate::scriptExecutionDisabled, false));
52 setTouchEmulationEnabled(&error, m_state->booleanProperty(EmulationAgentStat e::touchEventEmulationEnabled, false), protocol::Maybe<String>()); 52 setTouchEmulationEnabled(&error, m_state->booleanProperty(EmulationAgentStat e::touchEventEmulationEnabled, false), protocol::Maybe<String>());
53 String16 emulatedMedia; 53 String emulatedMedia;
54 m_state->getString(EmulationAgentState::emulatedMedia, &emulatedMedia); 54 m_state->getString(EmulationAgentState::emulatedMedia, &emulatedMedia);
55 setEmulatedMedia(&error, emulatedMedia); 55 setEmulatedMedia(&error, emulatedMedia);
56 } 56 }
57 57
58 void InspectorEmulationAgent::disable(ErrorString*) 58 void InspectorEmulationAgent::disable(ErrorString*)
59 { 59 {
60 ErrorString error; 60 ErrorString error;
61 setScriptExecutionDisabled(&error, false); 61 setScriptExecutionDisabled(&error, false);
62 setTouchEmulationEnabled(&error, false, protocol::Maybe<String>()); 62 setTouchEmulationEnabled(&error, false, protocol::Maybe<String>());
63 setEmulatedMedia(&error, String()); 63 setEmulatedMedia(&error, String());
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 frontend()->virtualTimeBudgetExpired(); 120 frontend()->virtualTimeBudgetExpired();
121 } 121 }
122 122
123 DEFINE_TRACE(InspectorEmulationAgent) 123 DEFINE_TRACE(InspectorEmulationAgent)
124 { 124 {
125 visitor->trace(m_webLocalFrameImpl); 125 visitor->trace(m_webLocalFrameImpl);
126 InspectorBaseAgent::trace(visitor); 126 InspectorBaseAgent::trace(visitor);
127 } 127 }
128 128
129 } // namespace blink 129 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698