| Index: chrome/browser/ui/views/frame/browser_view.cc
|
| diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
|
| index 741a976b473d1f7cda130e6145ed4abb25c33c6a..135ff347810173d31e8be71e73dffffa89337638 100644
|
| --- a/chrome/browser/ui/views/frame/browser_view.cc
|
| +++ b/chrome/browser/ui/views/frame/browser_view.cc
|
| @@ -68,7 +68,6 @@
|
| #include "chrome/browser/ui/views/frame/browser_view_layout_delegate.h"
|
| #include "chrome/browser/ui/views/frame/contents_layout_manager.h"
|
| #include "chrome/browser/ui/views/frame/immersive_mode_controller.h"
|
| -#include "chrome/browser/ui/views/frame/native_browser_frame_factory.h"
|
| #include "chrome/browser/ui/views/frame/top_container_view.h"
|
| #include "chrome/browser/ui/views/frame/web_contents_close_handler.h"
|
| #include "chrome/browser/ui/views/fullscreen_exit_bubble_views.h"
|
| @@ -108,14 +107,12 @@
|
| #include "content/public/browser/notification_service.h"
|
| #include "content/public/browser/render_frame_host.h"
|
| #include "content/public/browser/render_view_host.h"
|
| +#include "content/public/browser/render_widget_host_view.h"
|
| #include "content/public/browser/user_metrics.h"
|
| #include "content/public/browser/web_contents.h"
|
| #include "content/public/common/content_switches.h"
|
| #include "grit/theme_resources.h"
|
| #include "ui/accessibility/ax_view_state.h"
|
| -#include "ui/aura/client/window_tree_client.h"
|
| -#include "ui/aura/window.h"
|
| -#include "ui/aura/window_tree_host.h"
|
| #include "ui/base/accelerators/accelerator.h"
|
| #include "ui/base/hit_test.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
| @@ -138,6 +135,12 @@
|
| #include "ui/views/widget/widget.h"
|
| #include "ui/views/window/dialog_delegate.h"
|
|
|
| +#if defined(USE_AURA)
|
| +#include "ui/aura/client/window_tree_client.h"
|
| +#include "ui/aura/window.h"
|
| +#include "ui/aura/window_tree_host.h"
|
| +#endif
|
| +
|
| #if defined(OS_WIN)
|
| #include "base/win/windows_version.h"
|
| #include "chrome/browser/jumplist_win.h"
|
| @@ -1416,6 +1419,7 @@ ToolbarView* BrowserView::GetToolbarView() const {
|
| void BrowserView::TabInsertedAt(WebContents* contents,
|
| int index,
|
| bool foreground) {
|
| +#if defined(USE_AURA)
|
| // WebContents inserted in tabs might not have been added to the root
|
| // window yet. Per http://crbug/342672 add them now since drawing the
|
| // WebContents requires root window specific data - information about
|
| @@ -1427,6 +1431,7 @@ void BrowserView::TabInsertedAt(WebContents* contents,
|
| window, root_window, root_window->GetBoundsInScreen());
|
| DCHECK(contents->GetNativeView()->GetRootWindow());
|
| }
|
| +#endif
|
| web_contents_close_handler_->TabInserted();
|
|
|
| if (foreground)
|
| @@ -2366,24 +2371,6 @@ void BrowserView::UpdateAcceleratorMetrics(const ui::Accelerator& accelerator,
|
| #endif
|
| }
|
|
|
| -// static
|
| -BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) {
|
| - // Create the view and the frame. The frame will attach itself via the view
|
| - // so we don't need to do anything with the pointer.
|
| - BrowserView* view = new BrowserView();
|
| - view->Init(browser);
|
| - (new BrowserFrame(view))->InitBrowserFrame();
|
| - view->GetWidget()->non_client_view()->SetAccessibleName(
|
| - l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
|
| - return view;
|
| -}
|
| -
|
| -// static
|
| -chrome::HostDesktopType BrowserWindow::AdjustHostDesktopType(
|
| - chrome::HostDesktopType desktop_type) {
|
| - return NativeBrowserFrameFactory::AdjustHostDesktopType(desktop_type);
|
| -}
|
| -
|
| void BrowserView::ShowAvatarBubble(WebContents* web_contents,
|
| const gfx::Rect& rect) {
|
| gfx::Point origin(rect.origin());
|
| @@ -2477,10 +2464,7 @@ void BrowserView::DoCutCopyPaste(void (WebContents::*method)(),
|
| bool BrowserView::DoCutCopyPasteForWebContents(
|
| WebContents* contents,
|
| void (WebContents::*method)()) {
|
| - gfx::NativeView native_view = contents->GetContentNativeView();
|
| - if (!native_view)
|
| - return false;
|
| - if (native_view->HasFocus()) {
|
| + if (contents->GetRenderWidgetHostView()->HasFocus()) {
|
| (contents->*method)();
|
| return true;
|
| }
|
|
|