| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_TAB_CONTENTS_TAB_CONTENTS_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
| 6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 | 624 |
| 625 // Getter/Setters for the url request context to be used for this tab. | 625 // Getter/Setters for the url request context to be used for this tab. |
| 626 void set_request_context(URLRequestContextGetter* context) { | 626 void set_request_context(URLRequestContextGetter* context) { |
| 627 request_context_ = context; | 627 request_context_ = context; |
| 628 } | 628 } |
| 629 | 629 |
| 630 URLRequestContextGetter* request_context() const { | 630 URLRequestContextGetter* request_context() const { |
| 631 return request_context_; | 631 return request_context_; |
| 632 } | 632 } |
| 633 | 633 |
| 634 // JavaScriptMessageBoxClient ------------------------------------------------ |
| 635 virtual std::wstring GetMessageBoxTitle(const GURL& frame_url, |
| 636 bool is_alert); |
| 637 virtual gfx::NativeWindow GetMessageBoxRootWindow(); |
| 638 virtual void OnMessageBoxClosed(IPC::Message* reply_msg, |
| 639 bool success, |
| 640 const std::wstring& prompt); |
| 641 virtual void SetSuppressMessageBoxes(bool suppress_message_boxes); |
| 642 virtual TabContents* AsTabContents() { return this; } |
| 643 virtual ExtensionHost* AsExtensionHost() { return NULL; } |
| 644 |
| 634 private: | 645 private: |
| 635 friend class NavigationController; | 646 friend class NavigationController; |
| 636 // Used to access the child_windows_ (ConstrainedWindowList) for testing | 647 // Used to access the child_windows_ (ConstrainedWindowList) for testing |
| 637 // automation purposes. | 648 // automation purposes. |
| 638 friend class AutomationProvider; | 649 friend class AutomationProvider; |
| 639 friend class BlockedPopupContainerTest; | 650 friend class BlockedPopupContainerTest; |
| 640 friend class BlockedPopupContainerControllerTest; | 651 friend class BlockedPopupContainerControllerTest; |
| 641 | 652 |
| 642 FRIEND_TEST(BlockedPopupContainerTest, TestReposition); | 653 FRIEND_TEST(BlockedPopupContainerTest, TestReposition); |
| 643 FRIEND_TEST(TabContentsTest, NoJSMessageOnInterstitials); | 654 FRIEND_TEST(TabContentsTest, NoJSMessageOnInterstitials); |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 944 // InitWithExistingID. | 955 // InitWithExistingID. |
| 945 virtual bool CreateRenderViewForRenderManager( | 956 virtual bool CreateRenderViewForRenderManager( |
| 946 RenderViewHost* render_view_host); | 957 RenderViewHost* render_view_host); |
| 947 | 958 |
| 948 // NotificationObserver ------------------------------------------------------ | 959 // NotificationObserver ------------------------------------------------------ |
| 949 | 960 |
| 950 virtual void Observe(NotificationType type, | 961 virtual void Observe(NotificationType type, |
| 951 const NotificationSource& source, | 962 const NotificationSource& source, |
| 952 const NotificationDetails& details); | 963 const NotificationDetails& details); |
| 953 | 964 |
| 954 | |
| 955 // JavaScriptMessageBoxClient ------------------------------------------------ | |
| 956 virtual std::wstring GetMessageBoxTitle(const GURL& frame_url, | |
| 957 bool is_alert); | |
| 958 virtual gfx::NativeWindow GetMessageBoxRootWindow(); | |
| 959 virtual void OnMessageBoxClosed(IPC::Message* reply_msg, | |
| 960 bool success, | |
| 961 const std::wstring& prompt); | |
| 962 virtual void SetSuppressMessageBoxes(bool suppress_message_boxes); | |
| 963 virtual TabContents* AsTabContents() { return this; } | |
| 964 | |
| 965 // Data for core operation --------------------------------------------------- | 965 // Data for core operation --------------------------------------------------- |
| 966 | 966 |
| 967 // Delegate for notifying our owner about stuff. Not owned by us. | 967 // Delegate for notifying our owner about stuff. Not owned by us. |
| 968 TabContentsDelegate* delegate_; | 968 TabContentsDelegate* delegate_; |
| 969 | 969 |
| 970 // Handles the back/forward list and loading. | 970 // Handles the back/forward list and loading. |
| 971 NavigationController controller_; | 971 NavigationController controller_; |
| 972 | 972 |
| 973 // The corresponding view. | 973 // The corresponding view. |
| 974 scoped_ptr<TabContentsView> view_; | 974 scoped_ptr<TabContentsView> view_; |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1171 // Can be NULL in which case we defer to the request context from the | 1171 // Can be NULL in which case we defer to the request context from the |
| 1172 // profile | 1172 // profile |
| 1173 scoped_refptr<URLRequestContextGetter> request_context_; | 1173 scoped_refptr<URLRequestContextGetter> request_context_; |
| 1174 | 1174 |
| 1175 // --------------------------------------------------------------------------- | 1175 // --------------------------------------------------------------------------- |
| 1176 | 1176 |
| 1177 DISALLOW_COPY_AND_ASSIGN(TabContents); | 1177 DISALLOW_COPY_AND_ASSIGN(TabContents); |
| 1178 }; | 1178 }; |
| 1179 | 1179 |
| 1180 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 1180 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
| OLD | NEW |