OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/ui/views/frame/browser_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 2648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2659 | 2659 |
2660 DevToolsWindow* devtools_window = | 2660 DevToolsWindow* devtools_window = |
2661 DevToolsWindow::GetDockedInstanceForInspectedTab(contents); | 2661 DevToolsWindow::GetDockedInstanceForInspectedTab(contents); |
2662 if (devtools_window && | 2662 if (devtools_window && |
2663 DoCutCopyPasteForWebContents(devtools_window->web_contents(), method)) { | 2663 DoCutCopyPasteForWebContents(devtools_window->web_contents(), method)) { |
2664 return; | 2664 return; |
2665 } | 2665 } |
2666 | 2666 |
2667 views::FocusManager* focus_manager = GetFocusManager(); | 2667 views::FocusManager* focus_manager = GetFocusManager(); |
2668 views::View* focused = focus_manager->GetFocusedView(); | 2668 views::View* focused = focus_manager->GetFocusedView(); |
2669 if (focused->GetClassName() == views::Textfield::kViewClassName) { | 2669 if (focused->GetClassName() == views::Textfield::kViewClassName || |
| 2670 focused->GetClassName() == OmniboxViewViews::kViewClassName) { |
2670 views::Textfield* textfield = static_cast<views::Textfield*>(focused); | 2671 views::Textfield* textfield = static_cast<views::Textfield*>(focused); |
2671 textfield->ExecuteCommand(command_id); | 2672 textfield->ExecuteCommand(command_id); |
2672 return; | 2673 return; |
2673 } | 2674 } |
2674 | 2675 |
2675 #if defined(OS_WIN) && !defined(USE_AURA) | 2676 #if defined(OS_WIN) && !defined(USE_AURA) |
2676 OmniboxView* omnibox_view = GetLocationBarView()->GetLocationEntry(); | 2677 OmniboxView* omnibox_view = GetLocationBarView()->GetLocationEntry(); |
2677 if (omnibox_view->model()->has_focus()) { | 2678 if (omnibox_view->model()->has_focus()) { |
2678 OmniboxViewWin* omnibox_win = GetOmniboxViewWin(omnibox_view); | 2679 OmniboxViewWin* omnibox_win = GetOmniboxViewWin(omnibox_view); |
2679 ::SendMessage(omnibox_win->GetNativeView(), windows_msg_id, 0, 0); | 2680 ::SendMessage(omnibox_win->GetNativeView(), windows_msg_id, 0, 0); |
(...skipping 28 matching lines...) Expand all Loading... |
2708 | 2709 |
2709 Browser* modal_browser = | 2710 Browser* modal_browser = |
2710 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); | 2711 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); |
2711 if (modal_browser && (browser_ != modal_browser)) { | 2712 if (modal_browser && (browser_ != modal_browser)) { |
2712 modal_browser->window()->FlashFrame(true); | 2713 modal_browser->window()->FlashFrame(true); |
2713 modal_browser->window()->Activate(); | 2714 modal_browser->window()->Activate(); |
2714 } | 2715 } |
2715 | 2716 |
2716 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); | 2717 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); |
2717 } | 2718 } |
OLD | NEW |