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

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

Issue 6452011: Rework tree APIs to reflect Google style and more const-correctness.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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.h" 5 #include "chrome/browser/ui/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 #include "chrome/browser/ui/views/extensions/extension_popup.h" 10 #include "chrome/browser/ui/views/extensions/extension_popup.h"
(...skipping 15 matching lines...) Expand all
26 is_clipped_(false) { 26 is_clipped_(false) {
27 host_->set_view(this); 27 host_->set_view(this);
28 28
29 // This view needs to be focusable so it can act as the focused view for the 29 // This view needs to be focusable so it can act as the focused view for the
30 // focus manager. This is required to have SkipDefaultKeyEventProcessing 30 // focus manager. This is required to have SkipDefaultKeyEventProcessing
31 // called so the tab key events are forwarded to the renderer. 31 // called so the tab key events are forwarded to the renderer.
32 SetFocusable(true); 32 SetFocusable(true);
33 } 33 }
34 34
35 ExtensionView::~ExtensionView() { 35 ExtensionView::~ExtensionView() {
36 View* parent = GetParent(); 36 if (parent())
37 if (parent) 37 parent()->RemoveChildView(this);
38 parent->RemoveChildView(this);
39 CleanUp(); 38 CleanUp();
40 } 39 }
41 40
42 const Extension* ExtensionView::extension() const { 41 const Extension* ExtensionView::extension() const {
43 return host_->extension(); 42 return host_->extension();
44 } 43 }
45 44
46 RenderViewHost* ExtensionView::render_view_host() const { 45 RenderViewHost* ExtensionView::render_view_host() const {
47 return host_->render_view_host(); 46 return host_->render_view_host();
48 } 47 }
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 render_view_host()->view()->SetBackground(pending_background_); 195 render_view_host()->view()->SetBackground(pending_background_);
197 pending_background_.reset(); 196 pending_background_.reset();
198 } 197 }
199 198
200 // Tell the renderer not to draw scroll bars in popups unless the 199 // Tell the renderer not to draw scroll bars in popups unless the
201 // popups are at the maximum allowed size. 200 // popups are at the maximum allowed size.
202 gfx::Size largest_popup_size(ExtensionPopup::kMaxWidth, 201 gfx::Size largest_popup_size(ExtensionPopup::kMaxWidth,
203 ExtensionPopup::kMaxHeight); 202 ExtensionPopup::kMaxHeight);
204 host_->DisableScrollbarsForSmallWindows(largest_popup_size); 203 host_->DisableScrollbarsForSmallWindows(largest_popup_size);
205 } 204 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/dropdown_bar_host.cc ('k') | chrome/browser/ui/views/frame/browser_frame_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698