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

Side by Side Diff: content/browser/devtools/render_frame_devtools_agent_host.cc

Issue 1153793003: Add user_gesture param to WebContentsImpl::Activate Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update callers Created 5 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 | « no previous file | content/browser/renderer_host/render_view_host_delegate.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/devtools/render_frame_devtools_agent_host.h" 5 #include "content/browser/devtools/render_frame_devtools_agent_host.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "content/browser/child_process_security_policy_impl.h" 10 #include "content/browser/child_process_security_policy_impl.h"
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 GURL RenderFrameDevToolsAgentHost::GetURL() { 450 GURL RenderFrameDevToolsAgentHost::GetURL() {
451 WebContents* web_contents = GetWebContents(); 451 WebContents* web_contents = GetWebContents();
452 if (web_contents && !IsChildFrame()) 452 if (web_contents && !IsChildFrame())
453 return web_contents->GetVisibleURL(); 453 return web_contents->GetVisibleURL();
454 return render_frame_host_ ? 454 return render_frame_host_ ?
455 render_frame_host_->GetLastCommittedURL() : GURL(); 455 render_frame_host_->GetLastCommittedURL() : GURL();
456 } 456 }
457 457
458 bool RenderFrameDevToolsAgentHost::Activate() { 458 bool RenderFrameDevToolsAgentHost::Activate() {
459 if (render_frame_host_) { 459 if (render_frame_host_) {
460 render_frame_host_->GetRenderViewHost()->GetDelegate()->Activate(); 460 render_frame_host_->GetRenderViewHost()->GetDelegate()->Activate(
461 true /* user_gesture */);
461 return true; 462 return true;
462 } 463 }
463 return false; 464 return false;
464 } 465 }
465 466
466 bool RenderFrameDevToolsAgentHost::Close() { 467 bool RenderFrameDevToolsAgentHost::Close() {
467 if (web_contents()) { 468 if (web_contents()) {
468 web_contents()->ClosePage(); 469 web_contents()->ClosePage();
469 return true; 470 return true;
470 } 471 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 if (!IsAttached() || !render_frame_host_) 527 if (!IsAttached() || !render_frame_host_)
527 return; 528 return;
528 ProcessChunkedMessageFromAgent(message); 529 ProcessChunkedMessageFromAgent(message);
529 } 530 }
530 531
531 bool RenderFrameDevToolsAgentHost::IsChildFrame() { 532 bool RenderFrameDevToolsAgentHost::IsChildFrame() {
532 return render_frame_host_ && render_frame_host_->GetParent(); 533 return render_frame_host_ && render_frame_host_->GetParent();
533 } 534 }
534 535
535 } // namespace content 536 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_view_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698