| 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/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 bool Shell::quit_message_loop_ = true; | 41 bool Shell::quit_message_loop_ = true; |
| 42 | 42 |
| 43 class Shell::DevToolsWebContentsObserver : public WebContentsObserver { | 43 class Shell::DevToolsWebContentsObserver : public WebContentsObserver { |
| 44 public: | 44 public: |
| 45 DevToolsWebContentsObserver(Shell* shell, WebContents* web_contents) | 45 DevToolsWebContentsObserver(Shell* shell, WebContents* web_contents) |
| 46 : WebContentsObserver(web_contents), | 46 : WebContentsObserver(web_contents), |
| 47 shell_(shell) { | 47 shell_(shell) { |
| 48 } | 48 } |
| 49 | 49 |
| 50 // WebContentsObserver | 50 // WebContentsObserver |
| 51 virtual void WebContentsDestroyed() override { | 51 void WebContentsDestroyed() override { |
| 52 shell_->OnDevToolsWebContentsDestroyed(); | 52 shell_->OnDevToolsWebContentsDestroyed(); |
| 53 } | 53 } |
| 54 | 54 |
| 55 private: | 55 private: |
| 56 Shell* shell_; | 56 Shell* shell_; |
| 57 | 57 |
| 58 DISALLOW_COPY_AND_ASSIGN(DevToolsWebContentsObserver); | 58 DISALLOW_COPY_AND_ASSIGN(DevToolsWebContentsObserver); |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 Shell::Shell(WebContents* web_contents) | 61 Shell::Shell(WebContents* web_contents) |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 devtools_frontend_->Activate(); | 400 devtools_frontend_->Activate(); |
| 401 devtools_frontend_->Focus(); | 401 devtools_frontend_->Focus(); |
| 402 } | 402 } |
| 403 | 403 |
| 404 void Shell::OnDevToolsWebContentsDestroyed() { | 404 void Shell::OnDevToolsWebContentsDestroyed() { |
| 405 devtools_observer_.reset(); | 405 devtools_observer_.reset(); |
| 406 devtools_frontend_ = NULL; | 406 devtools_frontend_ = NULL; |
| 407 } | 407 } |
| 408 | 408 |
| 409 } // namespace content | 409 } // namespace content |
| OLD | NEW |