Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/public/browser/web_contents_observer.h" | 5 #include "content/public/browser/web_contents_observer.h" |
| 6 | 6 |
| 7 #include "base/threading/platform_thread.h" | |
|
Avi (use Gerrit)
2017/05/16 20:13:37
Is this include necessary?
Hzj_jie
2017/05/16 20:43:23
No: the change to this file is unexpected.
Done.
| |
| 7 #include "content/browser/web_contents/web_contents_impl.h" | 8 #include "content/browser/web_contents/web_contents_impl.h" |
| 8 #include "content/public/browser/navigation_details.h" | 9 #include "content/public/browser/navigation_details.h" |
| 9 #include "content/public/browser/render_view_host.h" | 10 #include "content/public/browser/render_view_host.h" |
| 10 | 11 |
| 11 namespace content { | 12 namespace content { |
| 12 | 13 |
| 13 WebContentsObserver::WebContentsObserver(WebContents* web_contents) | 14 WebContentsObserver::WebContentsObserver(WebContents* web_contents) |
| 14 : web_contents_(nullptr) { | 15 : web_contents_(nullptr) { |
| 15 Observe(web_contents); | 16 Observe(web_contents); |
| 16 } | 17 } |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 66 | 67 |
| 67 return web_contents_->GetRenderViewHost()->GetRoutingID(); | 68 return web_contents_->GetRenderViewHost()->GetRoutingID(); |
| 68 } | 69 } |
| 69 | 70 |
| 70 void WebContentsObserver::ResetWebContents() { | 71 void WebContentsObserver::ResetWebContents() { |
| 71 web_contents_->RemoveObserver(this); | 72 web_contents_->RemoveObserver(this); |
| 72 web_contents_ = nullptr; | 73 web_contents_ = nullptr; |
| 73 } | 74 } |
| 74 | 75 |
| 75 } // namespace content | 76 } // namespace content |
| OLD | NEW |