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

Side by Side Diff: content/shell/browser/shell.cc

Issue 1153813003: Add user_gesture param to WebContentsDelegate::ActivateContents Base URL: https://chromium.googlesource.com/chromium/src.git@ug1_WebContentsImpl_Activate
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 | « content/shell/browser/shell.h ('k') | content/shell/browser/shell_devtools_frontend.cc » ('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 "content/shell/browser/shell.h" 5 #include "content/shell/browser/shell.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 switches::kRunLayoutTest); 365 switches::kRunLayoutTest);
366 } 366 }
367 367
368 void Shell::RendererUnresponsive(WebContents* source) { 368 void Shell::RendererUnresponsive(WebContents* source) {
369 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( 369 if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
370 switches::kRunLayoutTest)) 370 switches::kRunLayoutTest))
371 return; 371 return;
372 BlinkTestController::Get()->RendererUnresponsive(); 372 BlinkTestController::Get()->RendererUnresponsive();
373 } 373 }
374 374
375 void Shell::ActivateContents(WebContents* contents) { 375 void Shell::ActivateContents(WebContents* contents, bool user_gesture) {
376 contents->GetRenderViewHost()->Focus(); 376 contents->GetRenderViewHost()->Focus();
377 } 377 }
378 378
379 void Shell::DeactivateContents(WebContents* contents) { 379 void Shell::DeactivateContents(WebContents* contents) {
380 contents->GetRenderViewHost()->Blur(); 380 contents->GetRenderViewHost()->Blur();
381 } 381 }
382 382
383 void Shell::WorkerCrashed(WebContents* source) { 383 void Shell::WorkerCrashed(WebContents* source) {
384 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( 384 if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
385 switches::kRunLayoutTest)) 385 switches::kRunLayoutTest))
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 devtools_frontend_->Activate(); 424 devtools_frontend_->Activate();
425 devtools_frontend_->Focus(); 425 devtools_frontend_->Focus();
426 } 426 }
427 427
428 void Shell::OnDevToolsWebContentsDestroyed() { 428 void Shell::OnDevToolsWebContentsDestroyed() {
429 devtools_observer_.reset(); 429 devtools_observer_.reset();
430 devtools_frontend_ = NULL; 430 devtools_frontend_ = NULL;
431 } 431 }
432 432
433 } // namespace content 433 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/shell.h ('k') | content/shell/browser/shell_devtools_frontend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698