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_RENDER_VIEW_HOST_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ |
6 #define CONTENT_BROWSER_WEB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 // the page contents. The view calls this function when the tab is focused | 90 // the page contents. The view calls this function when the tab is focused |
91 // to see what it should do. | 91 // to see what it should do. |
92 virtual bool FocusLocationBarByDefault() = 0; | 92 virtual bool FocusLocationBarByDefault() = 0; |
93 | 93 |
94 // Focuses the location bar. | 94 // Focuses the location bar. |
95 virtual void SetFocusToLocationBar(bool select_all) = 0; | 95 virtual void SetFocusToLocationBar(bool select_all) = 0; |
96 | 96 |
97 // Creates a view and sets the size for the specified RVH. | 97 // Creates a view and sets the size for the specified RVH. |
98 virtual void CreateViewAndSetSizeForRVH(RenderViewHost* rvh) = 0; | 98 virtual void CreateViewAndSetSizeForRVH(RenderViewHost* rvh) = 0; |
99 | 99 |
| 100 // Returns true if views created for this delegate should be created in a |
| 101 // hidden state. |
| 102 virtual bool IsHidden() = 0; |
| 103 |
100 protected: | 104 protected: |
101 virtual ~Delegate() {} | 105 virtual ~Delegate() {} |
102 }; | 106 }; |
103 | 107 |
104 // All three delegate pointers must be non-NULL and are not owned by this | 108 // All three delegate pointers must be non-NULL and are not owned by this |
105 // class. They must outlive this class. The RenderViewHostDelegate and | 109 // class. They must outlive this class. The RenderViewHostDelegate and |
106 // RenderWidgetHostDelegate are what will be installed into all | 110 // RenderWidgetHostDelegate are what will be installed into all |
107 // RenderViewHosts that are created. | 111 // RenderViewHosts that are created. |
108 // | 112 // |
109 // You must call Init() before using this class. | 113 // You must call Init() before using this class. |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 void DidNavigateMainFrame(RenderViewHost* render_view_host); | 178 void DidNavigateMainFrame(RenderViewHost* render_view_host); |
175 | 179 |
176 // Called when a renderer sets its opener to null. | 180 // Called when a renderer sets its opener to null. |
177 void DidDisownOpener(RenderViewHost* render_view_host); | 181 void DidDisownOpener(RenderViewHost* render_view_host); |
178 | 182 |
179 // Helper method to create a RenderViewHost. If |swapped_out| is true, it | 183 // Helper method to create a RenderViewHost. If |swapped_out| is true, it |
180 // will be initially placed on the swapped out hosts list. Otherwise, it | 184 // will be initially placed on the swapped out hosts list. Otherwise, it |
181 // will be used for a pending cross-site navigation. | 185 // will be used for a pending cross-site navigation. |
182 int CreateRenderView(SiteInstance* instance, | 186 int CreateRenderView(SiteInstance* instance, |
183 int opener_route_id, | 187 int opener_route_id, |
184 bool swapped_out); | 188 bool swapped_out, |
| 189 bool hidden); |
185 | 190 |
186 // Called when a provisional load on the given renderer is aborted. | 191 // Called when a provisional load on the given renderer is aborted. |
187 void RendererAbortedProvisionalLoad(RenderViewHost* render_view_host); | 192 void RendererAbortedProvisionalLoad(RenderViewHost* render_view_host); |
188 | 193 |
189 // Sets the passed passed interstitial as the currently showing interstitial. | 194 // Sets the passed passed interstitial as the currently showing interstitial. |
190 // |interstitial_page| should be non NULL (use the remove_interstitial_page | 195 // |interstitial_page| should be non NULL (use the remove_interstitial_page |
191 // method to unset the interstitial) and no interstitial page should be set | 196 // method to unset the interstitial) and no interstitial page should be set |
192 // when there is already a non NULL interstitial page set. | 197 // when there is already a non NULL interstitial page set. |
193 void set_interstitial_page(InterstitialPageImpl* interstitial_page) { | 198 void set_interstitial_page(InterstitialPageImpl* interstitial_page) { |
194 DCHECK(!interstitial_page_ && interstitial_page); | 199 DCHECK(!interstitial_page_ && interstitial_page); |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 InterstitialPageImpl* interstitial_page_; | 352 InterstitialPageImpl* interstitial_page_; |
348 | 353 |
349 NotificationRegistrar registrar_; | 354 NotificationRegistrar registrar_; |
350 | 355 |
351 DISALLOW_COPY_AND_ASSIGN(RenderViewHostManager); | 356 DISALLOW_COPY_AND_ASSIGN(RenderViewHostManager); |
352 }; | 357 }; |
353 | 358 |
354 } // namespace content | 359 } // namespace content |
355 | 360 |
356 #endif // CONTENT_BROWSER_WEB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ | 361 #endif // CONTENT_BROWSER_WEB_CONTENTS_RENDER_VIEW_HOST_MANAGER_H_ |
OLD | NEW |