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

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

Issue 257153003: We have a problem in the process on destroying WebContentsImpl because (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Rebased onto origin/lkgr Created 6 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
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/path_service.h" 10 #include "base/path_service.h"
(...skipping 29 matching lines...) Expand all
40 bool Shell::quit_message_loop_ = true; 40 bool Shell::quit_message_loop_ = true;
41 41
42 class Shell::DevToolsWebContentsObserver : public WebContentsObserver { 42 class Shell::DevToolsWebContentsObserver : public WebContentsObserver {
43 public: 43 public:
44 DevToolsWebContentsObserver(Shell* shell, WebContents* web_contents) 44 DevToolsWebContentsObserver(Shell* shell, WebContents* web_contents)
45 : WebContentsObserver(web_contents), 45 : WebContentsObserver(web_contents),
46 shell_(shell) { 46 shell_(shell) {
47 } 47 }
48 48
49 // WebContentsObserver 49 // WebContentsObserver
50 virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE { 50 virtual void WebContentsDestroyed() OVERRIDE {
51 shell_->OnDevToolsWebContentsDestroyed(); 51 shell_->OnDevToolsWebContentsDestroyed();
52 } 52 }
53 53
54 private: 54 private:
55 Shell* shell_; 55 Shell* shell_;
56 56
57 DISALLOW_COPY_AND_ASSIGN(DevToolsWebContentsObserver); 57 DISALLOW_COPY_AND_ASSIGN(DevToolsWebContentsObserver);
58 }; 58 };
59 59
60 Shell::Shell(WebContents* web_contents) 60 Shell::Shell(WebContents* web_contents)
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 devtools_frontend_->Activate(); 390 devtools_frontend_->Activate();
391 devtools_frontend_->Focus(); 391 devtools_frontend_->Focus();
392 } 392 }
393 393
394 void Shell::OnDevToolsWebContentsDestroyed() { 394 void Shell::OnDevToolsWebContentsDestroyed() {
395 devtools_observer_.reset(); 395 devtools_observer_.reset();
396 devtools_frontend_ = NULL; 396 devtools_frontend_ = NULL;
397 } 397 }
398 398
399 } // namespace content 399 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698