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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 } | 99 } |
100 | 100 |
101 void TabContentsViewGtk::CreateView() { | 101 void TabContentsViewGtk::CreateView() { |
102 set_delete_on_destroy(false); | 102 set_delete_on_destroy(false); |
103 WidgetGtk::Init(NULL, gfx::Rect(), false); | 103 WidgetGtk::Init(NULL, gfx::Rect()); |
104 } | 104 } |
105 | 105 |
106 RenderWidgetHostView* TabContentsViewGtk::CreateViewForWidget( | 106 RenderWidgetHostView* TabContentsViewGtk::CreateViewForWidget( |
107 RenderWidgetHost* render_widget_host) { | 107 RenderWidgetHost* render_widget_host) { |
108 if (render_widget_host->view()) { | 108 if (render_widget_host->view()) { |
109 // During testing, the view will already be set up in most cases to the | 109 // During testing, the view will already be set up in most cases to the |
110 // test view, so we don't want to clobber it with a real one. To verify that | 110 // test view, so we don't want to clobber it with a real one. To verify that |
111 // this actually is happening (and somebody isn't accidentally creating the | 111 // this actually is happening (and somebody isn't accidentally creating the |
112 // view twice), we check for the RVH Factory, which will be set when we're | 112 // view twice), we check for the RVH Factory, which will be set when we're |
113 // making special ones (which go along with the special views). | 113 // making special ones (which go along with the special views). |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 | 316 |
317 private: | 317 private: |
318 DISALLOW_COPY_AND_ASSIGN(BlockedPopupContainerViewGtk); | 318 DISALLOW_COPY_AND_ASSIGN(BlockedPopupContainerViewGtk); |
319 }; | 319 }; |
320 | 320 |
321 // static | 321 // static |
322 BlockedPopupContainerView* BlockedPopupContainerView::Create( | 322 BlockedPopupContainerView* BlockedPopupContainerView::Create( |
323 BlockedPopupContainer* container) { | 323 BlockedPopupContainer* container) { |
324 return new BlockedPopupContainerViewGtk; | 324 return new BlockedPopupContainerViewGtk; |
325 } | 325 } |
OLD | NEW |