| Index: chrome/browser/ui/gtk/extensions/extension_view_gtk.cc
|
| ===================================================================
|
| --- chrome/browser/ui/gtk/extensions/extension_view_gtk.cc (revision 158218)
|
| +++ chrome/browser/ui/gtk/extensions/extension_view_gtk.cc (working copy)
|
| @@ -19,40 +19,24 @@
|
| container_(NULL) {
|
| }
|
|
|
| -ExtensionViewGtk::~ExtensionViewGtk() {
|
| -}
|
| -
|
| void ExtensionViewGtk::Init() {
|
| CreateWidgetHostView();
|
| }
|
|
|
| -void ExtensionViewGtk::SetBackground(const SkBitmap& background) {
|
| - if (GetRenderViewHost()->IsRenderViewLive() &&
|
| - GetRenderViewHost()->GetView()) {
|
| - GetRenderViewHost()->GetView()->SetBackground(background);
|
| - } else {
|
| - pending_background_ = background;
|
| - }
|
| -}
|
| -
|
| -Browser* ExtensionViewGtk::GetBrowser() {
|
| - return browser_;
|
| -}
|
| -
|
| -const Browser* ExtensionViewGtk::GetBrowser() const {
|
| - return browser_;
|
| -}
|
| -
|
| -gfx::NativeView ExtensionViewGtk::GetNativeView() {
|
| +gfx::NativeView ExtensionViewGtk::native_view() {
|
| return extension_host_->host_contents()->GetView()->GetNativeView();
|
| }
|
|
|
| -content::RenderViewHost* ExtensionViewGtk::GetRenderViewHost() const {
|
| +content::RenderViewHost* ExtensionViewGtk::render_view_host() const {
|
| return extension_host_->render_view_host();
|
| }
|
|
|
| -void ExtensionViewGtk::SetContainer(ExtensionViewContainer* container) {
|
| - container_ = container;
|
| +void ExtensionViewGtk::SetBackground(const SkBitmap& background) {
|
| + if (render_view_host()->IsRenderViewLive() && render_view_host()->GetView()) {
|
| + render_view_host()->GetView()->SetBackground(background);
|
| + } else {
|
| + pending_background_ = background;
|
| + }
|
| }
|
|
|
| void ExtensionViewGtk::ResizeDueToAutoResize(const gfx::Size& new_size) {
|
| @@ -60,9 +44,13 @@
|
| container_->OnExtensionSizeChanged(this, new_size);
|
| }
|
|
|
| +void ExtensionViewGtk::CreateWidgetHostView() {
|
| + extension_host_->CreateRenderViewSoon();
|
| +}
|
| +
|
| void ExtensionViewGtk::RenderViewCreated() {
|
| - if (!pending_background_.empty() && GetRenderViewHost()->GetView()) {
|
| - GetRenderViewHost()->GetView()->SetBackground(pending_background_);
|
| + if (!pending_background_.empty() && render_view_host()->GetView()) {
|
| + render_view_host()->GetView()->SetBackground(pending_background_);
|
| pending_background_.reset();
|
| }
|
|
|
| @@ -72,26 +60,6 @@
|
| ExtensionPopupGtk::kMinHeight);
|
| gfx::Size max_size(ExtensionPopupGtk::kMaxWidth,
|
| ExtensionPopupGtk::kMaxHeight);
|
| - GetRenderViewHost()->EnableAutoResize(min_size, max_size);
|
| + render_view_host()->EnableAutoResize(min_size, max_size);
|
| }
|
| }
|
| -
|
| -void ExtensionViewGtk::DidStopLoading() {
|
| - NOTIMPLEMENTED();
|
| -}
|
| -
|
| -void ExtensionViewGtk::WindowFrameChanged() {
|
| - NOTIMPLEMENTED();
|
| -}
|
| -
|
| -void ExtensionViewGtk::CreateWidgetHostView() {
|
| - extension_host_->CreateRenderViewSoon();
|
| -}
|
| -
|
| -// static
|
| -ExtensionView* ExtensionView::Create(extensions::ExtensionHost* host,
|
| - Browser* browser) {
|
| - ExtensionViewGtk* extension_view = new ExtensionViewGtk(host, browser);
|
| - extension_view->Init();
|
| - return extension_view;
|
| -}
|
|
|