| 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/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1317 | 1317 |
| 1318 void WebContentsImpl::RenderWidgetGotFocus( | 1318 void WebContentsImpl::RenderWidgetGotFocus( |
| 1319 RenderWidgetHostImpl* render_widget_host) { | 1319 RenderWidgetHostImpl* render_widget_host) { |
| 1320 // Notify the delegate if an embedded fullscreen widget was focused. | 1320 // Notify the delegate if an embedded fullscreen widget was focused. |
| 1321 if (delegate_ && render_widget_host && | 1321 if (delegate_ && render_widget_host && |
| 1322 delegate_->EmbedsFullscreenWidget() && | 1322 delegate_->EmbedsFullscreenWidget() && |
| 1323 render_widget_host->GetView() == GetFullscreenRenderWidgetHostView()) | 1323 render_widget_host->GetView() == GetFullscreenRenderWidgetHostView()) |
| 1324 delegate_->WebContentsFocused(this); | 1324 delegate_->WebContentsFocused(this); |
| 1325 } | 1325 } |
| 1326 | 1326 |
| 1327 void WebContentsImpl::RenderWidgetWasResized( |
| 1328 RenderWidgetHostImpl* render_widget_host) { |
| 1329 if (render_widget_host != |
| 1330 static_cast<RenderFrameHostImpl*>(GetMainFrame()) |
| 1331 ->GetRenderWidgetHost()) { |
| 1332 return; |
| 1333 } |
| 1334 |
| 1335 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MainFrameWasResized()); |
| 1336 } |
| 1337 |
| 1327 bool WebContentsImpl::PreHandleKeyboardEvent( | 1338 bool WebContentsImpl::PreHandleKeyboardEvent( |
| 1328 const NativeWebKeyboardEvent& event, | 1339 const NativeWebKeyboardEvent& event, |
| 1329 bool* is_keyboard_shortcut) { | 1340 bool* is_keyboard_shortcut) { |
| 1330 return delegate_ && | 1341 return delegate_ && |
| 1331 delegate_->PreHandleKeyboardEvent(this, event, is_keyboard_shortcut); | 1342 delegate_->PreHandleKeyboardEvent(this, event, is_keyboard_shortcut); |
| 1332 } | 1343 } |
| 1333 | 1344 |
| 1334 void WebContentsImpl::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { | 1345 void WebContentsImpl::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { |
| 1335 if (browser_plugin_embedder_ && | 1346 if (browser_plugin_embedder_ && |
| 1336 browser_plugin_embedder_->HandleKeyboardEvent(event)) { | 1347 browser_plugin_embedder_->HandleKeyboardEvent(event)) { |
| (...skipping 3070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4407 node->render_manager()->ResumeResponseDeferredAtStart(); | 4418 node->render_manager()->ResumeResponseDeferredAtStart(); |
| 4408 } | 4419 } |
| 4409 | 4420 |
| 4410 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4421 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
| 4411 force_disable_overscroll_content_ = force_disable; | 4422 force_disable_overscroll_content_ = force_disable; |
| 4412 if (view_) | 4423 if (view_) |
| 4413 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4424 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
| 4414 } | 4425 } |
| 4415 | 4426 |
| 4416 } // namespace content | 4427 } // namespace content |
| OLD | NEW |