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

Side by Side Diff: content/browser/web_contents/web_contents_impl_browsertest.cc

Issue 2541063002: Revert of Remove about:srcdoc url conversion. (Closed)
Patch Set: Created 4 years 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 | « content/browser/web_contents/web_contents_impl.cc ('k') | content/common/frame_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/macros.h" 5 #include "base/macros.h"
6 #include "base/run_loop.h" 6 #include "base/run_loop.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "content/browser/frame_host/navigation_entry_impl.h" 10 #include "content/browser/frame_host/navigation_entry_impl.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 : WebContentsObserver(shell->web_contents()), 151 : WebContentsObserver(shell->web_contents()),
152 shell_(shell), 152 shell_(shell),
153 wcv_new_size_(wcv_new_size) { 153 wcv_new_size_(wcv_new_size) {
154 } 154 }
155 155
156 // WebContentsObserver: 156 // WebContentsObserver:
157 void RenderViewCreated(RenderViewHost* rvh) override { 157 void RenderViewCreated(RenderViewHost* rvh) override {
158 rwhv_create_size_ = rvh->GetWidget()->GetView()->GetViewBounds().size(); 158 rwhv_create_size_ = rvh->GetWidget()->GetView()->GetViewBounds().size();
159 } 159 }
160 160
161 void DidStartProvisionalLoadForFrame(RenderFrameHost* render_frame_host, 161 void DidStartProvisionalLoadForFrame(
162 const GURL& url, 162 RenderFrameHost* render_frame_host,
163 bool is_error_page) override { 163 const GURL& url,
164 bool is_error_page,
165 bool is_iframe_srcdoc) override {
164 ResizeWebContentsView(shell_, wcv_new_size_, false); 166 ResizeWebContentsView(shell_, wcv_new_size_, false);
165 } 167 }
166 168
167 gfx::Size rwhv_create_size() const { return rwhv_create_size_; } 169 gfx::Size rwhv_create_size() const { return rwhv_create_size_; }
168 170
169 private: 171 private:
170 Shell* shell_; // Weak ptr. 172 Shell* shell_; // Weak ptr.
171 gfx::Size wcv_new_size_; 173 gfx::Size wcv_new_size_;
172 gfx::Size rwhv_create_size_; 174 gfx::Size rwhv_create_size_;
173 }; 175 };
(...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1296 // Make sure the WebContents cleaned up the previous pending request. A new 1298 // Make sure the WebContents cleaned up the previous pending request. A new
1297 // request should be forwarded to the WebContentsDelegate. 1299 // request should be forwarded to the WebContentsDelegate.
1298 delegate.get()->request_to_lock_mouse_called_ = false; 1300 delegate.get()->request_to_lock_mouse_called_ = false;
1299 ASSERT_TRUE(ExecuteScript(shell(), 1301 ASSERT_TRUE(ExecuteScript(shell(),
1300 "window.domAutomationController.send(document.body." 1302 "window.domAutomationController.send(document.body."
1301 "requestPointerLock());")); 1303 "requestPointerLock());"));
1302 EXPECT_TRUE(delegate.get()->request_to_lock_mouse_called_); 1304 EXPECT_TRUE(delegate.get()->request_to_lock_mouse_called_);
1303 } 1305 }
1304 1306
1305 } // namespace content 1307 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698