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

Side by Side Diff: content/browser/indexed_db/indexed_db_database_callbacks.cc

Issue 2160163002: [IndexedDB] Propogating Changes to Observer : Browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Expected tests updated Created 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/indexed_db/indexed_db_database_callbacks.h" 5 #include "content/browser/indexed_db/indexed_db_database_callbacks.h"
6 6
7 #include "content/browser/indexed_db/indexed_db_database_error.h" 7 #include "content/browser/indexed_db/indexed_db_database_error.h"
8 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" 8 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h"
9 #include "content/browser/indexed_db/indexed_db_observer_changes.h"
9 #include "content/common/indexed_db/indexed_db_messages.h" 10 #include "content/common/indexed_db/indexed_db_messages.h"
10 11
11 namespace content { 12 namespace content {
12 13
13 IndexedDBDatabaseCallbacks::IndexedDBDatabaseCallbacks( 14 IndexedDBDatabaseCallbacks::IndexedDBDatabaseCallbacks(
14 IndexedDBDispatcherHost* dispatcher_host, 15 IndexedDBDispatcherHost* dispatcher_host,
15 int ipc_thread_id, 16 int ipc_thread_id,
16 int ipc_database_callbacks_id) 17 int ipc_database_callbacks_id)
17 : dispatcher_host_(dispatcher_host), 18 : dispatcher_host_(dispatcher_host),
18 ipc_thread_id_(ipc_thread_id), 19 ipc_thread_id_(ipc_thread_id),
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 if (!dispatcher_host_.get()) 58 if (!dispatcher_host_.get())
58 return; 59 return;
59 60
60 dispatcher_host_->FinishTransaction(host_transaction_id, true); 61 dispatcher_host_->FinishTransaction(host_transaction_id, true);
61 dispatcher_host_->Send(new IndexedDBMsg_DatabaseCallbacksComplete( 62 dispatcher_host_->Send(new IndexedDBMsg_DatabaseCallbacksComplete(
62 ipc_thread_id_, 63 ipc_thread_id_,
63 ipc_database_callbacks_id_, 64 ipc_database_callbacks_id_,
64 dispatcher_host_->RendererTransactionId(host_transaction_id))); 65 dispatcher_host_->RendererTransactionId(host_transaction_id)));
65 } 66 }
66 67
68 void IndexedDBDatabaseCallbacks::OnDatabaseChange(
69 int32_t ipc_database_id,
70 std::unique_ptr<IndexedDBObserverChanges> changes) {
71 dispatcher_host_->Send(new IndexedDBMsg_DatabaseCallbacksChanges(
72 ipc_thread_id_, ipc_database_id,
73 IndexedDBDispatcherHost::ConvertObserverChanges(std::move(changes))));
74 }
75
67 } // namespace content 76 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_database_callbacks.h ('k') | content/browser/indexed_db/indexed_db_dispatcher_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698