| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
| 2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
| 3 // LICENSE file. | 3 // LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/views/tab_contents/tab_contents_view_gtk.h" | 5 #include "chrome/browser/views/tab_contents/tab_contents_view_gtk.h" |
| 6 | 6 |
| 7 #include <gdk/gdk.h> | 7 #include <gdk/gdk.h> |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 | 9 |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 return new TabContentsViewGtk(tab_contents); | 89 return new TabContentsViewGtk(tab_contents); |
| 90 } | 90 } |
| 91 | 91 |
| 92 TabContentsViewGtk::TabContentsViewGtk(TabContents* tab_contents) | 92 TabContentsViewGtk::TabContentsViewGtk(TabContents* tab_contents) |
| 93 : TabContentsView(tab_contents), | 93 : TabContentsView(tab_contents), |
| 94 views::WidgetGtk(TYPE_CHILD), | 94 views::WidgetGtk(TYPE_CHILD), |
| 95 ignore_next_char_event_(false) { | 95 ignore_next_char_event_(false) { |
| 96 } | 96 } |
| 97 | 97 |
| 98 TabContentsViewGtk::~TabContentsViewGtk() { | 98 TabContentsViewGtk::~TabContentsViewGtk() { |
| 99 // Just deleting the object doesn't destroy the GtkWidget. We need to do that |
| 100 // manually, and synchronously, since subsequent signal handlers may expect |
| 101 // to locate this object. |
| 102 CloseNow(); |
| 99 } | 103 } |
| 100 | 104 |
| 101 void TabContentsViewGtk::CreateView() { | 105 void TabContentsViewGtk::CreateView() { |
| 102 set_delete_on_destroy(false); | 106 set_delete_on_destroy(false); |
| 103 WidgetGtk::Init(NULL, gfx::Rect()); | 107 WidgetGtk::Init(NULL, gfx::Rect()); |
| 104 } | 108 } |
| 105 | 109 |
| 106 RenderWidgetHostView* TabContentsViewGtk::CreateViewForWidget( | 110 RenderWidgetHostView* TabContentsViewGtk::CreateViewForWidget( |
| 107 RenderWidgetHost* render_widget_host) { | 111 RenderWidgetHost* render_widget_host) { |
| 108 if (render_widget_host->view()) { | 112 if (render_widget_host->view()) { |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 | 320 |
| 317 private: | 321 private: |
| 318 DISALLOW_COPY_AND_ASSIGN(BlockedPopupContainerViewGtk); | 322 DISALLOW_COPY_AND_ASSIGN(BlockedPopupContainerViewGtk); |
| 319 }; | 323 }; |
| 320 | 324 |
| 321 // static | 325 // static |
| 322 BlockedPopupContainerView* BlockedPopupContainerView::Create( | 326 BlockedPopupContainerView* BlockedPopupContainerView::Create( |
| 323 BlockedPopupContainer* container) { | 327 BlockedPopupContainer* container) { |
| 324 return new BlockedPopupContainerViewGtk; | 328 return new BlockedPopupContainerViewGtk; |
| 325 } | 329 } |
| OLD | NEW |