| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 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. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_BLAME_CONTEXT_H |
| 6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_BLAME_CONTEXT_H |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/trace_event/blame_context.h" |
| 10 |
| 11 namespace base { |
| 12 namespace trace_event { |
| 13 class TracedValue; |
| 14 } |
| 15 } |
| 16 |
| 17 namespace content { |
| 18 |
| 19 class FrameTreeNode; |
| 20 |
| 21 class FrameTreeNodeBlameContext : public base::trace_event::BlameContext { |
| 22 public: |
| 23 FrameTreeNodeBlameContext(FrameTreeNode* node); |
| 24 ~FrameTreeNodeBlameContext() override; |
| 25 |
| 26 // Before taking a snapshot, call this function to make sure all arguments |
| 27 // are up-to-date. |
| 28 // TODO(xiaochengh): Get rid of this function by somehow storing the node. |
| 29 void UpdateArguments(FrameTreeNode* node); |
| 30 void ClearArguments(); |
| 31 |
| 32 private: |
| 33 void AsValueInto(base::trace_event::TracedValue* value) override; |
| 34 |
| 35 int process_id_; |
| 36 int routing_id_; |
| 37 std::string url_; |
| 38 |
| 39 DISALLOW_COPY_AND_ASSIGN(FrameTreeNodeBlameContext); |
| 40 }; |
| 41 |
| 42 } // content |
| 43 |
| 44 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_BLAME_CONTEXT_H |
| OLD | NEW |