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

Side by Side Diff: Source/modules/indexeddb/InspectorIndexedDBAgent.cpp

Issue 301983003: Make Inspector aware of RemoteFrames in FrameTree (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: yurys' review comment addressed Created 6 years, 6 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
« no previous file with comments | « Source/modules/filesystem/InspectorFileSystemAgent.cpp ('k') | no next file » | 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 RefPtr<RequestDataCallback> m_requestCallback; 532 RefPtr<RequestDataCallback> m_requestCallback;
533 String m_objectStoreName; 533 String m_objectStoreName;
534 String m_indexName; 534 String m_indexName;
535 Persistent<IDBKeyRange> m_idbKeyRange; 535 Persistent<IDBKeyRange> m_idbKeyRange;
536 int m_skipCount; 536 int m_skipCount;
537 unsigned m_pageSize; 537 unsigned m_pageSize;
538 }; 538 };
539 539
540 LocalFrame* findFrameWithSecurityOrigin(Page* page, const String& securityOrigin ) 540 LocalFrame* findFrameWithSecurityOrigin(Page* page, const String& securityOrigin )
541 { 541 {
542 for (LocalFrame* frame = page->mainFrame(); frame; frame = frame->tree().tra verseNext()) { 542 for (Frame* frame = page->mainFrame(); frame; frame = frame->tree().traverse Next()) {
543 RefPtr<SecurityOrigin> documentOrigin = frame->document()->securityOrigi n(); 543 if (!frame->isLocalFrame())
544 continue;
545 RefPtr<SecurityOrigin> documentOrigin = toLocalFrame(frame)->document()- >securityOrigin();
544 if (documentOrigin->toRawString() == securityOrigin) 546 if (documentOrigin->toRawString() == securityOrigin)
545 return frame; 547 return toLocalFrame(frame);
546 } 548 }
547 return 0; 549 return 0;
548 } 550 }
549 551
550 } // namespace 552 } // namespace
551 553
552 void InspectorIndexedDBAgent::provideTo(Page* page) 554 void InspectorIndexedDBAgent::provideTo(Page* page)
553 { 555 {
554 OwnPtr<InspectorIndexedDBAgent> agent(adoptPtr(new InspectorIndexedDBAgent(p age))); 556 OwnPtr<InspectorIndexedDBAgent> agent(adoptPtr(new InspectorIndexedDBAgent(p age)));
555 page->inspectorController().registerModuleAgent(agent.release()); 557 page->inspectorController().registerModuleAgent(agent.release());
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 if (!idbFactory) 767 if (!idbFactory)
766 return; 768 return;
767 769
768 ScriptState* scriptState = ScriptState::forMainWorld(frame); 770 ScriptState* scriptState = ScriptState::forMainWorld(frame);
769 ScriptState::Scope scope(scriptState); 771 ScriptState::Scope scope(scriptState);
770 RefPtr<ClearObjectStore> clearObjectStore = ClearObjectStore::create(scriptS tate, objectStoreName, requestCallback); 772 RefPtr<ClearObjectStore> clearObjectStore = ClearObjectStore::create(scriptS tate, objectStoreName, requestCallback);
771 clearObjectStore->start(idbFactory, document->securityOrigin(), databaseName ); 773 clearObjectStore->start(idbFactory, document->securityOrigin(), databaseName );
772 } 774 }
773 775
774 } // namespace WebCore 776 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/filesystem/InspectorFileSystemAgent.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698