OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h" | 5 #include "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "apps/app_window.h" | |
12 #include "apps/app_window_registry.h" | |
13 #include "base/base64.h" | 11 #include "base/base64.h" |
14 #include "base/bind.h" | 12 #include "base/bind.h" |
15 #include "base/bind_helpers.h" | 13 #include "base/bind_helpers.h" |
16 #include "base/i18n/case_conversion.h" | 14 #include "base/i18n/case_conversion.h" |
17 #include "base/i18n/rtl.h" | 15 #include "base/i18n/rtl.h" |
18 #include "base/logging.h" | 16 #include "base/logging.h" |
19 #include "base/prefs/pref_registry_simple.h" | 17 #include "base/prefs/pref_registry_simple.h" |
20 #include "base/prefs/pref_service.h" | 18 #include "base/prefs/pref_service.h" |
21 #include "base/prefs/scoped_user_pref_update.h" | 19 #include "base/prefs/scoped_user_pref_update.h" |
22 #include "base/rand_util.h" | 20 #include "base/rand_util.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 #include "content/public/browser/browser_thread.h" | 68 #include "content/public/browser/browser_thread.h" |
71 #include "content/public/browser/geolocation_provider.h" | 69 #include "content/public/browser/geolocation_provider.h" |
72 #include "content/public/browser/navigation_controller.h" | 70 #include "content/public/browser/navigation_controller.h" |
73 #include "content/public/browser/navigation_details.h" | 71 #include "content/public/browser/navigation_details.h" |
74 #include "content/public/browser/navigation_entry.h" | 72 #include "content/public/browser/navigation_entry.h" |
75 #include "content/public/browser/notification_service.h" | 73 #include "content/public/browser/notification_service.h" |
76 #include "content/public/browser/notification_types.h" | 74 #include "content/public/browser/notification_types.h" |
77 #include "content/public/browser/render_view_host.h" | 75 #include "content/public/browser/render_view_host.h" |
78 #include "content/public/browser/web_contents.h" | 76 #include "content/public/browser/web_contents.h" |
79 #include "content/public/common/url_constants.h" | 77 #include "content/public/common/url_constants.h" |
| 78 #include "extensions/browser/app_window/app_window.h" |
| 79 #include "extensions/browser/app_window/app_window_registry.h" |
80 #include "extensions/browser/app_window/native_app_window.h" | 80 #include "extensions/browser/app_window/native_app_window.h" |
81 #include "grit/component_scaled_resources.h" | 81 #include "grit/component_scaled_resources.h" |
82 #include "grit/components_strings.h" | 82 #include "grit/components_strings.h" |
83 #include "grit/platform_locale_settings.h" | 83 #include "grit/platform_locale_settings.h" |
84 #include "grit/theme_resources.h" | 84 #include "grit/theme_resources.h" |
85 #include "net/cert/cert_status_flags.h" | 85 #include "net/cert/cert_status_flags.h" |
86 #include "third_party/libaddressinput/chromium/chrome_metadata_source.h" | 86 #include "third_party/libaddressinput/chromium/chrome_metadata_source.h" |
87 #include "third_party/libaddressinput/chromium/chrome_storage_impl.h" | 87 #include "third_party/libaddressinput/chromium/chrome_storage_impl.h" |
88 #include "third_party/libaddressinput/messages.h" | 88 #include "third_party/libaddressinput/messages.h" |
89 #include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_da
ta.h" | 89 #include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_da
ta.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 // Returns the containing window for the given |web_contents|. The containing | 250 // Returns the containing window for the given |web_contents|. The containing |
251 // window might be a browser window for a Chrome tab, or it might be an app | 251 // window might be a browser window for a Chrome tab, or it might be an app |
252 // window for a platform app. | 252 // window for a platform app. |
253 ui::BaseWindow* GetBaseWindowForWebContents( | 253 ui::BaseWindow* GetBaseWindowForWebContents( |
254 content::WebContents* web_contents) { | 254 content::WebContents* web_contents) { |
255 Browser* browser = chrome::FindBrowserWithWebContents(web_contents); | 255 Browser* browser = chrome::FindBrowserWithWebContents(web_contents); |
256 if (browser) | 256 if (browser) |
257 return browser->window(); | 257 return browser->window(); |
258 | 258 |
259 gfx::NativeWindow native_window = web_contents->GetTopLevelNativeWindow(); | 259 gfx::NativeWindow native_window = web_contents->GetTopLevelNativeWindow(); |
260 apps::AppWindow* app_window = | 260 extensions::AppWindow* app_window = |
261 apps::AppWindowRegistry::GetAppWindowForNativeWindowAnyProfile( | 261 extensions::AppWindowRegistry::GetAppWindowForNativeWindowAnyProfile( |
262 native_window); | 262 native_window); |
263 return app_window->GetBaseWindow(); | 263 return app_window->GetBaseWindow(); |
264 } | 264 } |
265 | 265 |
266 // Returns a string descriptor for a DialogSection, for use with prefs (do not | 266 // Returns a string descriptor for a DialogSection, for use with prefs (do not |
267 // change these values). | 267 // change these values). |
268 std::string SectionToPrefString(DialogSection section) { | 268 std::string SectionToPrefString(DialogSection section) { |
269 switch (section) { | 269 switch (section) { |
270 case SECTION_CC: | 270 case SECTION_CC: |
271 return "cc"; | 271 return "cc"; |
(...skipping 3885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4157 view_->UpdateButtonStrip(); | 4157 view_->UpdateButtonStrip(); |
4158 } | 4158 } |
4159 | 4159 |
4160 void AutofillDialogControllerImpl::FetchWalletCookie() { | 4160 void AutofillDialogControllerImpl::FetchWalletCookie() { |
4161 net::URLRequestContextGetter* request_context = profile_->GetRequestContext(); | 4161 net::URLRequestContextGetter* request_context = profile_->GetRequestContext(); |
4162 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context)); | 4162 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context)); |
4163 signin_helper_->StartWalletCookieValueFetch(); | 4163 signin_helper_->StartWalletCookieValueFetch(); |
4164 } | 4164 } |
4165 | 4165 |
4166 } // namespace autofill | 4166 } // namespace autofill |
OLD | NEW |