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

Side by Side Diff: extensions/browser/guest_view/web_view/web_view_guest.cc

Issue 1304373007: Browser test for LoadDataWithBaseURL reload (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reverts Created 5 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/guest_view/web_view/web_view_guest.h" 5 #include "extensions/browser/guest_view/web_view/web_view_guest.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "components/browsing_data/storage_partition_http_cache_data_remover.h" 10 #include "components/browsing_data/storage_partition_http_cache_data_remover.h"
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 } 782 }
783 783
784 WebViewGuest::~WebViewGuest() { 784 WebViewGuest::~WebViewGuest() {
785 } 785 }
786 786
787 void WebViewGuest::DidCommitProvisionalLoadForFrame( 787 void WebViewGuest::DidCommitProvisionalLoadForFrame(
788 content::RenderFrameHost* render_frame_host, 788 content::RenderFrameHost* render_frame_host,
789 const GURL& url, 789 const GURL& url,
790 ui::PageTransition transition_type) { 790 ui::PageTransition transition_type) {
791 if (!render_frame_host->GetParent()) { 791 if (!render_frame_host->GetParent()) {
792 src_ = url; 792 src_ = web_contents()->GetURL();
Charlie Reis 2015/11/24 00:22:59 nit: Add comment (so that this doesn't regress in
boliu 2015/11/24 19:03:25 Done.
793 // Handle a pending zoom if one exists. 793 // Handle a pending zoom if one exists.
794 if (pending_zoom_factor_) { 794 if (pending_zoom_factor_) {
795 SetZoom(pending_zoom_factor_); 795 SetZoom(pending_zoom_factor_);
796 pending_zoom_factor_ = 0.0; 796 pending_zoom_factor_ = 0.0;
797 } 797 }
798 } 798 }
799 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); 799 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue());
800 args->SetString(guest_view::kUrl, url.spec()); 800 args->SetString(guest_view::kUrl, src_.spec());
801 args->SetBoolean(guest_view::kIsTopLevel, !render_frame_host->GetParent()); 801 args->SetBoolean(guest_view::kIsTopLevel, !render_frame_host->GetParent());
802 args->SetString(webview::kInternalBaseURLForDataURL, 802 args->SetString(webview::kInternalBaseURLForDataURL,
803 web_contents() 803 web_contents()
804 ->GetController() 804 ->GetController()
805 .GetLastCommittedEntry() 805 .GetLastCommittedEntry()
806 ->GetBaseURLForDataURL() 806 ->GetBaseURLForDataURL()
807 .spec()); 807 .spec());
808 args->SetInteger(webview::kInternalCurrentEntryIndex, 808 args->SetInteger(webview::kInternalCurrentEntryIndex,
809 web_contents()->GetController().GetCurrentEntryIndex()); 809 web_contents()->GetController().GetCurrentEntryIndex());
810 args->SetInteger(webview::kInternalEntryCount, 810 args->SetInteger(webview::kInternalEntryCount,
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
1496 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); 1496 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue());
1497 DispatchEventToView( 1497 DispatchEventToView(
1498 new GuestViewEvent(webview::kEventExitFullscreen, args.Pass())); 1498 new GuestViewEvent(webview::kEventExitFullscreen, args.Pass()));
1499 } 1499 }
1500 // Since we changed fullscreen state, sending a Resize message ensures that 1500 // Since we changed fullscreen state, sending a Resize message ensures that
1501 // renderer/ sees the change. 1501 // renderer/ sees the change.
1502 web_contents()->GetRenderViewHost()->GetWidget()->WasResized(); 1502 web_contents()->GetRenderViewHost()->GetWidget()->WasResized();
1503 } 1503 }
1504 1504
1505 } // namespace extensions 1505 } // namespace extensions
OLDNEW
« content/renderer/render_frame_impl.cc ('K') | « content/renderer/render_frame_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698