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

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

Issue 10409088: Get rid of the RenderViewType concept in content, since it was only used by Chrome. Store the enum… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
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.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/ui/views/extensions/extension_popup.h" 8 #include "chrome/browser/ui/views/extensions/extension_popup.h"
9 #include "chrome/common/chrome_view_type.h" 9 #include "chrome/common/chrome_view_type.h"
10 #include "content/public/browser/content_browser_client.h" 10 #include "content/public/browser/content_browser_client.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 container_->OnViewWasResized(); 157 container_->OnViewWasResized();
158 } 158 }
159 } 159 }
160 160
161 void ExtensionView::RenderViewCreated() { 161 void ExtensionView::RenderViewCreated() {
162 if (!pending_background_.empty() && render_view_host()->GetView()) { 162 if (!pending_background_.empty() && render_view_host()->GetView()) {
163 render_view_host()->GetView()->SetBackground(pending_background_); 163 render_view_host()->GetView()->SetBackground(pending_background_);
164 pending_background_.reset(); 164 pending_background_.reset();
165 } 165 }
166 166
167 content::ViewType host_type = host_->extension_host_type(); 167 chrome::ViewType host_type = host_->extension_host_type();
168 if (host_type == chrome::VIEW_TYPE_EXTENSION_POPUP) { 168 if (host_type == chrome::VIEW_TYPE_EXTENSION_POPUP) {
169 gfx::Size min_size(ExtensionPopup::kMinWidth, 169 gfx::Size min_size(ExtensionPopup::kMinWidth,
170 ExtensionPopup::kMinHeight); 170 ExtensionPopup::kMinHeight);
171 gfx::Size max_size(ExtensionPopup::kMaxWidth, 171 gfx::Size max_size(ExtensionPopup::kMaxWidth,
172 ExtensionPopup::kMaxHeight); 172 ExtensionPopup::kMaxHeight);
173 render_view_host()->EnableAutoResize(min_size, max_size); 173 render_view_host()->EnableAutoResize(min_size, max_size);
174 } 174 }
175 175
176 if (container_) 176 if (container_)
177 container_->OnViewWasResized(); 177 container_->OnViewWasResized();
178 } 178 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698