| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 "chrome/browser/extensions/api/declarative_content/declarative_content_
condition_tracker_test.h" | 5 #include "chrome/browser/extensions/api/declarative_content/declarative_content_
condition_tracker_test.h" |
| 6 | 6 |
| 7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "chrome/test/base/testing_profile.h" | 8 #include "chrome/test/base/testing_profile.h" |
| 9 #include "content/public/browser/render_view_host.h" | 9 #include "content/public/browser/render_view_host.h" |
| 10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 nullptr)); | 33 nullptr)); |
| 34 content::RenderFrameHostTester::For(tab->GetMainFrame()) | 34 content::RenderFrameHostTester::For(tab->GetMainFrame()) |
| 35 ->InitializeRenderFrameIfNeeded(); | 35 ->InitializeRenderFrameIfNeeded(); |
| 36 return tab; | 36 return tab; |
| 37 } | 37 } |
| 38 | 38 |
| 39 content::MockRenderProcessHost* | 39 content::MockRenderProcessHost* |
| 40 DeclarativeContentConditionTrackerTest::GetMockRenderProcessHost( | 40 DeclarativeContentConditionTrackerTest::GetMockRenderProcessHost( |
| 41 content::WebContents* contents) { | 41 content::WebContents* contents) { |
| 42 return static_cast<content::MockRenderProcessHost*>( | 42 return static_cast<content::MockRenderProcessHost*>( |
| 43 contents->GetRenderViewHost()->GetProcess()); | 43 contents->GetMainFrame()->GetProcess()); |
| 44 } | 44 } |
| 45 | 45 |
| 46 const void* DeclarativeContentConditionTrackerTest::GeneratePredicateGroupID() { | 46 const void* DeclarativeContentConditionTrackerTest::GeneratePredicateGroupID() { |
| 47 // The group ID is opaque to the trackers. | 47 // The group ID is opaque to the trackers. |
| 48 return reinterpret_cast<const void*>(next_predicate_group_id_++); | 48 return reinterpret_cast<const void*>(next_predicate_group_id_++); |
| 49 } | 49 } |
| 50 | 50 |
| 51 } // namespace extensions | 51 } // namespace extensions |
| OLD | NEW |