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_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/compiler_specific.h" | 13 #include "base/compiler_specific.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/property_bag.h" |
18 #include "content/browser/javascript_dialogs.h" | 18 #include "content/browser/javascript_dialogs.h" |
19 #include "content/browser/renderer_host/java/java_bridge_dispatcher_host_manager
.h" | 19 #include "content/browser/renderer_host/java/java_bridge_dispatcher_host_manager
.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/navigation_controller_impl.h" | 21 #include "content/browser/tab_contents/navigation_controller_impl.h" |
22 #include "content/browser/tab_contents/render_view_host_manager.h" | 22 #include "content/browser/tab_contents/render_view_host_manager.h" |
23 #include "content/common/content_export.h" | 23 #include "content/common/content_export.h" |
24 #include "content/public/browser/web_contents.h" | 24 #include "content/public/browser/web_contents.h" |
25 #include "content/public/common/renderer_preferences.h" | 25 #include "content/public/common/renderer_preferences.h" |
26 #include "net/base/load_states.h" | 26 #include "net/base/load_states.h" |
| 27 #include "ui/gfx/size.h" |
27 #include "webkit/glue/resource_type.h" | 28 #include "webkit/glue/resource_type.h" |
28 | 29 |
29 #if defined(OS_WIN) | 30 #if defined(OS_WIN) |
30 #include "base/win/scoped_handle.h" | 31 #include "base/win/scoped_handle.h" |
31 #endif | 32 #endif |
32 | 33 |
33 class LoadNotificationDetails; | 34 class LoadNotificationDetails; |
34 class RenderViewHost; | 35 class RenderViewHost; |
35 class SessionStorageNamespace; | 36 class SessionStorageNamespace; |
36 class SiteInstance; | 37 class SiteInstance; |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 virtual void SetClosedByUserGesture(bool value) OVERRIDE; | 197 virtual void SetClosedByUserGesture(bool value) OVERRIDE; |
197 virtual bool GetClosedByUserGesture() const OVERRIDE; | 198 virtual bool GetClosedByUserGesture() const OVERRIDE; |
198 virtual double GetZoomLevel() const OVERRIDE; | 199 virtual double GetZoomLevel() const OVERRIDE; |
199 virtual int GetZoomPercent(bool* enable_increment, | 200 virtual int GetZoomPercent(bool* enable_increment, |
200 bool* enable_decrement) OVERRIDE; | 201 bool* enable_decrement) OVERRIDE; |
201 virtual void ViewSource() OVERRIDE; | 202 virtual void ViewSource() OVERRIDE; |
202 virtual void ViewFrameSource(const GURL& url, | 203 virtual void ViewFrameSource(const GURL& url, |
203 const std::string& content_state) OVERRIDE; | 204 const std::string& content_state) OVERRIDE; |
204 virtual int GetMinimumZoomPercent() const OVERRIDE; | 205 virtual int GetMinimumZoomPercent() const OVERRIDE; |
205 virtual int GetMaximumZoomPercent() const OVERRIDE; | 206 virtual int GetMaximumZoomPercent() const OVERRIDE; |
| 207 virtual gfx::Size GetPreferredSize() const OVERRIDE; |
206 virtual int GetContentRestrictions() const OVERRIDE; | 208 virtual int GetContentRestrictions() const OVERRIDE; |
207 virtual WebUI::TypeID GetWebUITypeForCurrentState() OVERRIDE; | 209 virtual WebUI::TypeID GetWebUITypeForCurrentState() OVERRIDE; |
208 virtual WebUI* GetWebUIForCurrentState() OVERRIDE; | 210 virtual WebUI* GetWebUIForCurrentState() OVERRIDE; |
209 virtual bool GotResponseToLockMouseRequest(bool allowed) OVERRIDE; | 211 virtual bool GotResponseToLockMouseRequest(bool allowed) OVERRIDE; |
210 | 212 |
211 // Implementation of PageNavigator. | 213 // Implementation of PageNavigator. |
212 virtual content::WebContents* OpenURL( | 214 virtual content::WebContents* OpenURL( |
213 const content::OpenURLParams& params) OVERRIDE; | 215 const content::OpenURLParams& params) OVERRIDE; |
214 | 216 |
215 // RenderViewHostDelegate ---------------------------------------------------- | 217 // RenderViewHostDelegate ---------------------------------------------------- |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 bool closed_by_user_gesture_; | 623 bool closed_by_user_gesture_; |
622 | 624 |
623 // Minimum/maximum zoom percent. | 625 // Minimum/maximum zoom percent. |
624 int minimum_zoom_percent_; | 626 int minimum_zoom_percent_; |
625 int maximum_zoom_percent_; | 627 int maximum_zoom_percent_; |
626 // If true, the default zoom limits have been overriden for this tab, in which | 628 // If true, the default zoom limits have been overriden for this tab, in which |
627 // case we don't want saved settings to apply to it and we don't want to | 629 // case we don't want saved settings to apply to it and we don't want to |
628 // remember it. | 630 // remember it. |
629 bool temporary_zoom_settings_; | 631 bool temporary_zoom_settings_; |
630 | 632 |
| 633 // The intrinsic size of the page. |
| 634 gfx::Size preferred_size_; |
| 635 |
631 // Content restrictions, used to disable print/copy etc based on content's | 636 // Content restrictions, used to disable print/copy etc based on content's |
632 // (full-page plugins for now only) permissions. | 637 // (full-page plugins for now only) permissions. |
633 int content_restrictions_; | 638 int content_restrictions_; |
634 | 639 |
635 // Our view type. Default is VIEW_TYPE_TAB_CONTENTS. | 640 // Our view type. Default is VIEW_TYPE_TAB_CONTENTS. |
636 content::ViewType view_type_; | 641 content::ViewType view_type_; |
637 | 642 |
638 DISALLOW_COPY_AND_ASSIGN(TabContents); | 643 DISALLOW_COPY_AND_ASSIGN(TabContents); |
639 }; | 644 }; |
640 | 645 |
641 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 646 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
OLD | NEW |