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

Side by Side Diff: chrome/renderer/render_widget.cc

Issue 67018: Chrome side of the WebKit popup changes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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
« no previous file with comments | « chrome/renderer/render_widget.h ('k') | webkit/glue/chrome_client_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/renderer/render_widget.h" 5 #include "chrome/renderer/render_widget.h"
6 6
7 #include "base/gfx/point.h" 7 #include "base/gfx/point.h"
8 #include "base/gfx/size.h" 8 #include "base/gfx/size.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 if (!did_show_) { 557 if (!did_show_) {
558 did_show_ = true; 558 did_show_ = true;
559 // NOTE: initial_pos_ may still have its default values at this point, but 559 // NOTE: initial_pos_ may still have its default values at this point, but
560 // that's okay. It'll be ignored if as_popup is false, or the browser 560 // that's okay. It'll be ignored if as_popup is false, or the browser
561 // process will impose a default position otherwise. 561 // process will impose a default position otherwise.
562 render_thread_->Send(new ViewHostMsg_ShowWidget( 562 render_thread_->Send(new ViewHostMsg_ShowWidget(
563 opener_id_, routing_id_, initial_pos_)); 563 opener_id_, routing_id_, initial_pos_));
564 } 564 }
565 } 565 }
566 566
567 void RenderWidget::ShowWithItems(WebWidget* webwidget, 567 void RenderWidget::ShowAsPopupWithItems(WebWidget* webwidget,
568 const WebRect& bounds, 568 const WebRect& bounds,
569 int item_height, 569 int item_height,
570 int selected_index, 570 int selected_index,
571 const std::vector<MenuItem>& items) { 571 const std::vector<WebMenuItem>& items) {
572 // TODO(paulg): Implement this for Mac HTML select menus in Chromium, bug 572 // TODO(paulg): Implement this for Mac HTML select menus in Chromium, bug
573 // number: http://crbug.com/8389 573 // number: http://crbug.com/8389
574 } 574 }
575 575
576 void RenderWidget::Focus(WebWidget* webwidget) { 576 void RenderWidget::Focus(WebWidget* webwidget) {
577 // Prevent the widget from stealing the focus if it does not have focus 577 // Prevent the widget from stealing the focus if it does not have focus
578 // already. We do this by explicitely setting the focus to false again. 578 // already. We do this by explicitely setting the focus to false again.
579 // We only let the browser focus the renderer. 579 // We only let the browser focus the renderer.
580 if (!has_focus_ && webwidget_) { 580 if (!has_focus_ && webwidget_) {
581 MessageLoop::current()->PostTask(FROM_HERE, 581 MessageLoop::current()->PostTask(FROM_HERE,
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 if (i == plugin_window_moves_.size()) 775 if (i == plugin_window_moves_.size())
776 plugin_window_moves_.push_back(move); 776 plugin_window_moves_.push_back(move);
777 } 777 }
778 778
779 WebScreenInfo RenderWidget::GetScreenInfo(WebWidget* webwidget) { 779 WebScreenInfo RenderWidget::GetScreenInfo(WebWidget* webwidget) {
780 WebScreenInfo results; 780 WebScreenInfo results;
781 RenderThread::current()->Send( 781 RenderThread::current()->Send(
782 new ViewHostMsg_GetScreenInfo(host_window_, &results)); 782 new ViewHostMsg_GetScreenInfo(host_window_, &results));
783 return results; 783 return results;
784 } 784 }
OLDNEW
« no previous file with comments | « chrome/renderer/render_widget.h ('k') | webkit/glue/chrome_client_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698