| 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 "content/browser/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 | 423 |
| 424 DISALLOW_COPY_AND_ASSIGN(WindowObserver); | 424 DISALLOW_COPY_AND_ASSIGN(WindowObserver); |
| 425 }; | 425 }; |
| 426 | 426 |
| 427 //////////////////////////////////////////////////////////////////////////////// | 427 //////////////////////////////////////////////////////////////////////////////// |
| 428 // RenderWidgetHostViewAura, public: | 428 // RenderWidgetHostViewAura, public: |
| 429 | 429 |
| 430 RenderWidgetHostViewAura::RenderWidgetHostViewAura(RenderWidgetHost* host) | 430 RenderWidgetHostViewAura::RenderWidgetHostViewAura(RenderWidgetHost* host) |
| 431 : host_(RenderWidgetHostImpl::From(host)), | 431 : host_(RenderWidgetHostImpl::From(host)), |
| 432 window_(new aura::Window(this)), | 432 window_(new aura::Window(this)), |
| 433 delegated_frame_host_(new DelegatedFrameHost(this)), | 433 delegated_frame_host_(DelegatedFrameHost::Create(this)), |
| 434 in_shutdown_(false), | 434 in_shutdown_(false), |
| 435 in_bounds_changed_(false), | 435 in_bounds_changed_(false), |
| 436 is_fullscreen_(false), | 436 is_fullscreen_(false), |
| 437 popup_parent_host_view_(NULL), | 437 popup_parent_host_view_(NULL), |
| 438 popup_child_host_view_(NULL), | 438 popup_child_host_view_(NULL), |
| 439 is_loading_(false), | 439 is_loading_(false), |
| 440 text_input_type_(ui::TEXT_INPUT_TYPE_NONE), | 440 text_input_type_(ui::TEXT_INPUT_TYPE_NONE), |
| 441 text_input_mode_(ui::TEXT_INPUT_MODE_DEFAULT), | 441 text_input_mode_(ui::TEXT_INPUT_MODE_DEFAULT), |
| 442 can_compose_inline_(true), | 442 can_compose_inline_(true), |
| 443 has_composition_text_(false), | 443 has_composition_text_(false), |
| 444 accept_return_character_(false), | 444 accept_return_character_(false), |
| 445 last_swapped_software_frame_scale_factor_(1.f), | 445 last_swapped_software_frame_scale_factor_(1.f), |
| 446 paint_canvas_(NULL), | 446 paint_canvas_(NULL), |
| 447 synthetic_move_sent_(false), | 447 synthetic_move_sent_(false), |
| 448 cursor_visibility_state_in_renderer_(UNKNOWN), | 448 cursor_visibility_state_in_renderer_(UNKNOWN), |
| 449 #if defined(OS_WIN) | 449 #if defined(OS_WIN) |
| 450 legacy_render_widget_host_HWND_(NULL), | 450 legacy_render_widget_host_HWND_(NULL), |
| 451 legacy_window_destroyed_(false), | 451 legacy_window_destroyed_(false), |
| 452 #endif | 452 #endif |
| 453 touch_editing_client_(NULL), | 453 touch_editing_client_(NULL), |
| 454 weak_ptr_factory_(this) { | 454 weak_ptr_factory_(this) { |
| 455 host_->SetView(this); | 455 host_->SetView(this); |
| 456 window_observer_.reset(new WindowObserver(this)); | 456 window_observer_.reset(new WindowObserver(this)); |
| 457 aura::client::SetTooltipText(window_, &tooltip_); | 457 aura::client::SetTooltipText(window_, &tooltip_); |
| 458 aura::client::SetActivationDelegate(window_, this); | 458 aura::client::SetActivationDelegate(window_, this); |
| 459 aura::client::SetActivationChangeObserver(window_, this); | 459 aura::client::SetActivationChangeObserver(window_, this); |
| 460 aura::client::SetFocusChangeObserver(window_, this); | 460 aura::client::SetFocusChangeObserver(window_, this); |
| 461 window_->set_layer_owner_delegate(delegated_frame_host_.get()); | 461 delegated_frame_host_->SetLayerOwner(window_); |
| 462 gfx::Screen::GetScreenFor(window_)->AddObserver(this); | 462 gfx::Screen::GetScreenFor(window_)->AddObserver(this); |
| 463 | 463 |
| 464 bool overscroll_enabled = CommandLine::ForCurrentProcess()-> | 464 bool overscroll_enabled = CommandLine::ForCurrentProcess()-> |
| 465 GetSwitchValueASCII(switches::kOverscrollHistoryNavigation) != "0"; | 465 GetSwitchValueASCII(switches::kOverscrollHistoryNavigation) != "0"; |
| 466 SetOverscrollControllerEnabled(overscroll_enabled); | 466 SetOverscrollControllerEnabled(overscroll_enabled); |
| 467 } | 467 } |
| 468 | 468 |
| 469 //////////////////////////////////////////////////////////////////////////////// | 469 //////////////////////////////////////////////////////////////////////////////// |
| 470 // RenderWidgetHostViewAura, RenderWidgetHostView implementation: | 470 // RenderWidgetHostViewAura, RenderWidgetHostView implementation: |
| 471 | 471 |
| (...skipping 2012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2484 | 2484 |
| 2485 //////////////////////////////////////////////////////////////////////////////// | 2485 //////////////////////////////////////////////////////////////////////////////// |
| 2486 // RenderWidgetHostViewBase, public: | 2486 // RenderWidgetHostViewBase, public: |
| 2487 | 2487 |
| 2488 // static | 2488 // static |
| 2489 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2489 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 2490 GetScreenInfoForWindow(results, NULL); | 2490 GetScreenInfoForWindow(results, NULL); |
| 2491 } | 2491 } |
| 2492 | 2492 |
| 2493 } // namespace content | 2493 } // namespace content |
| OLD | NEW |