| 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 2560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2571 if (omnibox_view->model()->has_focus()) { | 2571 if (omnibox_view->model()->has_focus()) { |
| 2572 OmniboxViewWin* omnibox_win = GetOmniboxViewWin(omnibox_view); | 2572 OmniboxViewWin* omnibox_win = GetOmniboxViewWin(omnibox_view); |
| 2573 ::SendMessage(omnibox_win->GetNativeView(), windows_msg_id, 0, 0); | 2573 ::SendMessage(omnibox_win->GetNativeView(), windows_msg_id, 0, 0); |
| 2574 } | 2574 } |
| 2575 #endif | 2575 #endif |
| 2576 } | 2576 } |
| 2577 | 2577 |
| 2578 bool BrowserView::DoCutCopyPasteForWebContents( | 2578 bool BrowserView::DoCutCopyPasteForWebContents( |
| 2579 WebContents* contents, | 2579 WebContents* contents, |
| 2580 void (content::RenderWidgetHost::*method)()) { | 2580 void (content::RenderWidgetHost::*method)()) { |
| 2581 gfx::NativeView native_view = contents->GetContentNativeView(); | 2581 gfx::NativeView native_view = contents->GetView()->GetContentNativeView(); |
| 2582 if (!native_view) | 2582 if (!native_view) |
| 2583 return false; | 2583 return false; |
| 2584 #if defined(USE_AURA) | 2584 #if defined(USE_AURA) |
| 2585 if (native_view->HasFocus()) { | 2585 if (native_view->HasFocus()) { |
| 2586 #elif defined(OS_WIN) | 2586 #elif defined(OS_WIN) |
| 2587 if (native_view == ::GetFocus()) { | 2587 if (native_view == ::GetFocus()) { |
| 2588 #endif | 2588 #endif |
| 2589 (contents->GetRenderViewHost()->*method)(); | 2589 (contents->GetRenderViewHost()->*method)(); |
| 2590 return true; | 2590 return true; |
| 2591 } | 2591 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 2602 | 2602 |
| 2603 Browser* modal_browser = | 2603 Browser* modal_browser = |
| 2604 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); | 2604 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); |
| 2605 if (modal_browser && (browser_ != modal_browser)) { | 2605 if (modal_browser && (browser_ != modal_browser)) { |
| 2606 modal_browser->window()->FlashFrame(true); | 2606 modal_browser->window()->FlashFrame(true); |
| 2607 modal_browser->window()->Activate(); | 2607 modal_browser->window()->Activate(); |
| 2608 } | 2608 } |
| 2609 | 2609 |
| 2610 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); | 2610 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); |
| 2611 } | 2611 } |
| OLD | NEW |