summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-08-06 12:08:59 +0100
committerBen Murdoch <benm@google.com>2010-09-13 15:04:09 +0100
commit7d214dfa174224b459660971e5b5cce2e06be02a (patch)
tree8bf36887488cddf26cb43e0394ba35972b5cfefa /chrome/browser/tab_contents
parentf74420b3285b9fe04a7e00aa3b8c0ab07ea344bc (diff)
downloadexternal_chromium-7d214dfa174224b459660971e5b5cce2e06be02a.zip
external_chromium-7d214dfa174224b459660971e5b5cce2e06be02a.tar.gz
external_chromium-7d214dfa174224b459660971e5b5cce2e06be02a.tar.bz2
Intial set of changes to enable autofill on Android.
This is the initial checkin of AutoFill code into external/chromium. There's still lots to do, but this basically gets autofill working end to end, using a precanned profile injected from WebCore. By default, autofill is not enabled at the moment. For testing you can turn it on by setting the ENABLE_AUTOFILL environment variable to "true" and rebuilding. There is a corresponding change in external/webkit. Change-Id: I74ef1ccc3fd0625f1bb8e2f85b43a60d23c59ffc
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/tab_contents.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h
index 31ccc12..a3e5917 100644
--- a/chrome/browser/tab_contents/tab_contents.h
+++ b/chrome/browser/tab_contents/tab_contents.h
@@ -5,6 +5,36 @@
#ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_
#define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_
+#ifdef ANDROID
+#include "chrome/browser/profile.h"
+#include "chrome/browser/autofill/autofill_host.h"
+
+// Autofill does not need the entire TabContents class, just
+// access to the RenderViewHost and Profile. Later it would
+// be nice to create a small class that contains just this
+// data for AutoFill. Then Android won't care about this
+// file which as it stands does not compile for us.
+class RenderViewHost;
+
+class TabContents {
+public:
+ TabContents()
+ : profile_(ProfileImplAndroid::CreateProfile(FilePath()))
+ , autofill_host_(NULL)
+ {
+ }
+
+ Profile* profile() { return profile_; }
+ AutoFillHost* autofill_host() { return autofill_host_; }
+ void SetAutoFillHost(AutoFillHost* autofill_host) { autofill_host_ = autofill_host; }
+
+private:
+ Profile* profile_;
+ AutoFillHost* autofill_host_;
+};
+
+#else
+
#include "build/build_config.h"
#include <deque>
@@ -1277,4 +1307,6 @@ class TabContents : public PageNavigator,
DISALLOW_COPY_AND_ASSIGN(TabContents);
};
+#endif // !ANDROID
+
#endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_