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

Side by Side Diff: chrome/browser/tab_contents/chrome_web_contents_view_gtk_delegate.cc

Issue 9473001: Extract minimal RenderViewHost interface for embedders, leaving (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to LKGR. Created 8 years, 9 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/tab_contents/chrome_web_contents_view_gtk_delegate.h" 5 #include "chrome/browser/tab_contents/chrome_web_contents_view_gtk_delegate.h"
6 6
7 #include "chrome/browser/browser_shutdown.h" 7 #include "chrome/browser/browser_shutdown.h"
8 #include "chrome/browser/tab_contents/render_view_context_menu_gtk.h" 8 #include "chrome/browser/tab_contents/render_view_context_menu_gtk.h"
9 #include "chrome/browser/tab_contents/web_drag_bookmark_handler_gtk.h" 9 #include "chrome/browser/tab_contents/web_drag_bookmark_handler_gtk.h"
10 #include "chrome/browser/ui/gtk/constrained_window_gtk.h" 10 #include "chrome/browser/ui/gtk/constrained_window_gtk.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 content::RenderWidgetHostView* view = NULL; 105 content::RenderWidgetHostView* view = NULL;
106 if (params.custom_context.render_widget_id != 106 if (params.custom_context.render_widget_id !=
107 content::CustomContextMenuContext::kCurrentRenderWidget) { 107 content::CustomContextMenuContext::kCurrentRenderWidget) {
108 IPC::Channel::Listener* listener = 108 IPC::Channel::Listener* listener =
109 view_->web_contents()->GetRenderProcessHost()->GetListenerByID( 109 view_->web_contents()->GetRenderProcessHost()->GetListenerByID(
110 params.custom_context.render_widget_id); 110 params.custom_context.render_widget_id);
111 if (!listener) { 111 if (!listener) {
112 NOTREACHED(); 112 NOTREACHED();
113 return; 113 return;
114 } 114 }
115 view = RenderWidgetHost::FromIPCChannelListener(listener)->view(); 115 view = RenderWidgetHost::FromIPCChannelListener(listener)->GetView();
116 } else { 116 } else {
117 view = view_->web_contents()->GetRenderWidgetHostView(); 117 view = view_->web_contents()->GetRenderWidgetHostView();
118 } 118 }
119 119
120 context_menu_.reset( 120 context_menu_.reset(
121 new RenderViewContextMenuGtk(view_->web_contents(), params, view)); 121 new RenderViewContextMenuGtk(view_->web_contents(), params, view));
122 context_menu_->Init(); 122 context_menu_->Init();
123 123
124 gfx::Rect bounds; 124 gfx::Rect bounds;
125 view_->GetContainerBounds(&bounds); 125 view_->GetContainerBounds(&bounds);
(...skipping 21 matching lines...) Expand all
147 g_value_set_int(&value, child_x); 147 g_value_set_int(&value, child_x);
148 gtk_container_child_set_property(GTK_CONTAINER(floating_container), 148 gtk_container_child_set_property(GTK_CONTAINER(floating_container),
149 widget, "x", &value); 149 widget, "x", &value);
150 150
151 int child_y = std::max((allocation->height - requisition.height) / 2, 0); 151 int child_y = std::max((allocation->height - requisition.height) / 2, 0);
152 g_value_set_int(&value, child_y); 152 g_value_set_int(&value, child_y);
153 gtk_container_child_set_property(GTK_CONTAINER(floating_container), 153 gtk_container_child_set_property(GTK_CONTAINER(floating_container),
154 widget, "y", &value); 154 widget, "y", &value);
155 g_value_unset(&value); 155 g_value_unset(&value);
156 } 156 }
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_browser_tests.cc ('k') | chrome/browser/tab_contents/render_view_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698