| 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" | |
| 14 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 15 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
| 17 #include "base/property_bag.h" | 16 #include "base/property_bag.h" |
| 18 #include "base/string16.h" | |
| 19 #include "content/browser/download/save_package.h" | 17 #include "content/browser/download/save_package.h" |
| 20 #include "content/browser/javascript_dialogs.h" | 18 #include "content/browser/javascript_dialogs.h" |
| 21 #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" |
| 22 #include "content/browser/renderer_host/render_view_host_delegate.h" | 20 #include "content/browser/renderer_host/render_view_host_delegate.h" |
| 23 #include "content/browser/tab_contents/navigation_controller.h" | 21 #include "content/browser/tab_contents/navigation_controller.h" |
| 24 #include "content/browser/tab_contents/navigation_entry.h" | 22 #include "content/browser/tab_contents/navigation_entry.h" |
| 25 #include "content/browser/tab_contents/page_navigator.h" | 23 #include "content/browser/tab_contents/page_navigator.h" |
| 26 #include "content/browser/tab_contents/render_view_host_manager.h" | 24 #include "content/browser/tab_contents/render_view_host_manager.h" |
| 27 #include "content/browser/tab_contents/tab_contents_observer.h" | 25 #include "content/browser/tab_contents/tab_contents_observer.h" |
| 28 #include "content/browser/webui/web_ui.h" | 26 #include "content/browser/webui/web_ui.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 // tab contentses to share the same session storage (part of the WebStorage | 76 // tab contentses to share the same session storage (part of the WebStorage |
| 79 // spec) space. This is useful when restoring tabs, but most callers should | 77 // spec) space. This is useful when restoring tabs, but most callers should |
| 80 // pass in NULL which will cause a new SessionStorageNamespace to be created. | 78 // pass in NULL which will cause a new SessionStorageNamespace to be created. |
| 81 TabContents(content::BrowserContext* browser_context, | 79 TabContents(content::BrowserContext* browser_context, |
| 82 SiteInstance* site_instance, | 80 SiteInstance* site_instance, |
| 83 int routing_id, | 81 int routing_id, |
| 84 const TabContents* base_tab_contents, | 82 const TabContents* base_tab_contents, |
| 85 SessionStorageNamespace* session_storage_namespace); | 83 SessionStorageNamespace* session_storage_namespace); |
| 86 virtual ~TabContents(); | 84 virtual ~TabContents(); |
| 87 | 85 |
| 88 // Intrinsic tab state ------------------------------------------------------- | |
| 89 | |
| 90 // Returns the user browser context associated with this TabContents (via the | |
| 91 // NavigationController). | |
| 92 content::BrowserContext* browser_context() const { | |
| 93 return controller_.browser_context(); | |
| 94 } | |
| 95 | |
| 96 // Returns the SavePackage which manages the page saving job. May be NULL. | 86 // Returns the SavePackage which manages the page saving job. May be NULL. |
| 97 SavePackage* save_package() const { return save_package_.get(); } | 87 SavePackage* save_package() const { return save_package_.get(); } |
| 98 | 88 |
| 99 WebUI* committed_web_ui() const { | |
| 100 return render_manager_.web_ui(); | |
| 101 } | |
| 102 | |
| 103 // Returns the committed WebUI if one exists, otherwise the pending one. | |
| 104 // Callers who want to use the pending WebUI for the pending navigation entry | |
| 105 // should use GetWebUIForCurrentState instead. | |
| 106 WebUI* web_ui() const { | |
| 107 return render_manager_.web_ui() ? render_manager_.web_ui() | |
| 108 : render_manager_.pending_web_ui(); | |
| 109 } | |
| 110 | |
| 111 // Tab navigation state ------------------------------------------------------ | |
| 112 | |
| 113 // Returns the current navigation properties, which if a navigation is | |
| 114 // pending may be provisional (e.g., the navigation could result in a | |
| 115 // download, in which case the URL would revert to what it was previously). | |
| 116 virtual const GURL& GetURL() const OVERRIDE; | |
| 117 virtual const string16& GetTitle() const; | |
| 118 | |
| 119 // The max page ID for any page that the current SiteInstance has loaded in | |
| 120 // this TabContents. Page IDs are specific to a given SiteInstance and | |
| 121 // TabContents, corresponding to a specific RenderView in the renderer. | |
| 122 // Page IDs increase with each new page that is loaded by a tab. | |
| 123 int32 GetMaxPageID(); | |
| 124 | |
| 125 // The max page ID for any page that the given SiteInstance has loaded in | |
| 126 // this TabContents. | |
| 127 int32 GetMaxPageIDForSiteInstance(SiteInstance* site_instance); | |
| 128 | |
| 129 // Updates the max page ID for the current SiteInstance in this TabContents | 89 // Updates the max page ID for the current SiteInstance in this TabContents |
| 130 // to be at least |page_id|. | 90 // to be at least |page_id|. |
| 131 void UpdateMaxPageID(int32 page_id); | 91 void UpdateMaxPageID(int32 page_id); |
| 132 | 92 |
| 133 // Updates the max page ID for the given SiteInstance in this TabContents | 93 // Updates the max page ID for the given SiteInstance in this TabContents |
| 134 // to be at least |page_id|. | 94 // to be at least |page_id|. |
| 135 void UpdateMaxPageIDForSiteInstance(SiteInstance* site_instance, | 95 void UpdateMaxPageIDForSiteInstance(SiteInstance* site_instance, |
| 136 int32 page_id); | 96 int32 page_id); |
| 137 | 97 |
| 138 // Returns the SiteInstance associated with the current page. | |
| 139 SiteInstance* GetSiteInstance() const; | |
| 140 | |
| 141 // Returns the SiteInstance for the pending navigation, if any. Otherwise | |
| 142 // returns the current SiteInstance. | |
| 143 SiteInstance* GetPendingSiteInstance() const; | |
| 144 | |
| 145 // Return whether this tab contents is loading a resource. | |
| 146 bool IsLoading() const { return is_loading_; } | |
| 147 | |
| 148 // Returns whether this tab contents is waiting for a first-response for the | |
| 149 // main resource of the page. This controls whether the throbber state is | |
| 150 // "waiting" or "loading." | |
| 151 bool waiting_for_response() const { return waiting_for_response_; } | |
| 152 | |
| 153 const net::LoadStateWithParam& load_state() const { return load_state_; } | |
| 154 const string16& load_state_host() const { return load_state_host_; } | |
| 155 uint64 upload_size() const { return upload_size_; } | |
| 156 uint64 upload_position() const { return upload_position_; } | |
| 157 | |
| 158 const std::string& encoding() const { return encoding_; } | |
| 159 void set_encoding(const std::string& encoding); | |
| 160 void reset_encoding() { | |
| 161 encoding_.clear(); | |
| 162 } | |
| 163 | |
| 164 bool displayed_insecure_content() const { | |
| 165 return displayed_insecure_content_; | |
| 166 } | |
| 167 | |
| 168 // Internal state ------------------------------------------------------------ | |
| 169 | |
| 170 // This flag indicates whether the tab contents is currently being | |
| 171 // screenshotted by the DraggedTabController. | |
| 172 bool capturing_contents() const { return capturing_contents_; } | |
| 173 void set_capturing_contents(bool cap) { capturing_contents_ = cap; } | |
| 174 | |
| 175 // Indicates whether this tab should be considered crashed. The setter will | |
| 176 // also notify the delegate when the flag is changed. | |
| 177 bool is_crashed() const { | |
| 178 return (crashed_status_ == base::TERMINATION_STATUS_PROCESS_CRASHED || | |
| 179 crashed_status_ == base::TERMINATION_STATUS_ABNORMAL_TERMINATION || | |
| 180 crashed_status_ == base::TERMINATION_STATUS_PROCESS_WAS_KILLED); | |
| 181 } | |
| 182 base::TerminationStatus crashed_status() const { return crashed_status_; } | |
| 183 int crashed_error_code() const { return crashed_error_code_; } | |
| 184 void SetIsCrashed(base::TerminationStatus status, int error_code); | |
| 185 | |
| 186 // Whether the tab is in the process of being destroyed. | |
| 187 // Added as a tentative work-around for focus related bug #4633. This allows | |
| 188 // us not to store focus when a tab is being closed. | |
| 189 bool is_being_destroyed() const { return is_being_destroyed_; } | |
| 190 | |
| 191 // Convenience method for notifying the delegate of a navigation state | |
| 192 // change. See WebContentsDelegate. | |
| 193 void NotifyNavigationStateChanged(unsigned changed_flags); | |
| 194 | |
| 195 // Invoked when the tab contents becomes selected. If you override, be sure | |
| 196 // and invoke super's implementation. | |
| 197 virtual void DidBecomeSelected(); | |
| 198 base::TimeTicks last_selected_time() const { | |
| 199 return last_selected_time_; | |
| 200 } | |
| 201 | |
| 202 // Invoked when the tab contents becomes hidden. | |
| 203 // NOTE: If you override this, call the superclass version too! | |
| 204 virtual void WasHidden(); | |
| 205 | |
| 206 // TODO(brettw) document these. | |
| 207 virtual void ShowContents(); | |
| 208 virtual void HideContents(); | |
| 209 | |
| 210 // Returns true if the before unload and unload listeners need to be | |
| 211 // fired. The value of this changes over time. For example, if true and the | |
| 212 // before unload listener is executed and allows the user to exit, then this | |
| 213 // returns false. | |
| 214 bool NeedToFireBeforeUnload(); | |
| 215 | |
| 216 // Expose the render manager for testing. | |
| 217 RenderViewHostManager* render_manager_for_testing() { | |
| 218 return &render_manager_; | |
| 219 } | |
| 220 | |
| 221 // Commands ------------------------------------------------------------------ | 98 // Commands ------------------------------------------------------------------ |
| 222 | 99 |
| 223 // Implementation of PageNavigator. | 100 // Implementation of PageNavigator. |
| 224 | 101 |
| 225 // Deprecated. Please use the one-argument variant instead. | 102 // Deprecated. Please use the one-argument variant instead. |
| 226 // TODO(adriansc): Remove this method once refactoring changed all call sites. | 103 // TODO(adriansc): Remove this method once refactoring changed all call sites. |
| 227 virtual TabContents* OpenURL(const GURL& url, | 104 virtual TabContents* OpenURL(const GURL& url, |
| 228 const GURL& referrer, | 105 const GURL& referrer, |
| 229 WindowOpenDisposition disposition, | 106 WindowOpenDisposition disposition, |
| 230 content::PageTransition transition) OVERRIDE; | 107 content::PageTransition transition) OVERRIDE; |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 virtual const base::PropertyBag* GetPropertyBag() const OVERRIDE; | 329 virtual const base::PropertyBag* GetPropertyBag() const OVERRIDE; |
| 453 virtual base::PropertyBag* GetPropertyBag() OVERRIDE; | 330 virtual base::PropertyBag* GetPropertyBag() OVERRIDE; |
| 454 virtual content::WebContentsDelegate* GetDelegate() OVERRIDE; | 331 virtual content::WebContentsDelegate* GetDelegate() OVERRIDE; |
| 455 virtual void SetDelegate(content::WebContentsDelegate* delegate) OVERRIDE; | 332 virtual void SetDelegate(content::WebContentsDelegate* delegate) OVERRIDE; |
| 456 virtual NavigationController& GetController() OVERRIDE; | 333 virtual NavigationController& GetController() OVERRIDE; |
| 457 virtual const NavigationController& GetController() const OVERRIDE; | 334 virtual const NavigationController& GetController() const OVERRIDE; |
| 458 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; | 335 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; |
| 459 virtual void SetViewType(content::ViewType type) OVERRIDE; | 336 virtual void SetViewType(content::ViewType type) OVERRIDE; |
| 460 virtual content::RenderProcessHost* GetRenderProcessHost() const OVERRIDE; | 337 virtual content::RenderProcessHost* GetRenderProcessHost() const OVERRIDE; |
| 461 virtual RenderViewHost* GetRenderViewHost() const OVERRIDE; | 338 virtual RenderViewHost* GetRenderViewHost() const OVERRIDE; |
| 462 // TODO(jam): webui stuff goes here | |
| 463 virtual RenderWidgetHostView* GetRenderWidgetHostView() const OVERRIDE; | 339 virtual RenderWidgetHostView* GetRenderWidgetHostView() const OVERRIDE; |
| 464 virtual TabContentsView* GetView() const OVERRIDE; | 340 virtual TabContentsView* GetView() const OVERRIDE; |
| 465 | 341 virtual WebUI* GetWebUI() const OVERRIDE; |
| 342 virtual WebUI* GetCommittedWebUI() const OVERRIDE; |
| 343 virtual const string16& GetTitle() const OVERRIDE; |
| 344 virtual int32 GetMaxPageID() OVERRIDE; |
| 345 virtual int32 GetMaxPageIDForSiteInstance( |
| 346 SiteInstance* site_instance) OVERRIDE; |
| 347 virtual SiteInstance* GetSiteInstance() const OVERRIDE; |
| 348 virtual SiteInstance* GetPendingSiteInstance() const OVERRIDE; |
| 349 virtual bool IsLoading() const OVERRIDE; |
| 350 virtual bool IsWaitingForResponse() const OVERRIDE; |
| 351 virtual const net::LoadStateWithParam& GetLoadState() const OVERRIDE; |
| 352 virtual const string16& GetLoadStateHost() const OVERRIDE; |
| 353 virtual uint64 GetUploadSize() const OVERRIDE; |
| 354 virtual uint64 GetUploadPosition() const OVERRIDE; |
| 355 virtual const std::string& GetEncoding() const OVERRIDE; |
| 356 virtual bool DisplayedInsecureContent() const OVERRIDE; |
| 357 virtual void SetCapturingContents(bool cap) OVERRIDE; |
| 358 virtual bool IsCrashed() const OVERRIDE; |
| 359 virtual void SetIsCrashed(base::TerminationStatus status, |
| 360 int error_code) OVERRIDE; |
| 361 virtual base::TerminationStatus GetCrashedStatus() const OVERRIDE; |
| 362 virtual bool IsBeingDestroyed() const OVERRIDE; |
| 363 virtual void NotifyNavigationStateChanged(unsigned changed_flags) OVERRIDE; |
| 364 virtual void DidBecomeSelected() OVERRIDE; |
| 365 virtual base::TimeTicks GetLastSelectedTime() const OVERRIDE; |
| 366 virtual void WasHidden() OVERRIDE; |
| 367 virtual void ShowContents() OVERRIDE; |
| 368 virtual void HideContents() OVERRIDE; |
| 369 virtual bool NeedToFireBeforeUnload() OVERRIDE; |
| 370 virtual RenderViewHostManager* GetRenderManagerForTesting() OVERRIDE; |
| 466 | 371 |
| 467 // RenderViewHostDelegate ---------------------------------------------------- | 372 // RenderViewHostDelegate ---------------------------------------------------- |
| 468 | 373 |
| 469 virtual RenderViewHostDelegate::View* GetViewDelegate() OVERRIDE; | 374 virtual RenderViewHostDelegate::View* GetViewDelegate() OVERRIDE; |
| 470 virtual RenderViewHostDelegate::RendererManagement* | 375 virtual RenderViewHostDelegate::RendererManagement* |
| 471 GetRendererManagementDelegate() OVERRIDE; | 376 GetRendererManagementDelegate() OVERRIDE; |
| 377 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 378 virtual const GURL& GetURL() const OVERRIDE; |
| 472 virtual TabContents* GetAsTabContents() OVERRIDE; | 379 virtual TabContents* GetAsTabContents() OVERRIDE; |
| 473 virtual content::ViewType GetRenderViewType() const OVERRIDE; | 380 virtual content::ViewType GetRenderViewType() const OVERRIDE; |
| 474 virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; | 381 virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; |
| 475 virtual void RenderViewReady(RenderViewHost* render_view_host) OVERRIDE; | 382 virtual void RenderViewReady(RenderViewHost* render_view_host) OVERRIDE; |
| 476 virtual void RenderViewGone(RenderViewHost* render_view_host, | 383 virtual void RenderViewGone(RenderViewHost* render_view_host, |
| 477 base::TerminationStatus status, | 384 base::TerminationStatus status, |
| 478 int error_code) OVERRIDE; | 385 int error_code) OVERRIDE; |
| 479 virtual void RenderViewDeleted(RenderViewHost* render_view_host) OVERRIDE; | 386 virtual void RenderViewDeleted(RenderViewHost* render_view_host) OVERRIDE; |
| 480 virtual void DidNavigate( | 387 virtual void DidNavigate( |
| 481 RenderViewHost* render_view_host, | 388 RenderViewHost* render_view_host, |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 virtual void Activate() OVERRIDE; | 445 virtual void Activate() OVERRIDE; |
| 539 virtual void Deactivate() OVERRIDE; | 446 virtual void Deactivate() OVERRIDE; |
| 540 virtual void LostCapture() OVERRIDE; | 447 virtual void LostCapture() OVERRIDE; |
| 541 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 448 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
| 542 bool* is_keyboard_shortcut) OVERRIDE; | 449 bool* is_keyboard_shortcut) OVERRIDE; |
| 543 virtual void HandleKeyboardEvent( | 450 virtual void HandleKeyboardEvent( |
| 544 const NativeWebKeyboardEvent& event) OVERRIDE; | 451 const NativeWebKeyboardEvent& event) OVERRIDE; |
| 545 virtual void HandleMouseDown() OVERRIDE; | 452 virtual void HandleMouseDown() OVERRIDE; |
| 546 virtual void HandleMouseUp() OVERRIDE; | 453 virtual void HandleMouseUp() OVERRIDE; |
| 547 virtual void HandleMouseActivate() OVERRIDE; | 454 virtual void HandleMouseActivate() OVERRIDE; |
| 548 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | |
| 549 virtual void RunFileChooser( | 455 virtual void RunFileChooser( |
| 550 RenderViewHost* render_view_host, | 456 RenderViewHost* render_view_host, |
| 551 const content::FileChooserParams& params) OVERRIDE; | 457 const content::FileChooserParams& params) OVERRIDE; |
| 552 virtual void ToggleFullscreenMode(bool enter_fullscreen) OVERRIDE; | 458 virtual void ToggleFullscreenMode(bool enter_fullscreen) OVERRIDE; |
| 553 virtual bool IsFullscreenForCurrentTab() const OVERRIDE; | 459 virtual bool IsFullscreenForCurrentTab() const OVERRIDE; |
| 554 virtual void UpdatePreferredSize(const gfx::Size& pref_size) OVERRIDE; | 460 virtual void UpdatePreferredSize(const gfx::Size& pref_size) OVERRIDE; |
| 555 virtual void WebUISend(RenderViewHost* render_view_host, | 461 virtual void WebUISend(RenderViewHost* render_view_host, |
| 556 const GURL& source_url, | 462 const GURL& source_url, |
| 557 const std::string& name, | 463 const std::string& name, |
| 558 const base::ListValue& args) OVERRIDE; | 464 const base::ListValue& args) OVERRIDE; |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 // corresponding to this view host. If this method is not called and the | 635 // corresponding to this view host. If this method is not called and the |
| 730 // process is not shared, then the TabContents will act as though the renderer | 636 // process is not shared, then the TabContents will act as though the renderer |
| 731 // is not running (i.e., it will render "sad tab"). This method is | 637 // is not running (i.e., it will render "sad tab"). This method is |
| 732 // automatically called from LoadURL. | 638 // automatically called from LoadURL. |
| 733 // | 639 // |
| 734 // If you are attaching to an already-existing RenderView, you should call | 640 // If you are attaching to an already-existing RenderView, you should call |
| 735 // InitWithExistingID. | 641 // InitWithExistingID. |
| 736 virtual bool CreateRenderViewForRenderManager( | 642 virtual bool CreateRenderViewForRenderManager( |
| 737 RenderViewHost* render_view_host) OVERRIDE; | 643 RenderViewHost* render_view_host) OVERRIDE; |
| 738 | 644 |
| 645 void SetEncoding(const std::string& encoding); |
| 646 |
| 739 // Stores random bits of data for others to associate with this object. | 647 // Stores random bits of data for others to associate with this object. |
| 740 // WARNING: this needs to be deleted after NavigationController. | 648 // WARNING: this needs to be deleted after NavigationController. |
| 741 base::PropertyBag property_bag_; | 649 base::PropertyBag property_bag_; |
| 742 | 650 |
| 743 // Data for core operation --------------------------------------------------- | 651 // Data for core operation --------------------------------------------------- |
| 744 | 652 |
| 745 // Delegate for notifying our owner about stuff. Not owned by us. | 653 // Delegate for notifying our owner about stuff. Not owned by us. |
| 746 content::WebContentsDelegate* delegate_; | 654 content::WebContentsDelegate* delegate_; |
| 747 | 655 |
| 748 // Handles the back/forward list and loading. | 656 // Handles the back/forward list and loading. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 772 | 680 |
| 773 // Data for loading state ---------------------------------------------------- | 681 // Data for loading state ---------------------------------------------------- |
| 774 | 682 |
| 775 // Indicates whether we're currently loading a resource. | 683 // Indicates whether we're currently loading a resource. |
| 776 bool is_loading_; | 684 bool is_loading_; |
| 777 | 685 |
| 778 // Indicates if the tab is considered crashed. | 686 // Indicates if the tab is considered crashed. |
| 779 base::TerminationStatus crashed_status_; | 687 base::TerminationStatus crashed_status_; |
| 780 int crashed_error_code_; | 688 int crashed_error_code_; |
| 781 | 689 |
| 782 // See waiting_for_response() above. | 690 // Whether this tab contents is waiting for a first-response for the |
| 691 // main resource of the page. This controls whether the throbber state is |
| 692 // "waiting" or "loading." |
| 783 bool waiting_for_response_; | 693 bool waiting_for_response_; |
| 784 | 694 |
| 785 // Map of SiteInstance ID to max page ID for this tab. A page ID is specific | 695 // Map of SiteInstance ID to max page ID for this tab. A page ID is specific |
| 786 // to a given tab and SiteInstance, and must be valid for the lifetime of the | 696 // to a given tab and SiteInstance, and must be valid for the lifetime of the |
| 787 // TabContents. | 697 // TabContents. |
| 788 std::map<int32, int32> max_page_ids_; | 698 std::map<int32, int32> max_page_ids_; |
| 789 | 699 |
| 790 // System time at which the current load was started. | 700 // System time at which the current load was started. |
| 791 base::TimeTicks current_load_start_; | 701 base::TimeTicks current_load_start_; |
| 792 | 702 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 808 std::string contents_mime_type_; | 718 std::string contents_mime_type_; |
| 809 | 719 |
| 810 // Character encoding. | 720 // Character encoding. |
| 811 std::string encoding_; | 721 std::string encoding_; |
| 812 | 722 |
| 813 // True if this is a secure page which displayed insecure content. | 723 // True if this is a secure page which displayed insecure content. |
| 814 bool displayed_insecure_content_; | 724 bool displayed_insecure_content_; |
| 815 | 725 |
| 816 // Data for misc internal state ---------------------------------------------- | 726 // Data for misc internal state ---------------------------------------------- |
| 817 | 727 |
| 818 // See capturing_contents() above. | 728 // Whether the tab contents is currently being screenshotted by the |
| 729 // DraggedTabController. |
| 819 bool capturing_contents_; | 730 bool capturing_contents_; |
| 820 | 731 |
| 821 // See getter above. | 732 // See getter above. |
| 822 bool is_being_destroyed_; | 733 bool is_being_destroyed_; |
| 823 | 734 |
| 824 // Indicates whether we should notify about disconnection of this | 735 // Indicates whether we should notify about disconnection of this |
| 825 // TabContents. This is used to ensure disconnection notifications only | 736 // TabContents. This is used to ensure disconnection notifications only |
| 826 // happen if a connection notification has happened and that they happen only | 737 // happen if a connection notification has happened and that they happen only |
| 827 // once. | 738 // once. |
| 828 bool notify_disconnection_; | 739 bool notify_disconnection_; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 874 // (full-page plugins for now only) permissions. | 785 // (full-page plugins for now only) permissions. |
| 875 int content_restrictions_; | 786 int content_restrictions_; |
| 876 | 787 |
| 877 // Our view type. Default is VIEW_TYPE_TAB_CONTENTS. | 788 // Our view type. Default is VIEW_TYPE_TAB_CONTENTS. |
| 878 content::ViewType view_type_; | 789 content::ViewType view_type_; |
| 879 | 790 |
| 880 DISALLOW_COPY_AND_ASSIGN(TabContents); | 791 DISALLOW_COPY_AND_ASSIGN(TabContents); |
| 881 }; | 792 }; |
| 882 | 793 |
| 883 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 794 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
| OLD | NEW |