summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/renderer_host/render_view_host.cc22
-rw-r--r--chrome/common/url_constants.cc1
-rw-r--r--chrome/common/url_constants.h1
3 files changed, 18 insertions, 6 deletions
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc
index 7fe1ce5..1d1117b 100644
--- a/chrome/browser/renderer_host/render_view_host.cc
+++ b/chrome/browser/renderer_host/render_view_host.cc
@@ -8,6 +8,7 @@
#include <utility>
#include <vector>
+#include "base/command_line.h"
#include "base/i18n/rtl.h"
#include "base/json/json_reader.h"
#include "base/stats_counters.h"
@@ -31,15 +32,16 @@
#include "chrome/browser/renderer_host/render_widget_host_view.h"
#include "chrome/browser/renderer_host/site_instance.h"
#include "chrome/common/bindings_policy.h"
+#include "chrome/common/chrome_constants.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/native_web_keyboard_event.h"
+#include "chrome/common/net/url_request_context_getter.h"
#include "chrome/common/notification_details.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/notification_type.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/render_messages_params.h"
#include "chrome/common/result_codes.h"
-#include "chrome/common/chrome_constants.h"
-#include "chrome/common/net/url_request_context_getter.h"
#include "chrome/common/thumbnail_score.h"
#include "chrome/common/translate_errors.h"
#include "chrome/common/url_constants.h"
@@ -1690,12 +1692,20 @@ void RenderViewHost::OnRemoveAutocompleteEntry(const string16& field_name,
}
void RenderViewHost::OnShowAutoFillDialog() {
- RenderViewHostDelegate::AutoFill* autofill_delegate =
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableTabbedOptions)) {
+ Browser* browser = BrowserList::GetLastActive();
+ if (!browser)
+ return;
+ browser->ShowOptionsTab(chrome::kAutoFillSubPage);
+ } else {
+ RenderViewHostDelegate::AutoFill* autofill_delegate =
delegate_->GetAutoFillDelegate();
- if (!autofill_delegate)
- return;
+ if (!autofill_delegate)
+ return;
- autofill_delegate->ShowAutoFillDialog();
+ autofill_delegate->ShowAutoFillDialog();
+ }
}
void RenderViewHost::OnFillAutoFillFormData(int query_id,
diff --git a/chrome/common/url_constants.cc b/chrome/common/url_constants.cc
index 5b31d9c..6a280ee 100644
--- a/chrome/common/url_constants.cc
+++ b/chrome/common/url_constants.cc
@@ -142,6 +142,7 @@ const char kDefaultOptionsSubPage[] = "";
const char kBrowserOptionsSubPage[] = "browser";
const char kPersonalOptionsSubPage[] = "personal";
const char kAdvancedOptionsSubPage[] = "advanced";
+const char kAutoFillSubPage[] = "autoFillOptions";
const char kSearchEnginesOptionsSubPage[] = "editSearchEngineOverlay";
const char kClearBrowserDataSubPage[] = "clearBrowserDataOverlay";
const char kImportDataSubPage[] = "importDataOverlay";
diff --git a/chrome/common/url_constants.h b/chrome/common/url_constants.h
index 5b3ce0b..ecde9ee 100644
--- a/chrome/common/url_constants.h
+++ b/chrome/common/url_constants.h
@@ -140,6 +140,7 @@ extern const char kDefaultOptionsSubPage[];
extern const char kBrowserOptionsSubPage[];
extern const char kPersonalOptionsSubPage[];
extern const char kAdvancedOptionsSubPage[];
+extern const char kAutoFillSubPage[];
extern const char kSearchEnginesOptionsSubPage[];
extern const char kClearBrowserDataSubPage[];
extern const char kImportDataSubPage[];