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

Side by Side Diff: chrome/browser/extensions/extension_view_host.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/master again, resolved conflicts 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 "chrome/browser/extensions/extension_view_host.h" 5 #include "chrome/browser/extensions/extension_view_host.h"
6 6
7 #include "base/strings/string_piece.h" 7 #include "base/strings/string_piece.h"
8 #include "chrome/browser/chrome_notification_types.h" 8 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/browser/extensions/window_controller.h" 9 #include "chrome/browser/extensions/window_controller.h"
10 #include "chrome/browser/file_select_helper.h" 10 #include "chrome/browser/file_select_helper.h"
(...skipping 24 matching lines...) Expand all
35 // Notifies an ExtensionViewHost when a WebContents is destroyed. 35 // Notifies an ExtensionViewHost when a WebContents is destroyed.
36 class ExtensionViewHost::AssociatedWebContentsObserver 36 class ExtensionViewHost::AssociatedWebContentsObserver
37 : public WebContentsObserver { 37 : public WebContentsObserver {
38 public: 38 public:
39 AssociatedWebContentsObserver(ExtensionViewHost* host, 39 AssociatedWebContentsObserver(ExtensionViewHost* host,
40 WebContents* web_contents) 40 WebContents* web_contents)
41 : WebContentsObserver(web_contents), host_(host) {} 41 : WebContentsObserver(web_contents), host_(host) {}
42 virtual ~AssociatedWebContentsObserver() {} 42 virtual ~AssociatedWebContentsObserver() {}
43 43
44 // content::WebContentsObserver: 44 // content::WebContentsObserver:
45 virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE { 45 virtual void WebContentsDestroyed() OVERRIDE {
46 // Deleting |this| from here is safe. 46 // Deleting |this| from here is safe.
47 host_->SetAssociatedWebContents(NULL); 47 host_->SetAssociatedWebContents(NULL);
48 } 48 }
49 49
50 private: 50 private:
51 ExtensionViewHost* host_; 51 ExtensionViewHost* host_;
52 52
53 DISALLOW_COPY_AND_ASSIGN(AssociatedWebContentsObserver); 53 DISALLOW_COPY_AND_ASSIGN(AssociatedWebContentsObserver);
54 }; 54 };
55 55
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 336
337 void ExtensionViewHost::InsertInfobarCSS() { 337 void ExtensionViewHost::InsertInfobarCSS() {
338 static const base::StringPiece css( 338 static const base::StringPiece css(
339 ResourceBundle::GetSharedInstance().GetRawDataResource( 339 ResourceBundle::GetSharedInstance().GetRawDataResource(
340 IDR_EXTENSIONS_INFOBAR_CSS)); 340 IDR_EXTENSIONS_INFOBAR_CSS));
341 341
342 host_contents()->InsertCSS(css.as_string()); 342 host_contents()->InsertCSS(css.as_string());
343 } 343 }
344 344
345 } // namespace extensions 345 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/web_navigation/web_navigation_api.cc ('k') | chrome/browser/extensions/script_executor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698