Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(599)

Side by Side Diff: chrome/browser/tab_contents/tab_contents.h

Issue 126137: Part 1 of merging Extensions and DOMUI (Closed)
Patch Set: add test and rebase Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 10 matching lines...) Expand all
21 #include "chrome/browser/download/save_package.h" 21 #include "chrome/browser/download/save_package.h"
22 #include "chrome/browser/fav_icon_helper.h" 22 #include "chrome/browser/fav_icon_helper.h"
23 #include "chrome/browser/find_notification_details.h" 23 #include "chrome/browser/find_notification_details.h"
24 #include "chrome/browser/shell_dialogs.h" 24 #include "chrome/browser/shell_dialogs.h"
25 #include "chrome/browser/renderer_host/render_view_host_delegate.h" 25 #include "chrome/browser/renderer_host/render_view_host_delegate.h"
26 #include "chrome/browser/renderer_host/render_view_host_manager.h" 26 #include "chrome/browser/renderer_host/render_view_host_manager.h"
27 #include "chrome/browser/tab_contents/constrained_window.h" 27 #include "chrome/browser/tab_contents/constrained_window.h"
28 #include "chrome/browser/tab_contents/infobar_delegate.h" 28 #include "chrome/browser/tab_contents/infobar_delegate.h"
29 #include "chrome/browser/tab_contents/navigation_controller.h" 29 #include "chrome/browser/tab_contents/navigation_controller.h"
30 #include "chrome/browser/tab_contents/page_navigator.h" 30 #include "chrome/browser/tab_contents/page_navigator.h"
31 #include "chrome/common/url_constants.h"
31 #include "chrome/common/gears_api.h" 32 #include "chrome/common/gears_api.h"
32 #include "chrome/common/navigation_types.h" 33 #include "chrome/common/navigation_types.h"
33 #include "chrome/common/notification_registrar.h" 34 #include "chrome/common/notification_registrar.h"
34 #include "chrome/common/property_bag.h" 35 #include "chrome/common/property_bag.h"
35 #include "chrome/common/renderer_preferences.h" 36 #include "chrome/common/renderer_preferences.h"
36 #include "net/base/load_states.h" 37 #include "net/base/load_states.h"
37 #include "webkit/glue/password_form.h" 38 #include "webkit/glue/password_form.h"
38 #include "webkit/glue/webpreferences.h" 39 #include "webkit/glue/webpreferences.h"
39 40
40 #if defined(OS_MACOSX) || defined(OS_LINUX) 41 #if defined(OS_MACOSX) || defined(OS_LINUX)
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // Returns the user profile associated with this TabContents (via the 136 // Returns the user profile associated with this TabContents (via the
136 // NavigationController). 137 // NavigationController).
137 Profile* profile() const { return controller_.profile(); } 138 Profile* profile() const { return controller_.profile(); }
138 139
139 // Returns whether this tab contents supports the provided URL.This method 140 // Returns whether this tab contents supports the provided URL.This method
140 // matches the tab contents type with the result of TypeForURL(). |url| points 141 // matches the tab contents type with the result of TypeForURL(). |url| points
141 // to the actual URL that will be used. It can be modified as needed. 142 // to the actual URL that will be used. It can be modified as needed.
142 bool SupportsURL(GURL* url); 143 bool SupportsURL(GURL* url);
143 144
144 // Returns true if contains content rendered by an extension. 145 // Returns true if contains content rendered by an extension.
145 bool HostsExtension() const { 146 const bool HostsExtension() const {
146 return render_view_host()->extension_function_dispatcher() != NULL; 147 return GetURL().SchemeIs(chrome::kExtensionScheme);
147 } 148 }
148 149
149 // Returns the AutofillManager, creating it if necessary. 150 // Returns the AutofillManager, creating it if necessary.
150 AutofillManager* GetAutofillManager(); 151 AutofillManager* GetAutofillManager();
151 152
152 // Returns the PasswordManager, creating it if necessary. 153 // Returns the PasswordManager, creating it if necessary.
153 PasswordManager* GetPasswordManager(); 154 PasswordManager* GetPasswordManager();
154 155
155 // Returns the PluginInstaller, creating it if necessary. 156 // Returns the PluginInstaller, creating it if necessary.
156 PluginInstaller* GetPluginInstaller(); 157 PluginInstaller* GetPluginInstaller();
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 726
726 // If params has a searchable form, this tries to create a new keyword. 727 // If params has a searchable form, this tries to create a new keyword.
727 void GenerateKeywordIfNecessary( 728 void GenerateKeywordIfNecessary(
728 const ViewHostMsg_FrameNavigate_Params& params); 729 const ViewHostMsg_FrameNavigate_Params& params);
729 730
730 // RenderViewHostDelegate ---------------------------------------------------- 731 // RenderViewHostDelegate ----------------------------------------------------
731 732
732 virtual RendererPreferences GetRendererPrefs() const; 733 virtual RendererPreferences GetRendererPrefs() const;
733 virtual RenderViewHostDelegate::View* GetViewDelegate() const; 734 virtual RenderViewHostDelegate::View* GetViewDelegate() const;
734 virtual RenderViewHostDelegate::Save* GetSaveDelegate() const; 735 virtual RenderViewHostDelegate::Save* GetSaveDelegate() const;
735 virtual ExtensionFunctionDispatcher *CreateExtensionFunctionDispatcher(
736 RenderViewHost* render_view_host,
737 const std::string& extension_id);
738 virtual TabContents* GetAsTabContents(); 736 virtual TabContents* GetAsTabContents();
739 virtual void RenderViewCreated(RenderViewHost* render_view_host); 737 virtual void RenderViewCreated(RenderViewHost* render_view_host);
740 virtual void RenderViewReady(RenderViewHost* render_view_host); 738 virtual void RenderViewReady(RenderViewHost* render_view_host);
741 virtual void RenderViewGone(RenderViewHost* render_view_host); 739 virtual void RenderViewGone(RenderViewHost* render_view_host);
742 virtual void DidNavigate(RenderViewHost* render_view_host, 740 virtual void DidNavigate(RenderViewHost* render_view_host,
743 const ViewHostMsg_FrameNavigate_Params& params); 741 const ViewHostMsg_FrameNavigate_Params& params);
744 virtual void UpdateState(RenderViewHost* render_view_host, 742 virtual void UpdateState(RenderViewHost* render_view_host,
745 int32 page_id, 743 int32 page_id,
746 const std::string& state); 744 const std::string& state);
747 virtual void UpdateTitle(RenderViewHost* render_view_host, 745 virtual void UpdateTitle(RenderViewHost* render_view_host,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 virtual void DidDownloadImage(RenderViewHost* render_view_host, 778 virtual void DidDownloadImage(RenderViewHost* render_view_host,
781 int id, 779 int id,
782 const GURL& image_url, 780 const GURL& image_url,
783 bool errored, 781 bool errored,
784 const SkBitmap& image); 782 const SkBitmap& image);
785 virtual void RequestOpenURL(const GURL& url, const GURL& referrer, 783 virtual void RequestOpenURL(const GURL& url, const GURL& referrer,
786 WindowOpenDisposition disposition); 784 WindowOpenDisposition disposition);
787 virtual void DomOperationResponse(const std::string& json_string, 785 virtual void DomOperationResponse(const std::string& json_string,
788 int automation_id); 786 int automation_id);
789 virtual void ProcessDOMUIMessage(const std::string& message, 787 virtual void ProcessDOMUIMessage(const std::string& message,
790 const std::string& content); 788 const std::string& content,
789 int request_id,
790 bool has_callback);
791 virtual void DocumentLoadedInFrame(); 791 virtual void DocumentLoadedInFrame();
792 virtual void ProcessExternalHostMessage(const std::string& message, 792 virtual void ProcessExternalHostMessage(const std::string& message,
793 const std::string& origin, 793 const std::string& origin,
794 const std::string& target); 794 const std::string& target);
795 virtual void GoToEntryAtOffset(int offset); 795 virtual void GoToEntryAtOffset(int offset);
796 virtual void GetHistoryListCount(int* back_list_count, 796 virtual void GetHistoryListCount(int* back_list_count,
797 int* forward_list_count); 797 int* forward_list_count);
798 virtual void RunFileChooser(bool multiple_files, 798 virtual void RunFileChooser(bool multiple_files,
799 const string16& title, 799 const string16& title,
800 const FilePath& default_file); 800 const FilePath& default_file);
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 // True if the user has decided to block future javascript messages. This is 1071 // True if the user has decided to block future javascript messages. This is
1072 // reset on navigations to false on navigations. 1072 // reset on navigations to false on navigations.
1073 bool suppress_javascript_messages_; 1073 bool suppress_javascript_messages_;
1074 1074
1075 // --------------------------------------------------------------------------- 1075 // ---------------------------------------------------------------------------
1076 1076
1077 DISALLOW_COPY_AND_ASSIGN(TabContents); 1077 DISALLOW_COPY_AND_ASSIGN(TabContents);
1078 }; 1078 };
1079 1079
1080 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ 1080 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/interstitial_page.cc ('k') | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698