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

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

Issue 21439: Fix for focus traversal issue in Gears dialogs (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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/jsmessage_box_handler_win.h ('k') | chrome/browser/views/dom_view.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/jsmessage_box_handler_win.h" 5 #include "chrome/browser/jsmessage_box_handler_win.h"
6 6
7 #include "chrome/browser/app_modal_dialog_queue.h" 7 #include "chrome/browser/app_modal_dialog_queue.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/profile.h" 9 #include "chrome/browser/profile.h"
10 #include "chrome/browser/tab_contents/web_contents.h" 10 #include "chrome/browser/tab_contents/web_contents.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 dialog_->Activate(); 167 dialog_->Activate();
168 } 168 }
169 169
170 /////////////////////////////////////////////////////////////////////////////// 170 ///////////////////////////////////////////////////////////////////////////////
171 // JavascriptMessageBoxHandler, views::WindowDelegate implementation: 171 // JavascriptMessageBoxHandler, views::WindowDelegate implementation:
172 172
173 views::View* JavascriptMessageBoxHandler::GetContentsView() { 173 views::View* JavascriptMessageBoxHandler::GetContentsView() {
174 return message_box_view_; 174 return message_box_view_;
175 } 175 }
176 176
177 views::View* JavascriptMessageBoxHandler::GetInitiallyFocusedView() const { 177 views::View* JavascriptMessageBoxHandler::GetInitiallyFocusedView() {
178 if (message_box_view_->text_box()) 178 if (message_box_view_->text_box())
179 return message_box_view_->text_box(); 179 return message_box_view_->text_box();
180 return views::AppModalDialogDelegate::GetInitiallyFocusedView(); 180 return views::AppModalDialogDelegate::GetInitiallyFocusedView();
181 } 181 }
182 182
183 /////////////////////////////////////////////////////////////////////////////// 183 ///////////////////////////////////////////////////////////////////////////////
184 // JavascriptMessageBoxHandler, private: 184 // JavascriptMessageBoxHandler, private:
185 185
186 void JavascriptMessageBoxHandler::Observe(NotificationType type, 186 void JavascriptMessageBoxHandler::Observe(NotificationType type,
187 const NotificationSource& source, 187 const NotificationSource& source,
(...skipping 12 matching lines...) Expand all
200 web_contents_gone = true; 200 web_contents_gone = true;
201 201
202 if (web_contents_gone) { 202 if (web_contents_gone) {
203 web_contents_ = NULL; 203 web_contents_ = NULL;
204 204
205 // If the dialog is visible close it. 205 // If the dialog is visible close it.
206 if (dialog_) 206 if (dialog_)
207 dialog_->Close(); 207 dialog_->Close();
208 } 208 }
209 } 209 }
OLDNEW
« no previous file with comments | « chrome/browser/jsmessage_box_handler_win.h ('k') | chrome/browser/views/dom_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698