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

Side by Side Diff: chrome/browser/views/extensions/extension_view.cc

Issue 147051: Clean up a few startup and shutdown dependencies which should fix some of the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/views/extensions/extension_view.h" 5 #include "chrome/browser/views/extensions/extension_view.h"
6 6
7 #include "chrome/browser/extensions/extension_host.h" 7 #include "chrome/browser/extensions/extension_host.h"
8 #include "chrome/browser/renderer_host/render_view_host.h" 8 #include "chrome/browser/renderer_host/render_view_host.h"
9 #include "chrome/browser/renderer_host/render_widget_host_view.h" 9 #include "chrome/browser/renderer_host/render_widget_host_view.h"
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
11 #include "chrome/browser/renderer_host/render_widget_host_view_win.h" 11 #include "chrome/browser/renderer_host/render_widget_host_view_win.h"
12 #endif 12 #endif
13 #include "views/widget/widget.h" 13 #include "views/widget/widget.h"
14 14
15 ExtensionView::ExtensionView(ExtensionHost* host, Browser* browser) 15 ExtensionView::ExtensionView(ExtensionHost* host, Browser* browser)
16 : host_(host), browser_(browser), 16 : host_(host), browser_(browser),
17 initialized_(false), pending_preferred_width_(0), container_(NULL), 17 initialized_(false), pending_preferred_width_(0), container_(NULL),
18 did_insert_css_(false), is_clipped_(false) { 18 did_insert_css_(false), is_clipped_(false) {
19 host_->set_view(this); 19 host_->set_view(this);
20 } 20 }
21 21
22 ExtensionView::~ExtensionView() { 22 ExtensionView::~ExtensionView() {
23 View* parent = GetParent();
24 if (parent)
25 parent->RemoveChildView(this);
23 CleanUp(); 26 CleanUp();
24 } 27 }
25 28
26 Extension* ExtensionView::extension() const { 29 Extension* ExtensionView::extension() const {
27 return host_->extension(); 30 return host_->extension();
28 } 31 }
29 32
30 RenderViewHost* ExtensionView::render_view_host() const { 33 RenderViewHost* ExtensionView::render_view_host() const {
31 return host_->render_view_host(); 34 return host_->render_view_host();
32 } 35 }
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 149
147 void ExtensionView::HandleMouseEvent() { 150 void ExtensionView::HandleMouseEvent() {
148 if (container_) 151 if (container_)
149 container_->OnExtensionMouseEvent(this); 152 container_->OnExtensionMouseEvent(this);
150 } 153 }
151 154
152 void ExtensionView::HandleMouseLeave() { 155 void ExtensionView::HandleMouseLeave() {
153 if (container_) 156 if (container_)
154 container_->OnExtensionMouseLeave(this); 157 container_->OnExtensionMouseLeave(this);
155 } 158 }
OLDNEW
« chrome/browser/extensions/extension_shelf_model_unittest.cc ('K') | « chrome/browser/profile.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698