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

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

Issue 3201008: Revert 57094 - Making window.focus()/blur() work only when there is a user ge... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 4 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_view.cc ('k') | no next file » | 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) 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/renderer/render_widget.h" 5 #include "chrome/renderer/render_widget.h"
6 6
7 #include "app/surface/transport_dib.h" 7 #include "app/surface/transport_dib.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/histogram.h" 10 #include "base/histogram.h"
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 Send(new ViewHostMsg_ShowPopup(routing_id_, *popup_params_)); 648 Send(new ViewHostMsg_ShowPopup(routing_id_, *popup_params_));
649 popup_params_.reset(); 649 popup_params_.reset();
650 } else { 650 } else {
651 Send(new ViewHostMsg_ShowWidget(opener_id_, routing_id_, initial_pos_)); 651 Send(new ViewHostMsg_ShowWidget(opener_id_, routing_id_, initial_pos_));
652 } 652 }
653 SetPendingWindowRect(initial_pos_); 653 SetPendingWindowRect(initial_pos_);
654 } 654 }
655 } 655 }
656 656
657 void RenderWidget::didFocus() { 657 void RenderWidget::didFocus() {
658 Send(new ViewHostMsg_Focus(routing_id_));
658 } 659 }
659 660
660 void RenderWidget::didBlur() { 661 void RenderWidget::didBlur() {
662 Send(new ViewHostMsg_Blur(routing_id_));
661 } 663 }
662 664
663 void RenderWidget::DoDeferredClose() { 665 void RenderWidget::DoDeferredClose() {
664 Send(new ViewHostMsg_Close(routing_id_)); 666 Send(new ViewHostMsg_Close(routing_id_));
665 } 667 }
666 668
667 void RenderWidget::closeWidgetSoon() { 669 void RenderWidget::closeWidgetSoon() {
668 // If a page calls window.close() twice, we'll end up here twice, but that's 670 // If a page calls window.close() twice, we'll end up here twice, but that's
669 // OK. It is safe to send multiple Close messages. 671 // OK. It is safe to send multiple Close messages.
670 672
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 946
945 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { 947 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) {
946 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); 948 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin();
947 i != plugin_window_moves_.end(); ++i) { 949 i != plugin_window_moves_.end(); ++i) {
948 if (i->window == window) { 950 if (i->window == window) {
949 plugin_window_moves_.erase(i); 951 plugin_window_moves_.erase(i);
950 break; 952 break;
951 } 953 }
952 } 954 }
953 } 955 }
OLDNEW
« no previous file with comments | « chrome/renderer/render_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698