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

Side by Side Diff: Source/web/InspectorFrontendClientImpl.cpp

Issue 415043003: Oilpan: Prepare moving InspectorFrontendHost to Oilpan (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Moved InspectorFrontendClient to heap Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/InspectorFrontendClientImpl.h ('k') | Source/web/WebDevToolsFrontendImpl.cpp » ('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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 namespace blink { 47 namespace blink {
48 48
49 InspectorFrontendClientImpl::InspectorFrontendClientImpl(Page* frontendPage, Web DevToolsFrontendClient* client, WebDevToolsFrontendImpl* frontend) 49 InspectorFrontendClientImpl::InspectorFrontendClientImpl(Page* frontendPage, Web DevToolsFrontendClient* client, WebDevToolsFrontendImpl* frontend)
50 : m_frontendPage(frontendPage) 50 : m_frontendPage(frontendPage)
51 , m_client(client) 51 , m_client(client)
52 { 52 {
53 } 53 }
54 54
55 InspectorFrontendClientImpl::~InspectorFrontendClientImpl() 55 InspectorFrontendClientImpl::~InspectorFrontendClientImpl()
56 { 56 {
57 #if !ENABLE(OILPAN)
57 if (m_frontendHost) 58 if (m_frontendHost)
58 m_frontendHost->disconnectClient(); 59 m_frontendHost->disconnectClient();
60 #endif
haraken 2014/07/25 01:05:02 Can we simply remove disconnectClient from ~Inspec
keishi 2014/07/25 01:36:34 Done.
59 m_client = 0; 61 m_client = 0;
60 } 62 }
61 63
64 void InspectorFrontendClientImpl::trace(Visitor* visitor)
65 {
66 visitor->trace(m_frontendPage);
67 visitor->trace(m_frontendHost);
68 InspectorFrontendClient::trace(visitor);
69 }
70
71 void InspectorFrontendClientImpl::dispose()
72 {
73 if (m_frontendHost)
74 m_frontendHost->disconnectClient();
75 }
76
62 void InspectorFrontendClientImpl::windowObjectCleared() 77 void InspectorFrontendClientImpl::windowObjectCleared()
63 { 78 {
64 v8::Isolate* isolate = v8::Isolate::GetCurrent(); 79 v8::Isolate* isolate = v8::Isolate::GetCurrent();
65 ASSERT(m_frontendPage->mainFrame()); 80 ASSERT(m_frontendPage->mainFrame());
66 ScriptState* scriptState = ScriptState::forMainWorld(m_frontendPage->depreca tedLocalMainFrame()); 81 ScriptState* scriptState = ScriptState::forMainWorld(m_frontendPage->depreca tedLocalMainFrame());
67 ScriptState::Scope scope(scriptState); 82 ScriptState::Scope scope(scriptState);
68 83
69 if (m_frontendHost) 84 if (m_frontendHost)
70 m_frontendHost->disconnectClient(); 85 m_frontendHost->disconnectClient();
71 m_frontendHost = InspectorFrontendHost::create(this, m_frontendPage); 86 m_frontendHost = InspectorFrontendHost::create(this, m_frontendPage);
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 { 172 {
158 m_client->sendMessageToEmbedder(message); 173 m_client->sendMessageToEmbedder(message);
159 } 174 }
160 175
161 bool InspectorFrontendClientImpl::isUnderTest() 176 bool InspectorFrontendClientImpl::isUnderTest()
162 { 177 {
163 return m_client->isUnderTest(); 178 return m_client->isUnderTest();
164 } 179 }
165 180
166 } // namespace blink 181 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/InspectorFrontendClientImpl.h ('k') | Source/web/WebDevToolsFrontendImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698