| 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 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 #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 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
| 15 #include "base/compiler_specific.h" |
| 15 #include "base/gtest_prod_util.h" | 16 #include "base/gtest_prod_util.h" |
| 16 #include "base/scoped_ptr.h" | 17 #include "base/scoped_ptr.h" |
| 17 #include "base/string16.h" | 18 #include "base/string16.h" |
| 18 #include "chrome/browser/dom_ui/web_ui_factory.h" | 19 #include "chrome/browser/dom_ui/web_ui_factory.h" |
| 19 #include "chrome/browser/download/save_package.h" | 20 #include "chrome/browser/download/save_package.h" |
| 20 #include "chrome/browser/extensions/image_loading_tracker.h" | 21 #include "chrome/browser/extensions/image_loading_tracker.h" |
| 21 #include "chrome/browser/fav_icon_helper.h" | 22 #include "chrome/browser/fav_icon_helper.h" |
| 22 #include "chrome/browser/prefs/pref_change_registrar.h" | 23 #include "chrome/browser/prefs/pref_change_registrar.h" |
| 23 #include "chrome/browser/renderer_host/render_view_host_delegate.h" | 24 #include "chrome/browser/renderer_host/render_view_host_delegate.h" |
| 24 #include "chrome/browser/tab_contents/constrained_window.h" | 25 #include "chrome/browser/tab_contents/constrained_window.h" |
| (...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 void OnInstallApplication(const WebApplicationInfo& info); | 777 void OnInstallApplication(const WebApplicationInfo& info); |
| 777 void OnPageContents(const GURL& url, | 778 void OnPageContents(const GURL& url, |
| 778 int32 page_id, | 779 int32 page_id, |
| 779 const string16& contents, | 780 const string16& contents, |
| 780 const std::string& language, | 781 const std::string& language, |
| 781 bool page_translatable); | 782 bool page_translatable); |
| 782 void OnPageTranslated(int32 page_id, | 783 void OnPageTranslated(int32 page_id, |
| 783 const std::string& original_lang, | 784 const std::string& original_lang, |
| 784 const std::string& translated_lang, | 785 const std::string& translated_lang, |
| 785 TranslateErrors::Type error_type); | 786 TranslateErrors::Type error_type); |
| 787 void OnRegisterProtocolHandler(const std::string& protocol, |
| 788 const GURL& url, |
| 789 const string16& title); |
| 786 void OnSetSuggestions(int32 page_id, | 790 void OnSetSuggestions(int32 page_id, |
| 787 const std::vector<std::string>& suggestions); | 791 const std::vector<std::string>& suggestions); |
| 788 void OnInstantSupportDetermined(int32 page_id, bool result); | 792 void OnInstantSupportDetermined(int32 page_id, bool result); |
| 789 void OnRunFileChooser(const ViewHostMsg_RunFileChooser_Params& params); | 793 void OnRunFileChooser(const ViewHostMsg_RunFileChooser_Params& params); |
| 790 | 794 |
| 791 // Changes the IsLoading state and notifies delegate as needed | 795 // Changes the IsLoading state and notifies delegate as needed |
| 792 // |details| is used to provide details on the load that just finished | 796 // |details| is used to provide details on the load that just finished |
| 793 // (but can be null if not applicable). Can be overridden. | 797 // (but can be null if not applicable). Can be overridden. |
| 794 void SetIsLoading(bool is_loading, | 798 void SetIsLoading(bool is_loading, |
| 795 LoadNotificationDetails* details); | 799 LoadNotificationDetails* details); |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 932 RenderViewHost* render_view_host, | 936 RenderViewHost* render_view_host, |
| 933 int32 page_id); | 937 int32 page_id); |
| 934 virtual void RequestOpenURL(const GURL& url, const GURL& referrer, | 938 virtual void RequestOpenURL(const GURL& url, const GURL& referrer, |
| 935 WindowOpenDisposition disposition); | 939 WindowOpenDisposition disposition); |
| 936 virtual void DomOperationResponse(const std::string& json_string, | 940 virtual void DomOperationResponse(const std::string& json_string, |
| 937 int automation_id); | 941 int automation_id); |
| 938 virtual void ProcessDOMUIMessage(const ViewHostMsg_DomMessage_Params& params); | 942 virtual void ProcessDOMUIMessage(const ViewHostMsg_DomMessage_Params& params); |
| 939 virtual void ProcessExternalHostMessage(const std::string& message, | 943 virtual void ProcessExternalHostMessage(const std::string& message, |
| 940 const std::string& origin, | 944 const std::string& origin, |
| 941 const std::string& target); | 945 const std::string& target); |
| 946 |
| 942 virtual void RunJavaScriptMessage(const std::wstring& message, | 947 virtual void RunJavaScriptMessage(const std::wstring& message, |
| 943 const std::wstring& default_prompt, | 948 const std::wstring& default_prompt, |
| 944 const GURL& frame_url, | 949 const GURL& frame_url, |
| 945 const int flags, | 950 const int flags, |
| 946 IPC::Message* reply_msg, | 951 IPC::Message* reply_msg, |
| 947 bool* did_suppress_message); | 952 bool* did_suppress_message); |
| 948 virtual void RunBeforeUnloadConfirm(const std::wstring& message, | 953 virtual void RunBeforeUnloadConfirm(const std::wstring& message, |
| 949 IPC::Message* reply_msg); | 954 IPC::Message* reply_msg); |
| 950 virtual void ShowModalHTMLDialog(const GURL& url, int width, int height, | 955 virtual void ShowModalHTMLDialog(const GURL& url, int width, int height, |
| 951 const std::string& json_arguments, | 956 const std::string& json_arguments, |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1247 ObserverList<TabContentsObserver> observers_; | 1252 ObserverList<TabContentsObserver> observers_; |
| 1248 | 1253 |
| 1249 // Content restrictions, used to disable print/copy etc based on content's | 1254 // Content restrictions, used to disable print/copy etc based on content's |
| 1250 // (full-page plugins for now only) permissions. | 1255 // (full-page plugins for now only) permissions. |
| 1251 int content_restrictions_; | 1256 int content_restrictions_; |
| 1252 | 1257 |
| 1253 DISALLOW_COPY_AND_ASSIGN(TabContents); | 1258 DISALLOW_COPY_AND_ASSIGN(TabContents); |
| 1254 }; | 1259 }; |
| 1255 | 1260 |
| 1256 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 1261 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
| OLD | NEW |