| Index: content/browser/tab_contents/tab_contents.h
|
| ===================================================================
|
| --- content/browser/tab_contents/tab_contents.h (revision 80859)
|
| +++ content/browser/tab_contents/tab_contents.h (working copy)
|
| @@ -16,6 +16,7 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/string16.h"
|
| #include "chrome/browser/download/save_package.h"
|
| +#include "chrome/browser/favicon_helper.h"
|
| #include "chrome/browser/prefs/pref_change_registrar.h"
|
| #include "chrome/browser/tab_contents/tab_specific_content_settings.h"
|
| #include "chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h"
|
| @@ -171,6 +172,11 @@
|
| return view_.get();
|
| }
|
|
|
| + // Returns the FaviconHelper of this TabContents.
|
| + FaviconHelper& favicon_helper() {
|
| + return *favicon_helper_.get();
|
| + }
|
| +
|
| // Tab navigation state ------------------------------------------------------
|
|
|
| // Returns the current navigation properties, which if a navigation is
|
| @@ -199,6 +205,18 @@
|
| // the user is invited to type into it.
|
| virtual bool ShouldDisplayURL();
|
|
|
| + // Returns the favicon for this tab, or an isNull() bitmap if the tab does not
|
| + // have a favicon. The default implementation uses the current navigation
|
| + // entry.
|
| + SkBitmap GetFavicon() const;
|
| +
|
| + // Returns true if we are not using the default favicon.
|
| + bool FaviconIsValid() const;
|
| +
|
| + // Returns whether the favicon should be displayed. If this returns false, no
|
| + // space is provided for the favicon, and the favicon is never displayed.
|
| + virtual bool ShouldDisplayFavicon();
|
| +
|
| // Return whether this tab contents is loading a resource.
|
| bool is_loading() const { return is_loading_; }
|
|
|
| @@ -323,6 +341,9 @@
|
| const NavigationEntry::SSLStatus& ssl,
|
| bool show_history);
|
|
|
| + // Saves the favicon for the current page.
|
| + void SaveFavicon();
|
| +
|
| // Window management ---------------------------------------------------------
|
|
|
| // Create a new window constrained to this TabContents' clip and visibility.
|
| @@ -615,10 +636,6 @@
|
| // Query the WebUIFactory for the TypeID for the current URL.
|
| WebUI::TypeID GetWebUITypeForCurrentState();
|
|
|
| - // Returns the WebUI for the current state of the tab. This will either be
|
| - // the pending WebUI, the committed WebUI, or NULL.
|
| - WebUI* GetWebUIForCurrentState();
|
| -
|
| protected:
|
| friend class TabContentsObserver;
|
| friend class TabContentsObserver::Registrar;
|
| @@ -728,6 +745,10 @@
|
| void ExpireInfoBars(
|
| const NavigationController::LoadCommittedDetails& details);
|
|
|
| + // Returns the WebUI for the current state of the tab. This will either be
|
| + // the pending WebUI, the committed WebUI, or NULL.
|
| + WebUI* GetWebUIForCurrentState();
|
| +
|
| // Navigation helpers --------------------------------------------------------
|
| //
|
| // These functions are helpers for Navigate() and DidNavigate().
|
| @@ -953,6 +974,9 @@
|
| // Handles drag and drop event forwarding to extensions.
|
| BookmarkDrag* bookmark_drag_;
|
|
|
| + // Handles downloading favicons.
|
| + scoped_ptr<FaviconHelper> favicon_helper_;
|
| +
|
| // RenderViewHost::ContentSettingsDelegate.
|
| scoped_ptr<TabSpecificContentSettings> content_settings_delegate_;
|
|
|
| @@ -1038,6 +1062,10 @@
|
| // once.
|
| bool notify_disconnection_;
|
|
|
| + // Maps from handle to page_id.
|
| + typedef std::map<FaviconService::Handle, int32> HistoryRequestMap;
|
| + HistoryRequestMap history_requests_;
|
| +
|
| #if defined(OS_WIN)
|
| // Handle to an event that's set when the page is showing a message box (or
|
| // equivalent constrained window). Plugin processes check this to know if
|
|
|