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

Side by Side Diff: content/public/test/web_contents_tester.cc

Issue 1743143002: Remove WebContents::Was{Hidden,Shown}() from the content public interface Base URL: https://chromium.googlesource.com/chromium/src.git@20160225-WebContents-DicardCursorRects
Patch Set: Fix androido Created 4 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/public/test/web_contents_tester.h" 5 #include "content/public/test/web_contents_tester.h"
6 6
7 #include "content/test/test_web_contents.h" 7 #include "content/test/test_web_contents.h"
8 8
9 namespace content { 9 namespace content {
10 10
11 namespace {
12
13 // The two subclasses here are instantiated via the deprecated
14 // CreateWebContentsFor... factories below.
15
16 } // namespace
17
18 // static 11 // static
19 WebContentsTester* WebContentsTester::For(WebContents* contents) { 12 WebContentsTester* WebContentsTester::For(WebContents* contents) {
20 return static_cast<TestWebContents*>(contents); 13 return static_cast<TestWebContents*>(contents);
21 } 14 }
22 15
23 // static 16 // static
24 WebContents* WebContentsTester::CreateTestWebContents( 17 WebContents* WebContentsTester::CreateTestWebContents(
25 BrowserContext* browser_context, 18 BrowserContext* browser_context,
26 SiteInstance* instance) { 19 SiteInstance* instance) {
27 return TestWebContents::Create(browser_context, instance); 20 return TestWebContents::Create(browser_context, instance);
28 } 21 }
29 22
30 // static 23 void WebContentsTester::WasShownForTest() {
24 web_contents()->WasShown();
25 }
26
27 void WebContentsTester::WasHiddenForTest() {
28 web_contents()->WasHidden();
29 }
30
31 WebContentsTester::WebContentsTester() {}
32
33 WebContentsImpl* WebContentsTester::web_contents() {
34 return static_cast<TestWebContents*>(this);
35 }
36
31 } // namespace content 37 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698