| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 #include "content/public/browser/render_frame_host.h" | 119 #include "content/public/browser/render_frame_host.h" |
| 120 #include "content/public/browser/render_view_host.h" | 120 #include "content/public/browser/render_view_host.h" |
| 121 #include "content/public/browser/render_widget_host_view.h" | 121 #include "content/public/browser/render_widget_host_view.h" |
| 122 #include "content/public/browser/user_metrics.h" | 122 #include "content/public/browser/user_metrics.h" |
| 123 #include "content/public/browser/web_contents.h" | 123 #include "content/public/browser/web_contents.h" |
| 124 #include "content/public/common/content_switches.h" | 124 #include "content/public/common/content_switches.h" |
| 125 #include "grit/theme_resources.h" | 125 #include "grit/theme_resources.h" |
| 126 #include "ui/accessibility/ax_view_state.h" | 126 #include "ui/accessibility/ax_view_state.h" |
| 127 #include "ui/base/accelerators/accelerator.h" | 127 #include "ui/base/accelerators/accelerator.h" |
| 128 #include "ui/base/hit_test.h" | 128 #include "ui/base/hit_test.h" |
| 129 #include "ui/base/ime/input_method.h" |
| 129 #include "ui/base/l10n/l10n_util.h" | 130 #include "ui/base/l10n/l10n_util.h" |
| 130 #include "ui/base/resource/material_design/material_design_controller.h" | 131 #include "ui/base/resource/material_design/material_design_controller.h" |
| 131 #include "ui/base/resource/resource_bundle.h" | 132 #include "ui/base/resource/resource_bundle.h" |
| 132 #include "ui/base/theme_provider.h" | 133 #include "ui/base/theme_provider.h" |
| 133 #include "ui/content_accelerators/accelerator_util.h" | 134 #include "ui/content_accelerators/accelerator_util.h" |
| 134 #include "ui/events/event_utils.h" | 135 #include "ui/events/event_utils.h" |
| 135 #include "ui/gfx/canvas.h" | 136 #include "ui/gfx/canvas.h" |
| 136 #include "ui/gfx/color_utils.h" | 137 #include "ui/gfx/color_utils.h" |
| 137 #include "ui/gfx/geometry/rect_conversions.h" | 138 #include "ui/gfx/geometry/rect_conversions.h" |
| 138 #include "ui/gfx/paint_vector_icon.h" | 139 #include "ui/gfx/paint_vector_icon.h" |
| (...skipping 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1699 queue->ActivateModalDialog(); | 1700 queue->ActivateModalDialog(); |
| 1700 #else | 1701 #else |
| 1701 // If another browser is app modal, flash and activate the modal browser. This | 1702 // If another browser is app modal, flash and activate the modal browser. This |
| 1702 // has to be done in a post task, otherwise if the user clicked on a window | 1703 // has to be done in a post task, otherwise if the user clicked on a window |
| 1703 // that doesn't have the modal dialog the windows keep trying to get the focus | 1704 // that doesn't have the modal dialog the windows keep trying to get the focus |
| 1704 // from each other on Windows. http://crbug.com/141650. | 1705 // from each other on Windows. http://crbug.com/141650. |
| 1705 base::ThreadTaskRunnerHandle::Get()->PostTask( | 1706 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 1706 FROM_HERE, base::Bind(&BrowserView::ActivateAppModalDialog, | 1707 FROM_HERE, base::Bind(&BrowserView::ActivateAppModalDialog, |
| 1707 activate_modal_dialog_factory_.GetWeakPtr())); | 1708 activate_modal_dialog_factory_.GetWeakPtr())); |
| 1708 #endif | 1709 #endif |
| 1710 GetNativeWindow()->GetHost()->GetInputMethod()->GetLogCollector()->AddString( |
| 1711 "BrowserView cannot be activated."); |
| 1709 return false; | 1712 return false; |
| 1710 } | 1713 } |
| 1711 | 1714 |
| 1712 base::string16 BrowserView::GetWindowTitle() const { | 1715 base::string16 BrowserView::GetWindowTitle() const { |
| 1713 return browser_->GetWindowTitleForCurrentTab(); | 1716 return browser_->GetWindowTitleForCurrentTab(); |
| 1714 } | 1717 } |
| 1715 | 1718 |
| 1716 base::string16 BrowserView::GetAccessibleWindowTitle() const { | 1719 base::string16 BrowserView::GetAccessibleWindowTitle() const { |
| 1717 if (IsOffTheRecord()) { | 1720 if (IsOffTheRecord()) { |
| 1718 return l10n_util::GetStringFUTF16( | 1721 return l10n_util::GetStringFUTF16( |
| (...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2684 return immersive_mode_controller()->IsEnabled(); | 2687 return immersive_mode_controller()->IsEnabled(); |
| 2685 } | 2688 } |
| 2686 | 2689 |
| 2687 views::Widget* BrowserView::GetBubbleAssociatedWidget() { | 2690 views::Widget* BrowserView::GetBubbleAssociatedWidget() { |
| 2688 return GetWidget(); | 2691 return GetWidget(); |
| 2689 } | 2692 } |
| 2690 | 2693 |
| 2691 gfx::Rect BrowserView::GetTopContainerBoundsInScreen() { | 2694 gfx::Rect BrowserView::GetTopContainerBoundsInScreen() { |
| 2692 return top_container_->GetBoundsInScreen(); | 2695 return top_container_->GetBoundsInScreen(); |
| 2693 } | 2696 } |
| OLD | NEW |