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_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ |
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 53 |
54 // Allow the WebContentsViewDelegate to be set explicitly. | 54 // Allow the WebContentsViewDelegate to be set explicitly. |
55 void SetDelegateForTesting(WebContentsViewDelegate* delegate); | 55 void SetDelegateForTesting(WebContentsViewDelegate* delegate); |
56 | 56 |
57 // Set a flag to pass nullptr as the parent_view argument to | 57 // Set a flag to pass nullptr as the parent_view argument to |
58 // RenderWidgetHostViewAura::InitAsChild(). | 58 // RenderWidgetHostViewAura::InitAsChild(). |
59 void set_init_rwhv_with_null_parent_for_testing(bool set) { | 59 void set_init_rwhv_with_null_parent_for_testing(bool set) { |
60 init_rwhv_with_null_parent_for_testing_ = set; | 60 init_rwhv_with_null_parent_for_testing_ = set; |
61 } | 61 } |
62 | 62 |
| 63 using RenderWidgetHostViewCreateFunction = |
| 64 RenderWidgetHostViewAura* (*)(RenderWidgetHost*, bool); |
| 65 |
| 66 // Used to override the creation of RenderWidgetHostViews in tests. |
| 67 static void InstallCreateHookForTests( |
| 68 RenderWidgetHostViewCreateFunction create_render_widget_host_view); |
| 69 |
63 private: | 70 private: |
64 class WindowObserver; | 71 class WindowObserver; |
65 | 72 |
66 ~WebContentsViewAura() override; | 73 ~WebContentsViewAura() override; |
67 | 74 |
68 void SizeChangedCommon(const gfx::Size& size); | 75 void SizeChangedCommon(const gfx::Size& size); |
69 | 76 |
70 void EndDrag(RenderWidgetHost* source_rwh, blink::WebDragOperationsMask ops); | 77 void EndDrag(RenderWidgetHost* source_rwh, blink::WebDragOperationsMask ops); |
71 | 78 |
72 void InstallOverscrollControllerDelegate(RenderWidgetHostViewAura* view); | 79 void InstallOverscrollControllerDelegate(RenderWidgetHostViewAura* view); |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 std::unique_ptr<GestureNavSimple> gesture_nav_simple_; | 244 std::unique_ptr<GestureNavSimple> gesture_nav_simple_; |
238 | 245 |
239 bool init_rwhv_with_null_parent_for_testing_; | 246 bool init_rwhv_with_null_parent_for_testing_; |
240 | 247 |
241 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAura); | 248 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAura); |
242 }; | 249 }; |
243 | 250 |
244 } // namespace content | 251 } // namespace content |
245 | 252 |
246 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ | 253 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ |
OLD | NEW |