Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "content/browser/web_contents/web_contents_view_gtk.h" | 5 #include "content/browser/web_contents/web_contents_view_gtk.h" |
| 6 | 6 |
| 7 #include <gdk/gdk.h> | 7 #include <gdk/gdk.h> |
| 8 #include <gdk/gdkkeysyms.h> | 8 #include <gdk/gdkkeysyms.h> |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 | 10 |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 325 } | 325 } |
| 326 | 326 |
| 327 void WebContentsViewGtk::ShowContextMenu( | 327 void WebContentsViewGtk::ShowContextMenu( |
| 328 const content::ContextMenuParams& params) { | 328 const content::ContextMenuParams& params) { |
| 329 if (delegate_.get()) | 329 if (delegate_.get()) |
| 330 delegate_->ShowContextMenu(params); | 330 delegate_->ShowContextMenu(params); |
| 331 else | 331 else |
| 332 DLOG(ERROR) << "Cannot show context menus without a delegate."; | 332 DLOG(ERROR) << "Cannot show context menus without a delegate."; |
| 333 } | 333 } |
| 334 | 334 |
| 335 void WebContentsViewGtk::ShowPopupMenu(const gfx::Rect& bounds, | |
| 336 int item_height, | |
| 337 double item_font_size, | |
| 338 int selected_item, | |
| 339 const std::vector<WebMenuItem>& items, | |
| 340 bool right_aligned, | |
| 341 bool allow_multiple_selection) { | |
| 342 // We are not using external popup menus on Linux, they are rendered by | |
| 343 // WebKit. | |
| 344 NOTREACHED(); | |
|
Avi (use Gerrit)
2012/05/24 18:41:41
Standardize the implementations of ShowPopupMenu a
aruslan
2012/05/24 19:53:15
Done.
| |
| 345 } | |
| 346 | |
| 335 // Render view DnD ------------------------------------------------------------- | 347 // Render view DnD ------------------------------------------------------------- |
| 336 | 348 |
| 337 void WebContentsViewGtk::StartDragging(const WebDropData& drop_data, | 349 void WebContentsViewGtk::StartDragging(const WebDropData& drop_data, |
| 338 WebDragOperationsMask ops, | 350 WebDragOperationsMask ops, |
| 339 const SkBitmap& image, | 351 const SkBitmap& image, |
| 340 const gfx::Point& image_offset) { | 352 const gfx::Point& image_offset) { |
| 341 DCHECK(GetContentNativeView()); | 353 DCHECK(GetContentNativeView()); |
| 342 | 354 |
| 343 RenderWidgetHostViewGtk* view_gtk = static_cast<RenderWidgetHostViewGtk*>( | 355 RenderWidgetHostViewGtk* view_gtk = static_cast<RenderWidgetHostViewGtk*>( |
| 344 web_contents_->GetRenderWidgetHostView()); | 356 web_contents_->GetRenderWidgetHostView()); |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 373 // We manually tell our RWHV to resize the renderer content. This avoids | 385 // We manually tell our RWHV to resize the renderer content. This avoids |
| 374 // spurious resizes from GTK+. | 386 // spurious resizes from GTK+. |
| 375 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); | 387 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); |
| 376 if (rwhv) | 388 if (rwhv) |
| 377 rwhv->SetSize(size); | 389 rwhv->SetSize(size); |
| 378 if (web_contents_->GetInterstitialPage()) | 390 if (web_contents_->GetInterstitialPage()) |
| 379 web_contents_->GetInterstitialPage()->SetSize(size); | 391 web_contents_->GetInterstitialPage()->SetSize(size); |
| 380 } | 392 } |
| 381 | 393 |
| 382 } // namespace content | 394 } // namespace content |
| OLD | NEW |