| 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/string16.h" | 17 #include "base/string16.h" |
| 18 #include "content/browser/download/save_package.h" | 18 #include "content/browser/download/save_package.h" |
| 19 #include "content/browser/javascript_dialogs.h" | 19 #include "content/browser/javascript_dialogs.h" |
| 20 #include "content/browser/renderer_host/render_view_host_delegate.h" | 20 #include "content/browser/renderer_host/render_view_host_delegate.h" |
| 21 #include "content/browser/tab_contents/constrained_window.h" | 21 #include "content/browser/tab_contents/constrained_window.h" |
| 22 #include "content/browser/tab_contents/navigation_controller.h" | 22 #include "content/browser/tab_contents/navigation_controller.h" |
| 23 #include "content/browser/tab_contents/navigation_entry.h" | 23 #include "content/browser/tab_contents/navigation_entry.h" |
| 24 #include "content/browser/tab_contents/page_navigator.h" | 24 #include "content/browser/tab_contents/page_navigator.h" |
| 25 #include "content/browser/tab_contents/render_view_host_manager.h" | 25 #include "content/browser/tab_contents/render_view_host_manager.h" |
| 26 #include "content/browser/tab_contents/tab_contents_observer.h" | 26 #include "content/browser/tab_contents/tab_contents_observer.h" |
| 27 #include "content/browser/webui/web_ui.h" | 27 #include "content/browser/webui/web_ui.h" |
| 28 #include "content/common/content_export.h" |
| 28 #include "content/common/property_bag.h" | 29 #include "content/common/property_bag.h" |
| 29 #include "content/common/renderer_preferences.h" | 30 #include "content/common/renderer_preferences.h" |
| 30 #include "net/base/load_states.h" | 31 #include "net/base/load_states.h" |
| 31 #include "ui/gfx/native_widget_types.h" | 32 #include "ui/gfx/native_widget_types.h" |
| 32 #include "webkit/glue/resource_type.h" | 33 #include "webkit/glue/resource_type.h" |
| 33 | 34 |
| 34 #if defined(OS_WIN) | 35 #if defined(OS_WIN) |
| 35 #include "base/win/scoped_handle.h" | 36 #include "base/win/scoped_handle.h" |
| 36 #endif | 37 #endif |
| 37 | 38 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 51 class TabContentsView; | 52 class TabContentsView; |
| 52 struct ThumbnailScore; | 53 struct ThumbnailScore; |
| 53 class URLPattern; | 54 class URLPattern; |
| 54 struct ViewHostMsg_FrameNavigate_Params; | 55 struct ViewHostMsg_FrameNavigate_Params; |
| 55 struct WebPreferences; | 56 struct WebPreferences; |
| 56 class WebUI; | 57 class WebUI; |
| 57 struct ViewHostMsg_RunFileChooser_Params; | 58 struct ViewHostMsg_RunFileChooser_Params; |
| 58 | 59 |
| 59 // Describes what goes in the main content area of a tab. TabContents is | 60 // Describes what goes in the main content area of a tab. TabContents is |
| 60 // the only type of TabContents, and these should be merged together. | 61 // the only type of TabContents, and these should be merged together. |
| 61 class TabContents : public PageNavigator, | 62 class CONTENT_EXPORT TabContents : public PageNavigator, |
| 62 public RenderViewHostDelegate, | 63 public RenderViewHostDelegate, |
| 63 public RenderViewHostManager::Delegate, | 64 public RenderViewHostManager::Delegate, |
| 64 public content::JavaScriptDialogDelegate { | 65 public content::JavaScriptDialogDelegate { |
| 65 public: | 66 public: |
| 66 // Flags passed to the TabContentsDelegate.NavigationStateChanged to tell it | 67 // Flags passed to the TabContentsDelegate.NavigationStateChanged to tell it |
| 67 // what has changed. Combine them to update more than one thing. | 68 // what has changed. Combine them to update more than one thing. |
| 68 enum InvalidateTypes { | 69 enum InvalidateTypes { |
| 69 INVALIDATE_URL = 1 << 0, // The URL has changed. | 70 INVALIDATE_URL = 1 << 0, // The URL has changed. |
| 70 INVALIDATE_TAB = 1 << 1, // The favicon, app icon, or crashed | 71 INVALIDATE_TAB = 1 << 1, // The favicon, app icon, or crashed |
| 71 // state changed. | 72 // state changed. |
| 72 INVALIDATE_LOAD = 1 << 2, // The loading state has changed. | 73 INVALIDATE_LOAD = 1 << 2, // The loading state has changed. |
| 73 INVALIDATE_PAGE_ACTIONS = 1 << 3, // Page action icons have changed. | 74 INVALIDATE_PAGE_ACTIONS = 1 << 3, // Page action icons have changed. |
| 74 INVALIDATE_TITLE = 1 << 4, // The title changed. | 75 INVALIDATE_TITLE = 1 << 4, // The title changed. |
| (...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 882 ObserverList<TabContentsObserver> observers_; | 883 ObserverList<TabContentsObserver> observers_; |
| 883 | 884 |
| 884 // Content restrictions, used to disable print/copy etc based on content's | 885 // Content restrictions, used to disable print/copy etc based on content's |
| 885 // (full-page plugins for now only) permissions. | 886 // (full-page plugins for now only) permissions. |
| 886 int content_restrictions_; | 887 int content_restrictions_; |
| 887 | 888 |
| 888 DISALLOW_COPY_AND_ASSIGN(TabContents); | 889 DISALLOW_COPY_AND_ASSIGN(TabContents); |
| 889 }; | 890 }; |
| 890 | 891 |
| 891 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 892 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
| OLD | NEW |