| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/tab_contents/chrome_web_contents_view_delegate_views.h" | 5 #include "chrome/browser/tab_contents/chrome_web_contents_view_delegate_views.h" |
| 6 | 6 |
| 7 #include "chrome/browser/browser_shutdown.h" | 7 #include "chrome/browser/browser_shutdown.h" |
| 8 #include "chrome/browser/ui/constrained_window_tab_helper.h" | 8 #include "chrome/browser/ui/constrained_window_tab_helper.h" |
| 9 #include "chrome/browser/ui/sad_tab_helper.h" | 9 #include "chrome/browser/ui/sad_tab_helper.h" |
| 10 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 10 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 return toplevel_widget ? toplevel_widget->GetFocusManager() : NULL; | 172 return toplevel_widget ? toplevel_widget->GetFocusManager() : NULL; |
| 173 } | 173 } |
| 174 | 174 |
| 175 void ChromeWebContentsViewDelegateViews::SetInitialFocus() { | 175 void ChromeWebContentsViewDelegateViews::SetInitialFocus() { |
| 176 if (web_contents_->FocusLocationBarByDefault()) { | 176 if (web_contents_->FocusLocationBarByDefault()) { |
| 177 web_contents_->SetFocusToLocationBar(false); | 177 web_contents_->SetFocusToLocationBar(false); |
| 178 } else { | 178 } else { |
| 179 web_contents_->GetView()->Focus(); | 179 web_contents_->GetView()->Focus(); |
| 180 } | 180 } |
| 181 } | 181 } |
| OLD | NEW |