OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/renderer_host/render_widget_host_view_gtk.h" | 5 #include "chrome/browser/renderer_host/render_widget_host_view_gtk.h" |
6 | 6 |
7 // If this gets included after the gtk headers, then a bunch of compiler | 7 // If this gets included after the gtk headers, then a bunch of compiler |
8 // errors happen because of a "#define Status int" in Xlib.h, which interacts | 8 // errors happen because of a "#define Status int" in Xlib.h, which interacts |
9 // badly with URLRequestStatus::Status. | 9 // badly with URLRequestStatus::Status. |
10 #include "chrome/common/render_messages.h" | 10 #include "chrome/common/render_messages.h" |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 void RenderWidgetHostViewGtk::InitAsPopup( | 524 void RenderWidgetHostViewGtk::InitAsPopup( |
525 RenderWidgetHostView* parent_host_view, const gfx::Rect& pos) { | 525 RenderWidgetHostView* parent_host_view, const gfx::Rect& pos) { |
526 DoInitAsPopup(parent_host_view, GTK_WINDOW_POPUP, pos, false); | 526 DoInitAsPopup(parent_host_view, GTK_WINDOW_POPUP, pos, false); |
527 } | 527 } |
528 | 528 |
529 void RenderWidgetHostViewGtk::InitAsFullscreen( | 529 void RenderWidgetHostViewGtk::InitAsFullscreen( |
530 RenderWidgetHostView* parent_host_view) { | 530 RenderWidgetHostView* parent_host_view) { |
531 DoInitAsPopup(parent_host_view, GTK_WINDOW_TOPLEVEL, gfx::Rect(), true); | 531 DoInitAsPopup(parent_host_view, GTK_WINDOW_TOPLEVEL, gfx::Rect(), true); |
532 } | 532 } |
533 | 533 |
| 534 RenderWidgetHost* RenderWidgetHostViewGtk::GetRenderWidgetHost() const { |
| 535 return host_; |
| 536 } |
| 537 |
534 void RenderWidgetHostViewGtk::DidBecomeSelected() { | 538 void RenderWidgetHostViewGtk::DidBecomeSelected() { |
535 if (!is_hidden_) | 539 if (!is_hidden_) |
536 return; | 540 return; |
537 | 541 |
538 if (tab_switch_paint_time_.is_null()) | 542 if (tab_switch_paint_time_.is_null()) |
539 tab_switch_paint_time_ = base::TimeTicks::Now(); | 543 tab_switch_paint_time_ = base::TimeTicks::Now(); |
540 is_hidden_ = false; | 544 is_hidden_ = false; |
541 host_->WasRestored(); | 545 host_->WasRestored(); |
542 } | 546 } |
543 | 547 |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1109 } | 1113 } |
1110 | 1114 |
1111 // static | 1115 // static |
1112 RenderWidgetHostView* | 1116 RenderWidgetHostView* |
1113 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( | 1117 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( |
1114 gfx::NativeView widget) { | 1118 gfx::NativeView widget) { |
1115 gpointer user_data = g_object_get_data(G_OBJECT(widget), | 1119 gpointer user_data = g_object_get_data(G_OBJECT(widget), |
1116 kRenderWidgetHostViewKey); | 1120 kRenderWidgetHostViewKey); |
1117 return reinterpret_cast<RenderWidgetHostView*>(user_data); | 1121 return reinterpret_cast<RenderWidgetHostView*>(user_data); |
1118 } | 1122 } |
OLD | NEW |