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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/extension_view_mac.mm

Issue 995983002: Make LoadMonitoringExtensionHostQueue remove itself as an ExtensionHost observer at the correct tim… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: roll back some stuff Created 5 years, 9 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 (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 "chrome/browser/ui/cocoa/extensions/extension_view_mac.h" 5 #include "chrome/browser/ui/cocoa/extensions/extension_view_mac.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/mac/foundation_util.h" 9 #include "base/mac/foundation_util.h"
10 #include "chrome/browser/extensions/extension_view_host.h" 10 #include "chrome/browser/extensions/extension_view_host.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 ShowIfCompletelyLoaded(); 86 ShowIfCompletelyLoaded();
87 } 87 }
88 88
89 content::RenderViewHost* ExtensionViewMac::render_view_host() const { 89 content::RenderViewHost* ExtensionViewMac::render_view_host() const {
90 return extension_host_->render_view_host(); 90 return extension_host_->render_view_host();
91 } 91 }
92 92
93 void ExtensionViewMac::ShowIfCompletelyLoaded() { 93 void ExtensionViewMac::ShowIfCompletelyLoaded() {
94 // We wait to show the ExtensionView until it has loaded, and the view has 94 // We wait to show the ExtensionView until it has loaded, and the view has
95 // actually been created. These can happen in different orders. 95 // actually been created. These can happen in different orders.
96 if (extension_host_->did_stop_loading()) { 96 if (extension_host_->has_loaded_once()) {
97 [GetNativeView() setHidden:NO]; 97 [GetNativeView() setHidden:NO];
98 if (container_) 98 if (container_)
99 container_->OnExtensionViewDidShow(this); 99 container_->OnExtensionViewDidShow(this);
100 } 100 }
101 } 101 }
102 102
103 namespace extensions { 103 namespace extensions {
104 104
105 // static 105 // static
106 scoped_ptr<ExtensionView> ExtensionViewHost::CreateExtensionView( 106 scoped_ptr<ExtensionView> ExtensionViewHost::CreateExtensionView(
107 ExtensionViewHost* host, 107 ExtensionViewHost* host,
108 Browser* browser) { 108 Browser* browser) {
109 return make_scoped_ptr(new ExtensionViewMac(host, browser)); 109 return make_scoped_ptr(new ExtensionViewMac(host, browser));
110 } 110 }
111 111
112 } // namespace extensions 112 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698