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

Side by Side Diff: webkit/glue/webview_impl.cc

Issue 19485: Chromium side of merge 40314:40364. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 months 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
« no previous file with comments | « webkit/glue/webframe_impl.cc ('k') | webkit/tools/layout_tests/test_lists/tests_fixable.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2007 Google Inc. All Rights Reserved. 2 * Copyright 2007 Google Inc. All Rights Reserved.
3 * 3 *
4 * Portions Copyright (C) 2006 Apple Computer, Inc. All rights reserved. 4 * Portions Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
5 * 5 *
6 * ***** BEGIN LICENSE BLOCK ***** 6 * ***** BEGIN LICENSE BLOCK *****
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
(...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1277 // Set the encoding of the current main frame to the one selected by 1277 // Set the encoding of the current main frame to the one selected by
1278 // a user in the encoding menu. 1278 // a user in the encoding menu.
1279 void WebViewImpl::SetPageEncoding(const std::wstring& encoding_name) { 1279 void WebViewImpl::SetPageEncoding(const std::wstring& encoding_name) {
1280 if (!page_.get()) 1280 if (!page_.get())
1281 return; 1281 return;
1282 1282
1283 if (!encoding_name.empty()) { 1283 if (!encoding_name.empty()) {
1284 // only change override encoding, don't change default encoding 1284 // only change override encoding, don't change default encoding
1285 // TODO(brettw) use std::string for encoding names. 1285 // TODO(brettw) use std::string for encoding names.
1286 String new_encoding_name(webkit_glue::StdWStringToString(encoding_name)); 1286 String new_encoding_name(webkit_glue::StdWStringToString(encoding_name));
1287 page_->mainFrame()->loader()->reloadAllowingStaleData(new_encoding_name); 1287 page_->mainFrame()->loader()->reloadWithOverrideEncoding(new_encoding_name);
1288 } 1288 }
1289 } 1289 }
1290 1290
1291 // Return the canonical encoding name of current main webframe in webview. 1291 // Return the canonical encoding name of current main webframe in webview.
1292 std::wstring WebViewImpl::GetMainFrameEncodingName() { 1292 std::wstring WebViewImpl::GetMainFrameEncodingName() {
1293 if (!page_.get()) 1293 if (!page_.get())
1294 return std::wstring(); 1294 return std::wstring();
1295 1295
1296 String encoding_name = page_->mainFrame()->loader()->encoding(); 1296 String encoding_name = page_->mainFrame()->loader()->encoding();
1297 return webkit_glue::StringToStdWString(encoding_name); 1297 return webkit_glue::StringToStdWString(encoding_name);
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
1628 Frame* frame = page_->focusController()->focusedFrame(); 1628 Frame* frame = page_->focusController()->focusedFrame();
1629 if (!frame) 1629 if (!frame)
1630 return NULL; 1630 return NULL;
1631 1631
1632 Document* document = frame->document(); 1632 Document* document = frame->document();
1633 if (!document) 1633 if (!document)
1634 return NULL; 1634 return NULL;
1635 1635
1636 return document->focusedNode(); 1636 return document->focusedNode();
1637 } 1637 }
OLDNEW
« no previous file with comments | « webkit/glue/webframe_impl.cc ('k') | webkit/tools/layout_tests/test_lists/tests_fixable.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698