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 28 matching lines...) Expand all Loading... |
39 bool Shell::quit_message_loop_ = true; | 39 bool Shell::quit_message_loop_ = true; |
40 | 40 |
41 class Shell::DevToolsWebContentsObserver : public WebContentsObserver { | 41 class Shell::DevToolsWebContentsObserver : public WebContentsObserver { |
42 public: | 42 public: |
43 DevToolsWebContentsObserver(Shell* shell, WebContents* web_contents) | 43 DevToolsWebContentsObserver(Shell* shell, WebContents* web_contents) |
44 : WebContentsObserver(web_contents), | 44 : WebContentsObserver(web_contents), |
45 shell_(shell) { | 45 shell_(shell) { |
46 } | 46 } |
47 | 47 |
48 // WebContentsObserver | 48 // WebContentsObserver |
49 virtual void WebContentsDestroyed() OVERRIDE { | 49 virtual void WebContentsDestroyed() override { |
50 shell_->OnDevToolsWebContentsDestroyed(); | 50 shell_->OnDevToolsWebContentsDestroyed(); |
51 } | 51 } |
52 | 52 |
53 private: | 53 private: |
54 Shell* shell_; | 54 Shell* shell_; |
55 | 55 |
56 DISALLOW_COPY_AND_ASSIGN(DevToolsWebContentsObserver); | 56 DISALLOW_COPY_AND_ASSIGN(DevToolsWebContentsObserver); |
57 }; | 57 }; |
58 | 58 |
59 Shell::Shell(WebContents* web_contents) | 59 Shell::Shell(WebContents* web_contents) |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 devtools_frontend_->Activate(); | 389 devtools_frontend_->Activate(); |
390 devtools_frontend_->Focus(); | 390 devtools_frontend_->Focus(); |
391 } | 391 } |
392 | 392 |
393 void Shell::OnDevToolsWebContentsDestroyed() { | 393 void Shell::OnDevToolsWebContentsDestroyed() { |
394 devtools_observer_.reset(); | 394 devtools_observer_.reset(); |
395 devtools_frontend_ = NULL; | 395 devtools_frontend_ = NULL; |
396 } | 396 } |
397 | 397 |
398 } // namespace content | 398 } // namespace content |
OLD | NEW |