| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_BROWSER_WEB_CONTENTS_H_ | 5 #ifndef CHROME_BROWSER_WEB_CONTENTS_H_ |
| 6 #define CHROME_BROWSER_WEB_CONTENTS_H_ | 6 #define CHROME_BROWSER_WEB_CONTENTS_H_ |
| 7 | 7 |
| 8 #include "base/hash_tables.h" | 8 #include "base/hash_tables.h" |
| 9 #include "chrome/browser/download/save_package.h" | 9 #include "chrome/browser/download/save_package.h" |
| 10 #include "chrome/browser/fav_icon_helper.h" | 10 #include "chrome/browser/fav_icon_helper.h" |
| 11 #include "chrome/browser/printing/print_view_manager.h" | 11 #include "chrome/browser/printing/print_view_manager.h" |
| 12 #include "chrome/browser/render_view_host_delegate.h" | 12 #include "chrome/browser/render_view_host_delegate.h" |
| 13 #include "chrome/browser/render_view_host_manager.h" | 13 #include "chrome/browser/render_view_host_manager.h" |
| 14 #include "chrome/browser/shell_dialogs.h" | 14 #include "chrome/browser/shell_dialogs.h" |
| 15 #include "chrome/browser/tab_contents.h" | 15 #include "chrome/browser/tab_contents.h" |
| 16 #include "chrome/browser/web_app.h" | 16 #include "chrome/browser/web_app.h" |
| 17 | 17 |
| 18 class AutofillManager; | 18 class AutofillManager; |
| 19 class InterstitialPageDelegate; | 19 class InterstitialPageDelegate; |
| 20 class PasswordManager; | 20 class PasswordManager; |
| 21 class PluginInstaller; | 21 class PluginInstaller; |
| 22 class RenderViewHost; | 22 class RenderViewHost; |
| 23 class RenderViewHostFactory; | 23 class RenderViewHostFactory; |
| 24 class RenderWidgetHost; | 24 class RenderWidgetHost; |
| 25 class WebContentsView; | 25 class WebContentsView; |
| 26 | 26 |
| 27 namespace base { |
| 28 class WaitableEvent; |
| 29 } |
| 30 |
| 27 // WebContents represents the contents of a tab that shows web pages. It embeds | 31 // WebContents represents the contents of a tab that shows web pages. It embeds |
| 28 // a RenderViewHost (via RenderViewHostManager) to actually display the page. | 32 // a RenderViewHost (via RenderViewHostManager) to actually display the page. |
| 29 class WebContents : public TabContents, | 33 class WebContents : public TabContents, |
| 30 public RenderViewHostDelegate, | 34 public RenderViewHostDelegate, |
| 31 public RenderViewHostManager::Delegate, | 35 public RenderViewHostManager::Delegate, |
| 32 public SelectFileDialog::Listener, | 36 public SelectFileDialog::Listener, |
| 33 public WebApp::Observer { | 37 public WebApp::Observer { |
| 34 public: | 38 public: |
| 35 // If instance is NULL, then creates a new process for this view. Otherwise | 39 // If instance is NULL, then creates a new process for this view. Otherwise |
| 36 // initialize with a process already created for a different WebContents. | 40 // initialize with a process already created for a different WebContents. |
| 37 // This will share the process between views in the same instance. If | 41 // This will share the process between views in the same instance. If |
| 38 // render_view_factory is NULL, this will create RenderViewHost objects | 42 // render_view_factory is NULL, this will create RenderViewHost objects |
| 39 // directly. | 43 // directly. |
| 40 WebContents(Profile* profile, | 44 WebContents(Profile* profile, |
| 41 SiteInstance* instance, | 45 SiteInstance* instance, |
| 42 RenderViewHostFactory* render_view_factory, | 46 RenderViewHostFactory* render_view_factory, |
| 43 int routing_id, | 47 int routing_id, |
| 44 HANDLE modal_dialog_event); | 48 base::WaitableEvent* modal_dialog_event); |
| 45 | 49 |
| 46 static void RegisterUserPrefs(PrefService* prefs); | 50 static void RegisterUserPrefs(PrefService* prefs); |
| 47 | 51 |
| 48 // Getters ------------------------------------------------------------------- | 52 // Getters ------------------------------------------------------------------- |
| 49 | 53 |
| 50 // Returns the AutofillManager, creating it if necessary. | 54 // Returns the AutofillManager, creating it if necessary. |
| 51 AutofillManager* GetAutofillManager(); | 55 AutofillManager* GetAutofillManager(); |
| 52 | 56 |
| 53 // Returns the PasswordManager, creating it if necessary. | 57 // Returns the PasswordManager, creating it if necessary. |
| 54 PasswordManager* GetPasswordManager(); | 58 PasswordManager* GetPasswordManager(); |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 net::LoadState load_state_; | 567 net::LoadState load_state_; |
| 564 std::wstring load_state_host_; | 568 std::wstring load_state_host_; |
| 565 | 569 |
| 566 // Non-null if we're displaying content for a web app. | 570 // Non-null if we're displaying content for a web app. |
| 567 scoped_refptr<WebApp> web_app_; | 571 scoped_refptr<WebApp> web_app_; |
| 568 | 572 |
| 569 DISALLOW_COPY_AND_ASSIGN(WebContents); | 573 DISALLOW_COPY_AND_ASSIGN(WebContents); |
| 570 }; | 574 }; |
| 571 | 575 |
| 572 #endif // CHROME_BROWSER_WEB_CONTENTS_H_ | 576 #endif // CHROME_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |