| 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/memory/singleton.h" | 8 #include "base/memory/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 21 matching lines...) Expand all Loading... |
| 32 #include "content/public/browser/browser_thread.h" | 32 #include "content/public/browser/browser_thread.h" |
| 33 #include "content/public/browser/web_contents.h" | 33 #include "content/public/browser/web_contents.h" |
| 34 #include "grit/chromium_strings.h" | 34 #include "grit/chromium_strings.h" |
| 35 #include "grit/locale_settings.h" | 35 #include "grit/locale_settings.h" |
| 36 #include "ui/base/l10n/l10n_font_util.h" | 36 #include "ui/base/l10n/l10n_font_util.h" |
| 37 #include "ui/gfx/font.h" | 37 #include "ui/gfx/font.h" |
| 38 | 38 |
| 39 using content::OpenURLParams; | 39 using content::OpenURLParams; |
| 40 using content::Referrer; | 40 using content::Referrer; |
| 41 using content::WebContents; | 41 using content::WebContents; |
| 42 using content::WebUIMessageHandler; |
| 42 | 43 |
| 43 namespace { | 44 namespace { |
| 44 | 45 |
| 45 string16 SetupIframeXPath() { | 46 string16 SetupIframeXPath() { |
| 46 return ASCIIToUTF16("//iframe[@id='cloudprintsetup']"); | 47 return ASCIIToUTF16("//iframe[@id='cloudprintsetup']"); |
| 47 } | 48 } |
| 48 | 49 |
| 49 string16 DoneIframeXPath() { | 50 string16 DoneIframeXPath() { |
| 50 return ASCIIToUTF16("//iframe[@id='setupdone']"); | 51 return ASCIIToUTF16("//iframe[@id='setupdone']"); |
| 51 } | 52 } |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 } | 335 } |
| 335 | 336 |
| 336 void CloudPrintSetupFlow::ExecuteJavascriptInIFrame( | 337 void CloudPrintSetupFlow::ExecuteJavascriptInIFrame( |
| 337 const string16& iframe_xpath, | 338 const string16& iframe_xpath, |
| 338 const string16& js) { | 339 const string16& js) { |
| 339 if (web_ui_) { | 340 if (web_ui_) { |
| 340 RenderViewHost* rvh = web_ui_->web_contents()->GetRenderViewHost(); | 341 RenderViewHost* rvh = web_ui_->web_contents()->GetRenderViewHost(); |
| 341 rvh->ExecuteJavascriptInWebFrame(iframe_xpath, js); | 342 rvh->ExecuteJavascriptInWebFrame(iframe_xpath, js); |
| 342 } | 343 } |
| 343 } | 344 } |
| OLD | NEW |