OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |