Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 3 * Copyright (C) 2006 Apple Computer, Inc. | 3 * Copyright (C) 2006 Apple Computer, Inc. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 44 } // namespace | 44 } // namespace |
| 45 | 45 |
| 46 FrameTree::FrameTree(Frame* this_frame) | 46 FrameTree::FrameTree(Frame* this_frame) |
| 47 : this_frame_(this_frame), scoped_child_count_(kInvalidChildCount) {} | 47 : this_frame_(this_frame), scoped_child_count_(kInvalidChildCount) {} |
| 48 | 48 |
| 49 FrameTree::~FrameTree() {} | 49 FrameTree::~FrameTree() {} |
| 50 | 50 |
| 51 const AtomicString& FrameTree::GetName() const { | 51 const AtomicString& FrameTree::GetName() const { |
| 52 // TODO(andypaicu): remove this once we have gathered the data | 52 // TODO(andypaicu): remove this once we have gathered the data |
| 53 if (experimental_set_nulled_name_) { | 53 if (experimental_set_nulled_name_) { |
| 54 UseCounter::Count(this_frame_.Get(), | 54 const LocalFrame* frame = |
| 55 UseCounter::kCrossOriginMainFrameNulledNameAccessed); | 55 this_frame_->IsLocalFrame() |
| 56 ? ToLocalFrame(this_frame_) | |
| 57 : (Top().IsLocalFrame() ? ToLocalFrame(&Top()) : nullptr); | |
| 58 if (frame) { | |
| 59 UseCounter::Count(frame, | |
| 60 UseCounter::kCrossOriginMainFrameNulledNameAccessed); | |
|
dcheng
2017/05/12 22:15:18
I think we might want to keep this: can we cheat b
Rick Byers
2017/05/25 15:32:31
Unfortunately no, in order to migrate UseCounter h
| |
| 61 } | |
| 56 } | 62 } |
| 57 return name_; | 63 return name_; |
| 58 } | 64 } |
| 59 | 65 |
| 60 // TODO(andypaicu): remove this once we have gathered the data | 66 // TODO(andypaicu): remove this once we have gathered the data |
| 61 void FrameTree::ExperimentalSetNulledName() { | 67 void FrameTree::ExperimentalSetNulledName() { |
| 62 experimental_set_nulled_name_ = true; | 68 experimental_set_nulled_name_ = true; |
| 63 } | 69 } |
| 64 | 70 |
| 65 void FrameTree::SetName(const AtomicString& name) { | 71 void FrameTree::SetName(const AtomicString& name) { |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 296 void showFrameTree(const blink::Frame* frame) { | 302 void showFrameTree(const blink::Frame* frame) { |
| 297 if (!frame) { | 303 if (!frame) { |
| 298 printf("Null input frame\n"); | 304 printf("Null input frame\n"); |
| 299 return; | 305 return; |
| 300 } | 306 } |
| 301 | 307 |
| 302 printFrames(&frame->Tree().Top(), frame, 0); | 308 printFrames(&frame->Tree().Top(), frame, 0); |
| 303 } | 309 } |
| 304 | 310 |
| 305 #endif | 311 #endif |
| OLD | NEW |