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

Side by Side Diff: blimp/engine/session/blimp_engine_session.cc

Issue 1869783005: [Blimp Client] Fixes up URL before sending it to Engine. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "blimp/engine/session/blimp_engine_session.h" 5 #include "blimp/engine/session/blimp_engine_session.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 } 313 }
314 314
315 if (web_contents_ && web_contents_->GetRenderViewHost() && 315 if (web_contents_ && web_contents_->GetRenderViewHost() &&
316 web_contents_->GetRenderViewHost()->GetWidget()) { 316 web_contents_->GetRenderViewHost()->GetWidget()) {
317 web_contents_->GetRenderViewHost()->GetWidget()->WasResized(); 317 web_contents_->GetRenderViewHost()->GetWidget()->WasResized();
318 } 318 }
319 } 319 }
320 320
321 void BlimpEngineSession::LoadUrl(const int target_tab_id, const GURL& url) { 321 void BlimpEngineSession::LoadUrl(const int target_tab_id, const GURL& url) {
322 DVLOG(1) << "Load URL " << url << " in tab " << target_tab_id; 322 DVLOG(1) << "Load URL " << url << " in tab " << target_tab_id;
323 if (url.is_empty()) { 323 if (!url.is_valid()) {
324 VLOG(1) << "Dropping invalid URL " << url;
324 return; 325 return;
325 } 326 }
326 327
327 // TODO(dtrainor, haibinlu): Fix up the URL with url_fixer.h. If that doesn't 328 // TODO(dtrainor, haibinlu): Fix up the URL with url_fixer.h. If that doesn't
Kevin M 2016/04/07 20:12:30 Remove this comment
328 // produce a valid spec() then try to build a search query? 329 // produce a valid spec() then try to build a search query?
329 content::NavigationController::LoadURLParams params(url); 330 content::NavigationController::LoadURLParams params(url);
330 params.transition_type = ui::PageTransitionFromInt( 331 params.transition_type = ui::PageTransitionFromInt(
331 ui::PAGE_TRANSITION_TYPED | ui::PAGE_TRANSITION_FROM_ADDRESS_BAR); 332 ui::PAGE_TRANSITION_TYPED | ui::PAGE_TRANSITION_FROM_ADDRESS_BAR);
332 web_contents_->GetController().LoadURLWithParams(params); 333 web_contents_->GetController().LoadURLWithParams(params);
333 web_contents_->Focus(); 334 web_contents_->Focus();
334 } 335 }
335 336
336 void BlimpEngineSession::GoBack(const int target_tab_id) { 337 void BlimpEngineSession::GoBack(const int target_tab_id) {
337 DVLOG(1) << "Back in tab " << target_tab_id; 338 DVLOG(1) << "Back in tab " << target_tab_id;
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 605
605 aura::Window* parent = window_tree_host_->window(); 606 aura::Window* parent = window_tree_host_->window();
606 aura::Window* content = web_contents_->GetNativeView(); 607 aura::Window* content = web_contents_->GetNativeView();
607 if (!parent->Contains(content)) 608 if (!parent->Contains(content))
608 parent->AddChild(content); 609 parent->AddChild(content);
609 content->Show(); 610 content->Show();
610 } 611 }
611 612
612 } // namespace engine 613 } // namespace engine
613 } // namespace blimp 614 } // namespace blimp
OLDNEW
« blimp/client/feature/navigation_feature.cc ('K') | « blimp/client/feature/navigation_feature.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698