Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: components/dom_distiller/content/distiller_page_web_contents.cc

Issue 107383002: Use base namespace for string16 in components and cloud_print. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "components/dom_distiller/content/distiller_page_web_contents.h" 5 #include "components/dom_distiller/content/distiller_page_web_contents.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "components/dom_distiller/core/distiller_page.h" 10 #include "components/dom_distiller/core/distiller_page.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 content::WebContentsObserver::Observe(web_contents_.get()); 45 content::WebContentsObserver::Observe(web_contents_.get());
46 content::NavigationController::LoadURLParams params(gurl); 46 content::NavigationController::LoadURLParams params(gurl);
47 web_contents_->GetController().LoadURLWithParams(params); 47 web_contents_->GetController().LoadURLWithParams(params);
48 } 48 }
49 49
50 void DistillerPageWebContents::ExecuteJavaScriptImpl( 50 void DistillerPageWebContents::ExecuteJavaScriptImpl(
51 const std::string& script) { 51 const std::string& script) {
52 content::RenderViewHost* host = web_contents_->GetRenderViewHost(); 52 content::RenderViewHost* host = web_contents_->GetRenderViewHost();
53 DCHECK(host); 53 DCHECK(host);
54 host->ExecuteJavascriptInWebFrameCallbackResult( 54 host->ExecuteJavascriptInWebFrameCallbackResult(
55 string16(), // frame_xpath 55 base::string16(), // frame_xpath
56 UTF8ToUTF16(script), 56 UTF8ToUTF16(script),
57 base::Bind(&DistillerPage::OnExecuteJavaScriptDone, 57 base::Bind(&DistillerPage::OnExecuteJavaScriptDone,
58 base::Unretained(this))); 58 base::Unretained(this)));
59 } 59 }
60 60
61 void DistillerPageWebContents::DidFinishLoad(int64 frame_id, 61 void DistillerPageWebContents::DidFinishLoad(int64 frame_id,
62 const GURL& validated_url, 62 const GURL& validated_url,
63 bool is_main_frame, 63 bool is_main_frame,
64 RenderViewHost* render_view_host) { 64 RenderViewHost* render_view_host) {
65 content::WebContentsObserver::Observe(NULL); 65 content::WebContentsObserver::Observe(NULL);
66 OnLoadURLDone(); 66 OnLoadURLDone();
67 } 67 }
68 void DistillerPageWebContents::DidFailLoad(int64 frame_id, 68 void DistillerPageWebContents::DidFailLoad(
69 const GURL& validated_url, 69 int64 frame_id,
70 bool is_main_frame, 70 const GURL& validated_url,
71 int error_code, 71 bool is_main_frame,
72 const string16& error_description, 72 int error_code,
73 RenderViewHost* render_view_host) { 73 const base::string16& error_description,
74 RenderViewHost* render_view_host) {
74 content::WebContentsObserver::Observe(NULL); 75 content::WebContentsObserver::Observe(NULL);
75 OnLoadURLFailed(); 76 OnLoadURLFailed();
76 } 77 }
77 78
78 } // namespace dom_distiller 79 } // namespace dom_distiller
OLDNEW
« no previous file with comments | « components/dom_distiller/content/distiller_page_web_contents.h ('k') | components/plugins/renderer/plugin_placeholder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698