ozone: evdev: Sync caps lock LED state to evdev
[chromium-blink-merge.git] / base / trace_event / process_memory_dump.h
blob4256c4cadc81340bf05c7d7ea54e25d366f7a93d
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
3 // found in the LICENSE file.
5 #ifndef BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_
6 #define BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_
8 #include "base/base_export.h"
9 #include "base/trace_event/process_memory_maps.h"
10 #include "base/trace_event/process_memory_totals.h"
12 namespace base {
13 namespace trace_event {
15 class ConvertableToTraceFormat;
17 // ProcessMemoryDump is as a strongly typed container which enforces the data
18 // model for each memory dump point and holds the dumps produced by the
19 // MemoryDumpProvider(s) for a specific process.
20 // At trace generation time (i.e. when AsValue() is called), ProcessMemoryDump
21 // will compose a key-value dictionary of the various dumps obtained at trace
22 // dump point time.
23 class BASE_EXPORT ProcessMemoryDump {
24 public:
25 ProcessMemoryDump();
26 ~ProcessMemoryDump();
28 // Called at trace generation time to populate the TracedValue.
29 void AsValueInto(TracedValue* value) const;
31 ProcessMemoryTotals* process_totals() { return &process_totals_; }
32 bool has_process_totals() const { return has_process_totals_; }
33 void set_has_process_totals() { has_process_totals_ = true; }
35 ProcessMemoryMaps* process_mmaps() { return &process_mmaps_; }
36 bool has_process_mmaps() const { return has_process_mmaps_; }
37 void set_has_process_mmaps() { has_process_mmaps_ = true; }
39 private:
40 ProcessMemoryTotals process_totals_;
41 bool has_process_totals_;
43 ProcessMemoryMaps process_mmaps_;
44 bool has_process_mmaps_;
46 DISALLOW_COPY_AND_ASSIGN(ProcessMemoryDump);
49 } // namespace trace_event
50 } // namespace base
52 #endif // BASE_TRACE_EVENT_PROCESS_MEMORY_DUMP_H_