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

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

Issue 48149: Use cocoa controls for HTML select popups in test_shell (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 if (!did_show_) { 548 if (!did_show_) {
549 did_show_ = true; 549 did_show_ = true;
550 // NOTE: initial_pos_ may still have its default values at this point, but 550 // NOTE: initial_pos_ may still have its default values at this point, but
551 // that's okay. It'll be ignored if as_popup is false, or the browser 551 // that's okay. It'll be ignored if as_popup is false, or the browser
552 // process will impose a default position otherwise. 552 // process will impose a default position otherwise.
553 render_thread_->Send(new ViewHostMsg_ShowWidget( 553 render_thread_->Send(new ViewHostMsg_ShowWidget(
554 opener_id_, routing_id_, initial_pos_)); 554 opener_id_, routing_id_, initial_pos_));
555 } 555 }
556 } 556 }
557 557
558 void RenderWidget::ShowWithItems(WebWidget* webwidget,
559 const gfx::Rect& bounds,
560 int item_height,
561 int selected_index,
562 const std::vector<MenuItem>& items) {
563 // TODO(paulg): Implement this for Mac HTML select menus in Chromium, bug
564 // number: http://crbug.com/8389
565 }
566
558 void RenderWidget::Focus(WebWidget* webwidget) { 567 void RenderWidget::Focus(WebWidget* webwidget) {
559 // Prevent the widget from stealing the focus if it does not have focus 568 // Prevent the widget from stealing the focus if it does not have focus
560 // already. We do this by explicitely setting the focus to false again. 569 // already. We do this by explicitely setting the focus to false again.
561 // We only let the browser focus the renderer. 570 // We only let the browser focus the renderer.
562 if (!has_focus_ && webwidget_) { 571 if (!has_focus_ && webwidget_) {
563 MessageLoop::current()->PostTask(FROM_HERE, 572 MessageLoop::current()->PostTask(FROM_HERE,
564 NewRunnableMethod(this, &RenderWidget::ClearFocus)); 573 NewRunnableMethod(this, &RenderWidget::ClearFocus));
565 } 574 }
566 } 575 }
567 576
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 for (; i < plugin_window_moves_.size(); ++i) { 741 for (; i < plugin_window_moves_.size(); ++i) {
733 if (plugin_window_moves_[i].window == move.window) { 742 if (plugin_window_moves_[i].window == move.window) {
734 plugin_window_moves_[i] = move; 743 plugin_window_moves_[i] = move;
735 break; 744 break;
736 } 745 }
737 } 746 }
738 747
739 if (i == plugin_window_moves_.size()) 748 if (i == plugin_window_moves_.size())
740 plugin_window_moves_.push_back(move); 749 plugin_window_moves_.push_back(move);
741 } 750 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698