OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/printing/cloud_print/cloud_print_setup_flow.h" | 5 #include "chrome/browser/printing/cloud_print/cloud_print_setup_flow.h" |
6 | 6 |
7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
8 #include "base/singleton.h" | 8 #include "base/singleton.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "chrome/browser/service/service_process_control_manager.h" | 25 #include "chrome/browser/service/service_process_control_manager.h" |
26 #include "chrome/browser/tab_contents/tab_contents.h" | 26 #include "chrome/browser/tab_contents/tab_contents.h" |
27 #include "chrome/browser/ui/browser.h" | 27 #include "chrome/browser/ui/browser.h" |
28 #include "chrome/browser/ui/browser_dialogs.h" | 28 #include "chrome/browser/ui/browser_dialogs.h" |
29 #include "chrome/browser/ui/browser_window.h" | 29 #include "chrome/browser/ui/browser_window.h" |
30 #include "chrome/common/net/gaia/gaia_auth_fetcher.h" | 30 #include "chrome/common/net/gaia/gaia_auth_fetcher.h" |
31 #include "chrome/common/net/gaia/gaia_constants.h" | 31 #include "chrome/common/net/gaia/gaia_constants.h" |
32 #include "chrome/common/net/gaia/google_service_auth_error.h" | 32 #include "chrome/common/net/gaia/google_service_auth_error.h" |
33 #include "chrome/common/pref_names.h" | 33 #include "chrome/common/pref_names.h" |
34 #include "chrome/common/service_messages.h" | 34 #include "chrome/common/service_messages.h" |
35 #include "gfx/font.h" | |
36 #include "grit/chromium_strings.h" | 35 #include "grit/chromium_strings.h" |
37 #include "grit/locale_settings.h" | 36 #include "grit/locale_settings.h" |
38 #include "ui/base/l10n/l10n_font_util.h" | 37 #include "ui/base/l10n/l10n_font_util.h" |
| 38 #include "ui/gfx/font.h" |
39 | 39 |
40 static const wchar_t kGaiaLoginIFrameXPath[] = L"//iframe[@id='gaialogin']"; | 40 static const wchar_t kGaiaLoginIFrameXPath[] = L"//iframe[@id='gaialogin']"; |
41 static const wchar_t kDoneIframeXPath[] = L"//iframe[@id='setupdone']"; | 41 static const wchar_t kDoneIframeXPath[] = L"//iframe[@id='setupdone']"; |
42 | 42 |
43 //////////////////////////////////////////////////////////////////////////////// | 43 //////////////////////////////////////////////////////////////////////////////// |
44 // CloudPrintSetupFlow implementation. | 44 // CloudPrintSetupFlow implementation. |
45 | 45 |
46 // static | 46 // static |
47 CloudPrintSetupFlow* CloudPrintSetupFlow::OpenDialog( | 47 CloudPrintSetupFlow* CloudPrintSetupFlow::OpenDialog( |
48 Profile* profile, Delegate* delegate, gfx::NativeWindow parent_window) { | 48 Profile* profile, Delegate* delegate, gfx::NativeWindow parent_window) { |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 } | 287 } |
288 | 288 |
289 void CloudPrintSetupFlow::ExecuteJavascriptInIFrame( | 289 void CloudPrintSetupFlow::ExecuteJavascriptInIFrame( |
290 const std::wstring& iframe_xpath, | 290 const std::wstring& iframe_xpath, |
291 const std::wstring& js) { | 291 const std::wstring& js) { |
292 if (dom_ui_) { | 292 if (dom_ui_) { |
293 RenderViewHost* rvh = dom_ui_->tab_contents()->render_view_host(); | 293 RenderViewHost* rvh = dom_ui_->tab_contents()->render_view_host(); |
294 rvh->ExecuteJavascriptInWebFrame(iframe_xpath, js); | 294 rvh->ExecuteJavascriptInWebFrame(iframe_xpath, js); |
295 } | 295 } |
296 } | 296 } |
OLD | NEW |