Merge lp:~osomon/oxide/loadHtml into lp:~oxide-developers/oxide/oxide.trunk

Proposed by Olivier Tilloy
Status: Merged
Merged at revision: 560
Proposed branch: lp:~osomon/oxide/loadHtml
Merge into: lp:~oxide-developers/oxide/oxide.trunk
Diff against target: 0 lines
To merge this branch: bzr merge lp:~osomon/oxide/loadHtml
Reviewer Review Type Date Requested Status
Chris Coulson Approve
Review via email: mp+220391@code.launchpad.net

Commit message

Add a loadHtml slot to the QML webview.

To post a comment you must log in.
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Thanks, this looks pretty much fine.

+
+ content::NavigationController::LoadURLParams params((GURL(url)));
+ params.load_type = content::NavigationController::LOAD_TYPE_DATA;
+ params.base_url_for_data_url = baseUrl;
+ params.virtual_url_for_data_url = baseUrl.is_empty() ? GURL(content::kAboutBlankURL) : baseUrl;
+ params.can_load_local_resources = true;
+ web_contents_->GetController().LoadURLWithParams(params);

You're just missing the following:

params.override_user_agent = content::NavigationController::UA_OVERRIDE_TRUE;

With that, this is fine to merge

review: Approve
lp:~osomon/oxide/loadHtml updated
562. By Olivier Tilloy

Set override_user_agent on the load params.

Preview Diff

Empty

Subscribers

People subscribed via source and target branches