| 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 #ifndef CONTENT_PUBLIC_TEST_RENDER_VIEW_TEST_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_RENDER_VIEW_TEST_H_ |
| 6 #define CONTENT_PUBLIC_TEST_RENDER_VIEW_TEST_H_ | 6 #define CONTENT_PUBLIC_TEST_RENDER_VIEW_TEST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
| 13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 14 #include "content/public/browser/native_web_keyboard_event.h" | 14 #include "content/public/browser/native_web_keyboard_event.h" |
| 15 #include "content/public/common/main_function_params.h" | 15 #include "content/public/common/main_function_params.h" |
| 16 #include "content/public/common/page_state.h" | 16 #include "content/public/common/page_state.h" |
| 17 #include "content/public/test/mock_render_thread.h" | 17 #include "content/public/test/mock_render_thread.h" |
| 18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
| 19 #include "third_party/WebKit/public/platform/Platform.h" | 19 #include "third_party/WebKit/public/platform/Platform.h" |
| 20 #include "third_party/WebKit/public/web/WebFrame.h" | 20 #include "third_party/WebKit/public/web/WebFrame.h" |
| 21 | 21 |
| 22 struct ViewMsg_Resize_Params; |
| 23 |
| 22 namespace blink { | 24 namespace blink { |
| 23 class WebWidget; | 25 class WebWidget; |
| 24 } | 26 } |
| 25 | 27 |
| 26 namespace gfx { | 28 namespace gfx { |
| 27 class Rect; | 29 class Rect; |
| 28 } | 30 } |
| 29 | 31 |
| 30 namespace content { | 32 namespace content { |
| 31 class ContentBrowserClient; | 33 class ContentBrowserClient; |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 void DidNavigateWithinPage(blink::WebLocalFrame* frame, | 128 void DidNavigateWithinPage(blink::WebLocalFrame* frame, |
| 127 bool is_new_navigation); | 129 bool is_new_navigation); |
| 128 void SendContentStateImmediately(); | 130 void SendContentStateImmediately(); |
| 129 blink::WebWidget* GetWebWidget(); | 131 blink::WebWidget* GetWebWidget(); |
| 130 | 132 |
| 131 // Allows a subclass to override the various content client implementations. | 133 // Allows a subclass to override the various content client implementations. |
| 132 virtual ContentClient* CreateContentClient(); | 134 virtual ContentClient* CreateContentClient(); |
| 133 virtual ContentBrowserClient* CreateContentBrowserClient(); | 135 virtual ContentBrowserClient* CreateContentBrowserClient(); |
| 134 virtual ContentRendererClient* CreateContentRendererClient(); | 136 virtual ContentRendererClient* CreateContentRendererClient(); |
| 135 | 137 |
| 138 // Allows a subclass to customize the initial size of the RenderView. |
| 139 virtual scoped_ptr<ViewMsg_Resize_Params> InitialSizeParams(); |
| 140 |
| 136 // testing::Test | 141 // testing::Test |
| 137 void SetUp() override; | 142 void SetUp() override; |
| 138 | 143 |
| 139 void TearDown() override; | 144 void TearDown() override; |
| 140 | 145 |
| 141 base::MessageLoop msg_loop_; | 146 base::MessageLoop msg_loop_; |
| 142 scoped_ptr<MockRenderProcess> mock_process_; | 147 scoped_ptr<MockRenderProcess> mock_process_; |
| 143 // We use a naked pointer because we don't want to expose RenderViewImpl in | 148 // We use a naked pointer because we don't want to expose RenderViewImpl in |
| 144 // the embedder's namespace. | 149 // the embedder's namespace. |
| 145 RenderView* view_; | 150 RenderView* view_; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 158 scoped_ptr<base::mac::ScopedNSAutoreleasePool> autorelease_pool_; | 163 scoped_ptr<base::mac::ScopedNSAutoreleasePool> autorelease_pool_; |
| 159 #endif | 164 #endif |
| 160 | 165 |
| 161 private: | 166 private: |
| 162 void GoToOffset(int offset, const PageState& state); | 167 void GoToOffset(int offset, const PageState& state); |
| 163 }; | 168 }; |
| 164 | 169 |
| 165 } // namespace content | 170 } // namespace content |
| 166 | 171 |
| 167 #endif // CONTENT_PUBLIC_TEST_RENDER_VIEW_TEST_H_ | 172 #endif // CONTENT_PUBLIC_TEST_RENDER_VIEW_TEST_H_ |
| OLD | NEW |