| Index: chrome/common/temp_scaffolding_stubs.h
|
| ===================================================================
|
| --- chrome/common/temp_scaffolding_stubs.h (revision 8452)
|
| +++ chrome/common/temp_scaffolding_stubs.h (working copy)
|
| @@ -14,13 +14,20 @@
|
| #include "base/basictypes.h"
|
| #include "base/ref_counted.h"
|
| #include "chrome/browser/browser_process.h"
|
| +#include "chrome/browser/tab_contents/tab_contents_type.h"
|
| +#include "chrome/common/page_transition_types.h"
|
| +#include "googleurl/src/gurl.h"
|
| +#include "skia/include/SkBitmap.h"
|
| +#include "webkit/glue/window_open_disposition.h"
|
|
|
| class Browser;
|
| class CommandLine;
|
| class MetricsService;
|
| +class NavigationEntry;
|
| class ProfileManager;
|
| class Profile;
|
| class SessionID;
|
| +class TabContents;
|
| class URLRequestContext;
|
| class WebContents;
|
|
|
| @@ -223,11 +230,30 @@
|
| //---------------------------------------------------------------------------
|
| // These stubs are for Browser
|
|
|
| +class SavePackage {
|
| + public:
|
| + static bool IsSavableContents(const std::string& contents_mime_type) {
|
| + return false;
|
| + }
|
| + static bool IsSavableURL(const GURL& url) { return false; }
|
| +};
|
| +
|
| class LocationBarView {
|
| public:
|
| void ShowFirstRunBubble() { }
|
| };
|
|
|
| +class GoButton {
|
| + public:
|
| + typedef enum Mode { MODE_GO = 0, MODE_STOP };
|
| + void ChangeMode(Mode mode) { }
|
| +};
|
| +
|
| +class ToolbarStarToggle {
|
| + public:
|
| + void SetToggled(bool) { }
|
| +};
|
| +
|
| class DebuggerWindow : public base::RefCountedThreadSafe<DebuggerWindow> {
|
| public:
|
| };
|
| @@ -240,29 +266,76 @@
|
| public:
|
| };
|
|
|
| +class NavigationEntry {
|
| + public:
|
| + const GURL& url() const { return url_; }
|
| + private:
|
| + GURL url_;
|
| +};
|
| +
|
| class NavigationController {
|
| public:
|
| + NavigationController() : entry_(new NavigationEntry) { }
|
| + virtual ~NavigationController() { }
|
| + bool CanGoBack() const { return false; }
|
| + bool CanGoForward() const { return false; }
|
| + void GoBack() { }
|
| + void GoForward() { }
|
| + void Reload(bool) { }
|
| + TabContents* active_contents() const { return NULL; }
|
| + NavigationEntry* GetLastCommittedEntry() const { return entry_.get(); }
|
| + NavigationEntry* GetActiveEntry() const { return entry_.get(); }
|
| + void LoadURL(const GURL& url, const GURL& referrer,
|
| + PageTransition::Type type) { }
|
| + private:
|
| + scoped_ptr<NavigationEntry> entry_;
|
| };
|
|
|
| class TabContentsDelegate {
|
| public:
|
| + virtual void OpenURL(const GURL& url, const GURL& referrer,
|
| + WindowOpenDisposition disposition,
|
| + PageTransition::Type transition) { }
|
| };
|
|
|
| +class InterstitialPage {
|
| + public:
|
| + virtual void DontProceed() { }
|
| +};
|
| +
|
| class TabContents {
|
| public:
|
| TabContents() : controller_(new NavigationController) { }
|
| + virtual ~TabContents() { }
|
| NavigationController* controller() const { return controller_.get(); }
|
| - WebContents* AsWebContents() const { return NULL; }
|
| + virtual WebContents* AsWebContents() const { return NULL; }
|
| + virtual SkBitmap GetFavIcon() const { return SkBitmap(); }
|
| + const GURL& GetURL() const { return url_; }
|
| + virtual const std::wstring& GetTitle() const { return title_; }
|
| + TabContentsType type() const { return TAB_CONTENTS_WEB; }
|
| + virtual void Focus() { }
|
| private:
|
| + GURL url_;
|
| + std::wstring title_;
|
| scoped_ptr<NavigationController> controller_;
|
| };
|
|
|
| -// fake a tab strip, though it can't have any entries because the browser dtor
|
| -// checks.
|
| +class WebContents : public TabContents {
|
| + public:
|
| + WebContents* AsWebContents() { return this; }
|
| + bool showing_interstitial_page() const { return false; }
|
| + InterstitialPage* interstitial_page() const { return NULL; }
|
| + bool is_starred() const { return false; }
|
| + const std::string& contents_mime_type() const { return mime_type_; }
|
| + private:
|
| + std::string mime_type_;
|
| +};
|
| +
|
| +// fake a tab strip with one entry.
|
| class TabStripModel {
|
| public:
|
| TabStripModel(TabStripModelDelegate* delegate, Profile* profile)
|
| - : contents_(new TabContents) { }
|
| + : contents_(new WebContents) { }
|
| virtual ~TabStripModel() { }
|
| bool empty() const { return contents_.get() == NULL; }
|
| int count() const { return contents_.get() ? 1 : 0; }
|
|
|