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

Side by Side Diff: content/child/web_discardable_memory_impl.cc

Issue 1660383002: Refactoring: Move some classes from content/child to platform (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add PLATFORM_EXPORT; Address haraken's review Created 4 years, 10 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 | « content/child/blink_platform_impl.cc ('k') | content/child/web_memory_allocator_dump_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/child/web_discardable_memory_impl.h" 5 #include "content/child/web_discardable_memory_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/memory/discardable_memory.h" 9 #include "base/memory/discardable_memory.h"
10 #include "base/memory/discardable_memory_allocator.h" 10 #include "base/memory/discardable_memory_allocator.h"
11 #include "content/child/web_process_memory_dump_impl.h" 11 #include "third_party/WebKit/public/platform/WebProcessMemoryDump.h"
12 #include "third_party/WebKit/public/platform/WebString.h" 12 #include "third_party/WebKit/public/platform/WebString.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 WebDiscardableMemoryImpl::~WebDiscardableMemoryImpl() {} 16 WebDiscardableMemoryImpl::~WebDiscardableMemoryImpl() {}
17 17
18 // static 18 // static
19 scoped_ptr<WebDiscardableMemoryImpl> 19 scoped_ptr<WebDiscardableMemoryImpl>
20 WebDiscardableMemoryImpl::CreateLockedMemory(size_t size) { 20 WebDiscardableMemoryImpl::CreateLockedMemory(size_t size) {
21 return make_scoped_ptr(new WebDiscardableMemoryImpl( 21 return make_scoped_ptr(new WebDiscardableMemoryImpl(
(...skipping 10 matching lines...) Expand all
32 } 32 }
33 33
34 void* WebDiscardableMemoryImpl::data() { 34 void* WebDiscardableMemoryImpl::data() {
35 return discardable_->data(); 35 return discardable_->data();
36 } 36 }
37 37
38 blink::WebMemoryAllocatorDump* 38 blink::WebMemoryAllocatorDump*
39 WebDiscardableMemoryImpl::createMemoryAllocatorDump( 39 WebDiscardableMemoryImpl::createMemoryAllocatorDump(
40 const blink::WebString& name, 40 const blink::WebString& name,
41 blink::WebProcessMemoryDump* wpmd) const { 41 blink::WebProcessMemoryDump* wpmd) const {
42 return static_cast<content::WebProcessMemoryDumpImpl*>(wpmd) 42 return wpmd->createDiscardableMemoryAllocatorDump(
43 ->CreateDiscardableMemoryAllocatorDump(name.utf8(), discardable_.get()); 43 name.utf8(), discardable_.get());
44 } 44 }
45 45
46 WebDiscardableMemoryImpl::WebDiscardableMemoryImpl( 46 WebDiscardableMemoryImpl::WebDiscardableMemoryImpl(
47 scoped_ptr<base::DiscardableMemory> memory) 47 scoped_ptr<base::DiscardableMemory> memory)
48 : discardable_(std::move(memory)) {} 48 : discardable_(std::move(memory)) {}
49 49
50 } // namespace content 50 } // namespace content
OLDNEW
« no previous file with comments | « content/child/blink_platform_impl.cc ('k') | content/child/web_memory_allocator_dump_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698