OLD | NEW |
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/browser/web_contents/test_web_contents.h" | 7 #include "content/browser/web_contents/test_web_contents.h" |
8 | 8 |
9 namespace content { | 9 namespace content { |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 int focus_called_; | 31 int focus_called_; |
32 }; | 32 }; |
33 | 33 |
34 class TestWebContentsCountSetFocusToLocationBar : public TestWebContents { | 34 class TestWebContentsCountSetFocusToLocationBar : public TestWebContents { |
35 public: | 35 public: |
36 explicit TestWebContentsCountSetFocusToLocationBar( | 36 explicit TestWebContentsCountSetFocusToLocationBar( |
37 BrowserContext* browser_context) | 37 BrowserContext* browser_context) |
38 : TestWebContents(browser_context), focus_called_(0) { | 38 : TestWebContents(browser_context), focus_called_(0) { |
39 } | 39 } |
40 | 40 |
41 virtual void SetFocusToLocationBar(bool select_all) { ++focus_called_; } | 41 virtual void SetFocusToLocationBar(bool select_all) OVERRIDE { |
| 42 ++focus_called_; |
| 43 } |
42 virtual int GetNumberOfFocusCalls() OVERRIDE { | 44 virtual int GetNumberOfFocusCalls() OVERRIDE { |
43 return focus_called_; | 45 return focus_called_; |
44 } | 46 } |
45 | 47 |
46 private: | 48 private: |
47 int focus_called_; | 49 int focus_called_; |
48 }; | 50 }; |
49 | 51 |
50 } // namespace | 52 } // namespace |
51 | 53 |
(...skipping 23 matching lines...) Expand all Loading... |
75 WebContents* WebContentsTester::CreateTestWebContentsCountFocus( | 77 WebContents* WebContentsTester::CreateTestWebContentsCountFocus( |
76 BrowserContext* browser_context, | 78 BrowserContext* browser_context, |
77 SiteInstance* instance) { | 79 SiteInstance* instance) { |
78 TestWebContentsCountFocus* web_contents = | 80 TestWebContentsCountFocus* web_contents = |
79 new TestWebContentsCountFocus(browser_context); | 81 new TestWebContentsCountFocus(browser_context); |
80 web_contents->Init(WebContents::CreateParams(browser_context, instance)); | 82 web_contents->Init(WebContents::CreateParams(browser_context, instance)); |
81 return web_contents; | 83 return web_contents; |
82 } | 84 } |
83 | 85 |
84 } // namespace content | 86 } // namespace content |
OLD | NEW |