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

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, 7 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
« no previous file with comments | « blimp/client/feature/navigation_feature_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 } 314 }
315 315
316 if (web_contents_ && web_contents_->GetRenderViewHost() && 316 if (web_contents_ && web_contents_->GetRenderViewHost() &&
317 web_contents_->GetRenderViewHost()->GetWidget()) { 317 web_contents_->GetRenderViewHost()->GetWidget()) {
318 web_contents_->GetRenderViewHost()->GetWidget()->WasResized(); 318 web_contents_->GetRenderViewHost()->GetWidget()->WasResized();
319 } 319 }
320 } 320 }
321 321
322 void BlimpEngineSession::LoadUrl(const int target_tab_id, const GURL& url) { 322 void BlimpEngineSession::LoadUrl(const int target_tab_id, const GURL& url) {
323 DVLOG(1) << "Load URL " << url << " in tab " << target_tab_id; 323 DVLOG(1) << "Load URL " << url << " in tab " << target_tab_id;
324 if (url.is_empty()) { 324 if (!url.is_valid()) {
325 VLOG(1) << "Dropping invalid URL " << url;
325 return; 326 return;
326 } 327 }
327 328
328 // TODO(dtrainor, haibinlu): Fix up the URL with url_fixer.h. If that doesn't 329 // TODO(dtrainor, haibinlu): Fix up the URL with url_fixer.h. If that doesn't
329 // produce a valid spec() then try to build a search query? 330 // produce a valid spec() then try to build a search query?
330 content::NavigationController::LoadURLParams params(url); 331 content::NavigationController::LoadURLParams params(url);
331 params.transition_type = ui::PageTransitionFromInt( 332 params.transition_type = ui::PageTransitionFromInt(
332 ui::PAGE_TRANSITION_TYPED | ui::PAGE_TRANSITION_FROM_ADDRESS_BAR); 333 ui::PAGE_TRANSITION_TYPED | ui::PAGE_TRANSITION_FROM_ADDRESS_BAR);
333 web_contents_->GetController().LoadURLWithParams(params); 334 web_contents_->GetController().LoadURLWithParams(params);
334 web_contents_->Focus(); 335 web_contents_->Focus();
(...skipping 269 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
« no previous file with comments | « blimp/client/feature/navigation_feature_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698