| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TAB_CONTENTS_TAB_CONTENTS_H_ | 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
| 6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <deque> | 9 #include <deque> |
| 10 #include <map> | 10 #include <map> |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
| 17 #include "base/property_bag.h" |
| 17 #include "base/string16.h" | 18 #include "base/string16.h" |
| 18 #include "content/browser/download/save_package.h" | 19 #include "content/browser/download/save_package.h" |
| 19 #include "content/browser/javascript_dialogs.h" | 20 #include "content/browser/javascript_dialogs.h" |
| 20 #include "content/browser/renderer_host/java/java_bridge_dispatcher_host_manager
.h" | 21 #include "content/browser/renderer_host/java/java_bridge_dispatcher_host_manager
.h" |
| 21 #include "content/browser/renderer_host/render_view_host_delegate.h" | 22 #include "content/browser/renderer_host/render_view_host_delegate.h" |
| 22 #include "content/browser/tab_contents/navigation_controller.h" | 23 #include "content/browser/tab_contents/navigation_controller.h" |
| 23 #include "content/browser/tab_contents/navigation_entry.h" | 24 #include "content/browser/tab_contents/navigation_entry.h" |
| 24 #include "content/browser/tab_contents/page_navigator.h" | 25 #include "content/browser/tab_contents/page_navigator.h" |
| 25 #include "content/browser/tab_contents/render_view_host_manager.h" | 26 #include "content/browser/tab_contents/render_view_host_manager.h" |
| 26 #include "content/browser/tab_contents/tab_contents_observer.h" | 27 #include "content/browser/tab_contents/tab_contents_observer.h" |
| 27 #include "content/browser/webui/web_ui.h" | 28 #include "content/browser/webui/web_ui.h" |
| 28 #include "content/common/content_export.h" | 29 #include "content/common/content_export.h" |
| 29 #include "content/common/property_bag.h" | |
| 30 #include "content/public/common/renderer_preferences.h" | 30 #include "content/public/common/renderer_preferences.h" |
| 31 #include "net/base/load_states.h" | 31 #include "net/base/load_states.h" |
| 32 #include "ui/gfx/native_widget_types.h" | 32 #include "ui/gfx/native_widget_types.h" |
| 33 #include "webkit/glue/resource_type.h" | 33 #include "webkit/glue/resource_type.h" |
| 34 | 34 |
| 35 #if defined(OS_WIN) | 35 #if defined(OS_WIN) |
| 36 #include "base/win/scoped_handle.h" | 36 #include "base/win/scoped_handle.h" |
| 37 #endif | 37 #endif |
| 38 | 38 |
| 39 class DownloadItem; | 39 class DownloadItem; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 int routing_id, | 80 int routing_id, |
| 81 const TabContents* base_tab_contents, | 81 const TabContents* base_tab_contents, |
| 82 SessionStorageNamespace* session_storage_namespace); | 82 SessionStorageNamespace* session_storage_namespace); |
| 83 virtual ~TabContents(); | 83 virtual ~TabContents(); |
| 84 | 84 |
| 85 // Intrinsic tab state ------------------------------------------------------- | 85 // Intrinsic tab state ------------------------------------------------------- |
| 86 | 86 |
| 87 // Returns the property bag for this tab contents, where callers can add | 87 // Returns the property bag for this tab contents, where callers can add |
| 88 // extra data they may wish to associate with the tab. Returns a pointer | 88 // extra data they may wish to associate with the tab. Returns a pointer |
| 89 // rather than a reference since the PropertyAccessors expect this. | 89 // rather than a reference since the PropertyAccessors expect this. |
| 90 const PropertyBag* property_bag() const { return &property_bag_; } | 90 const base::PropertyBag* property_bag() const { return &property_bag_; } |
| 91 PropertyBag* property_bag() { return &property_bag_; } | 91 base::PropertyBag* property_bag() { return &property_bag_; } |
| 92 | 92 |
| 93 TabContentsDelegate* delegate() const { return delegate_; } | 93 TabContentsDelegate* delegate() const { return delegate_; } |
| 94 void set_delegate(TabContentsDelegate* delegate); | 94 void set_delegate(TabContentsDelegate* delegate); |
| 95 | 95 |
| 96 // Gets the controller for this tab contents. | 96 // Gets the controller for this tab contents. |
| 97 NavigationController& controller() { return controller_; } | 97 NavigationController& controller() { return controller_; } |
| 98 const NavigationController& controller() const { return controller_; } | 98 const NavigationController& controller() const { return controller_; } |
| 99 | 99 |
| 100 // Returns the user browser context associated with this TabContents (via the | 100 // Returns the user browser context associated with this TabContents (via the |
| 101 // NavigationController). | 101 // NavigationController). |
| (...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 727 // is not running (i.e., it will render "sad tab"). This method is | 727 // is not running (i.e., it will render "sad tab"). This method is |
| 728 // automatically called from LoadURL. | 728 // automatically called from LoadURL. |
| 729 // | 729 // |
| 730 // If you are attaching to an already-existing RenderView, you should call | 730 // If you are attaching to an already-existing RenderView, you should call |
| 731 // InitWithExistingID. | 731 // InitWithExistingID. |
| 732 virtual bool CreateRenderViewForRenderManager( | 732 virtual bool CreateRenderViewForRenderManager( |
| 733 RenderViewHost* render_view_host) OVERRIDE; | 733 RenderViewHost* render_view_host) OVERRIDE; |
| 734 | 734 |
| 735 // Stores random bits of data for others to associate with this object. | 735 // Stores random bits of data for others to associate with this object. |
| 736 // WARNING: this needs to be deleted after NavigationController. | 736 // WARNING: this needs to be deleted after NavigationController. |
| 737 PropertyBag property_bag_; | 737 base::PropertyBag property_bag_; |
| 738 | 738 |
| 739 // Data for core operation --------------------------------------------------- | 739 // Data for core operation --------------------------------------------------- |
| 740 | 740 |
| 741 // Delegate for notifying our owner about stuff. Not owned by us. | 741 // Delegate for notifying our owner about stuff. Not owned by us. |
| 742 TabContentsDelegate* delegate_; | 742 TabContentsDelegate* delegate_; |
| 743 | 743 |
| 744 // Handles the back/forward list and loading. | 744 // Handles the back/forward list and loading. |
| 745 NavigationController controller_; | 745 NavigationController controller_; |
| 746 | 746 |
| 747 // The corresponding view. | 747 // The corresponding view. |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 // (full-page plugins for now only) permissions. | 871 // (full-page plugins for now only) permissions. |
| 872 int content_restrictions_; | 872 int content_restrictions_; |
| 873 | 873 |
| 874 // Our view type. Default is VIEW_TYPE_TAB_CONTENTS. | 874 // Our view type. Default is VIEW_TYPE_TAB_CONTENTS. |
| 875 content::ViewType view_type_; | 875 content::ViewType view_type_; |
| 876 | 876 |
| 877 DISALLOW_COPY_AND_ASSIGN(TabContents); | 877 DISALLOW_COPY_AND_ASSIGN(TabContents); |
| 878 }; | 878 }; |
| 879 | 879 |
| 880 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 880 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
| OLD | NEW |