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

Side by Side Diff: chrome/browser/web_contents_view.cc

Issue 17455: Autofill popup dismissed when page loses focus (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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/browser/web_contents_view.h ('k') | chrome/browser/web_contents_view_win.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) 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/browser/web_contents_view.h" 5 #include "chrome/browser/web_contents_view.h"
6 6
7 #include "chrome/browser/render_widget_host.h" 7 #include "chrome/browser/render_widget_host.h"
8 8
9 void WebContentsView::RenderWidgetHostDestroyed(RenderWidgetHost* host) { 9 void WebContentsView::RenderWidgetHostDestroyed(RenderWidgetHost* host) {
10 for (PendingWidgetViews::iterator i = pending_widget_views_.begin(); 10 for (PendingWidgetViews::iterator i = pending_widget_views_.begin();
11 i != pending_widget_views_.end(); ++i) { 11 i != pending_widget_views_.end(); ++i) {
12 if (host->view() == i->second) { 12 if (host->view() == i->second) {
13 pending_widget_views_.erase(i); 13 pending_widget_views_.erase(i);
14 return; 14 return;
15 } 15 }
16 } 16 }
17 } 17 }
18 18
19 void WebContentsView::CreateNewWindow(int route_id, HANDLE modal_dialog_event) { 19 void WebContentsView::CreateNewWindow(int route_id, HANDLE modal_dialog_event) {
20 // Save the created window associated with the route so we can show it later. 20 // Save the created window associated with the route so we can show it later.
21 pending_contents_[route_id] = CreateNewWindowInternal(route_id, 21 pending_contents_[route_id] = CreateNewWindowInternal(route_id,
22 modal_dialog_event); 22 modal_dialog_event);
23 } 23 }
24 24
25 void WebContentsView::CreateNewWidget(int route_id, 25 void WebContentsView::CreateNewWidget(int route_id, bool activatable) {
26 bool focus_on_show) {
27 // Save the created widget associated with the route so we can show it later. 26 // Save the created widget associated with the route so we can show it later.
28 pending_widget_views_[route_id] = CreateNewWidgetInternal(route_id, 27 pending_widget_views_[route_id] = CreateNewWidgetInternal(route_id,
29 focus_on_show); 28 activatable);
30 } 29 }
31 30
32 void WebContentsView::ShowCreatedWindow(int route_id, 31 void WebContentsView::ShowCreatedWindow(int route_id,
33 WindowOpenDisposition disposition, 32 WindowOpenDisposition disposition,
34 const gfx::Rect& initial_pos, 33 const gfx::Rect& initial_pos,
35 bool user_gesture) { 34 bool user_gesture) {
36 PendingContents::iterator iter = pending_contents_.find(route_id); 35 PendingContents::iterator iter = pending_contents_.find(route_id);
37 if (iter == pending_contents_.end()) { 36 if (iter == pending_contents_.end()) {
38 DCHECK(false); 37 DCHECK(false);
39 return; 38 return;
(...skipping 12 matching lines...) Expand all
52 if (iter == pending_widget_views_.end()) { 51 if (iter == pending_widget_views_.end()) {
53 DCHECK(false); 52 DCHECK(false);
54 return; 53 return;
55 } 54 }
56 55
57 RenderWidgetHostView* widget_host_view = iter->second; 56 RenderWidgetHostView* widget_host_view = iter->second;
58 pending_widget_views_.erase(route_id); 57 pending_widget_views_.erase(route_id);
59 58
60 ShowCreatedWidgetInternal(widget_host_view, initial_pos); 59 ShowCreatedWidgetInternal(widget_host_view, initial_pos);
61 } 60 }
OLDNEW
« no previous file with comments | « chrome/browser/web_contents_view.h ('k') | chrome/browser/web_contents_view_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698