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

Side by Side Diff: chrome/browser/ui/views/extensions/extension_view_views.cc

Issue 653843002: Mac: Attach Extension NSViews to the view hierarchy before creating renderers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove DCHECK Created 5 years, 10 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
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_view_views.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/views/extensions/extension_view_views.h" 5 #include "chrome/browser/ui/views/extensions/extension_view_views.h"
6 6
7 #include "chrome/browser/extensions/extension_view_host.h" 7 #include "chrome/browser/extensions/extension_view_host.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/views/extensions/extension_popup.h" 9 #include "chrome/browser/ui/views/extensions/extension_popup.h"
10 #include "content/public/browser/content_browser_client.h" 10 #include "content/public/browser/content_browser_client.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } 74 }
75 75
76 void ExtensionViewViews::SetIsClipped(bool is_clipped) { 76 void ExtensionViewViews::SetIsClipped(bool is_clipped) {
77 if (is_clipped_ != is_clipped) { 77 if (is_clipped_ != is_clipped) {
78 is_clipped_ = is_clipped; 78 is_clipped_ = is_clipped;
79 if (visible()) 79 if (visible())
80 ShowIfCompletelyLoaded(); 80 ShowIfCompletelyLoaded();
81 } 81 }
82 } 82 }
83 83
84 void ExtensionViewViews::Init() {
85 // Initialization continues in ViewHierarchyChanged().
86 }
87
88 Browser* ExtensionViewViews::GetBrowser() { 84 Browser* ExtensionViewViews::GetBrowser() {
89 return browser_; 85 return browser_;
90 } 86 }
91 87
92 gfx::NativeView ExtensionViewViews::GetNativeView() { 88 gfx::NativeView ExtensionViewViews::GetNativeView() {
93 return native_view(); 89 return native_view();
94 } 90 }
95 91
96 void ExtensionViewViews::ResizeDueToAutoResize(const gfx::Size& new_size) { 92 void ExtensionViewViews::ResizeDueToAutoResize(const gfx::Size& new_size) {
97 // Don't actually do anything with this information until we have been shown. 93 // Don't actually do anything with this information until we have been shown.
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 ExtensionViewHost* host, 188 ExtensionViewHost* host,
193 Browser* browser) { 189 Browser* browser) {
194 scoped_ptr<ExtensionViewViews> view(new ExtensionViewViews(host, browser)); 190 scoped_ptr<ExtensionViewViews> view(new ExtensionViewViews(host, browser));
195 // We own |view_|, so don't auto delete when it's removed from the view 191 // We own |view_|, so don't auto delete when it's removed from the view
196 // hierarchy. 192 // hierarchy.
197 view->set_owned_by_client(); 193 view->set_owned_by_client();
198 return view.Pass(); 194 return view.Pass();
199 } 195 }
200 196
201 } // namespace extensions 197 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_view_views.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698