diff options
author | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-18 15:37:29 +0000 |
---|---|---|
committer | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-18 15:37:29 +0000 |
commit | 425254cdc9b7ff515285250c30976858f0f17abf (patch) | |
tree | 2ed818bbc428ac09357f368f0d9084d64ef3717b /chrome/browser/web_contents.h | |
parent | a0e30833a5e0b0f32d28a64b36f2dd31cbe681be (diff) | |
download | chromium_src-425254cdc9b7ff515285250c30976858f0f17abf.zip chromium_src-425254cdc9b7ff515285250c30976858f0f17abf.tar.gz chromium_src-425254cdc9b7ff515285250c30976858f0f17abf.tar.bz2 |
Move more platform-specific stuff from WebContents to the view.
I refactored the way title setting is done since there were two parts that duplicated the logic and did so slightly differently.
I removed some old code in RendererGone whose premise is no longer valid and had the effect of creating a bug with no benefit.
I moved the sad tab view from WebContents to the view. Amusingly, the view was the only one using this, but it would go poke inside of the WebContents to get it.
Review URL: http://codereview.chromium.org/7650
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3601 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/web_contents.h')
-rw-r--r-- | chrome/browser/web_contents.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/chrome/browser/web_contents.h b/chrome/browser/web_contents.h index a58cf58..7a6de26 100644 --- a/chrome/browser/web_contents.h +++ b/chrome/browser/web_contents.h @@ -22,7 +22,6 @@ class PluginInstaller; class RenderViewHost; class RenderViewHostFactory; class RenderWidgetHost; -class SadTabView; class WebContentsView; // WebContents represents the contents of a tab that shows web pages. It embeds @@ -269,9 +268,6 @@ class WebContents : public TabContents, const GURL& image_url, bool errored, const SkBitmap& image); - virtual void ShowContextMenu(const ViewHostMsg_ContextMenu_Params& params); - virtual void StartDragging(const WebDropData& drop_data); - virtual void UpdateDragCursor(bool is_drop_target); virtual void RequestOpenURL(const GURL& url, WindowOpenDisposition disposition); virtual void DomOperationResponse(const std::string& json_string, @@ -292,7 +288,6 @@ class WebContents : public TabContents, const std::string& json_arguments, IPC::Message* reply_msg); virtual void PasswordFormsSeen(const std::vector<PasswordForm>& forms); - virtual void TakeFocus(bool reverse); virtual void PageHasOSDD(RenderViewHost* render_view_host, int32 page_id, const GURL& url, bool autodetected); virtual void InspectElementReply(int num_resources); @@ -323,9 +318,6 @@ class WebContents : public TabContents, const webkit_glue::WebApplicationInfo& info); virtual void OnEnterOrSpace(); - // Stupid render view host view pass-throughs. - virtual void HandleKeyboardEvent(const WebKeyboardEvent& event); - // SelectFileDialog::Listener ------------------------------------------------ virtual void FileSelected(const std::wstring& path, void* params); @@ -453,6 +445,16 @@ class WebContents : public TabContents, virtual void UpdateHistoryForNavigation(const GURL& display_url, const ViewHostMsg_FrameNavigate_Params& params); + // Saves the given title to the navigation entry and does associated work. It + // will update history and the view for the new title, and also synthesize + // titles for file URLs that have none (so we require that the URL of the + // entry already be set). + // + // This is used as the backend for state updates, which include a new title, + // or the dedicated set title message. It returns true if the new title is + // different and was therefore updated. + bool UpdateTitleForEntry(NavigationEntry* entry, const std::wstring& title); + // Misc non-view stuff ------------------------------------------------------- // Helper functions for sending notifications. @@ -496,8 +498,10 @@ class WebContents : public TabContents, TimeTicks current_load_start_; // Whether we have a (non-empty) title for the current page. - // Used to prevent subsequent title updates from affecting history. - bool has_page_title_; + // Used to prevent subsequent title updates from affecting history. This + // prevents some weirdness because some AJAXy apps use titles for status + // messages. + bool received_page_title_; // SavePackage, lazily created. scoped_refptr<SavePackage> save_package_; @@ -524,10 +528,6 @@ class WebContents : public TabContents, // PluginInstaller, lazily created. scoped_ptr<PluginInstaller> plugin_installer_; - // The SadTab renderer. - // TODO(brettw) move into WebContentsView*. - scoped_ptr<SadTabView> sad_tab_; - // Handles downloading favicons. FavIconHelper fav_icon_helper_; |