Chromium Code Reviews| 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_mac.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h" |
| 6 | 6 |
| 7 #import <Carbon/Carbon.h> | 7 #import <Carbon/Carbon.h> |
| 8 #import <objc/runtime.h> | 8 #import <objc/runtime.h> |
| 9 #include <OpenGL/gl.h> | 9 #include <OpenGL/gl.h> |
| 10 #include <QuartzCore/QuartzCore.h> | 10 #include <QuartzCore/QuartzCore.h> |
| (...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 557 return GetTextInputManager()->GetTextInputState()->type; | 557 return GetTextInputManager()->GetTextInputState()->type; |
| 558 } | 558 } |
| 559 | 559 |
| 560 RenderWidgetHostImpl* RenderWidgetHostViewMac::GetActiveWidget() { | 560 RenderWidgetHostImpl* RenderWidgetHostViewMac::GetActiveWidget() { |
| 561 return GetTextInputManager() ? GetTextInputManager()->GetActiveWidget() | 561 return GetTextInputManager() ? GetTextInputManager()->GetActiveWidget() |
| 562 : nullptr; | 562 : nullptr; |
| 563 } | 563 } |
| 564 | 564 |
| 565 const TextInputManager::CompositionRangeInfo* | 565 const TextInputManager::CompositionRangeInfo* |
| 566 RenderWidgetHostViewMac::GetCompositionRangeInfo() { | 566 RenderWidgetHostViewMac::GetCompositionRangeInfo() { |
| 567 return text_input_manager_->GetCompositionRangeInfo(); | 567 return GetTextInputManager() ? text_input_manager_->GetCompositionRangeInfo() |
|
EhsanK
2017/04/10 15:30:39
This is similar to lines 557 and 561 above. I thin
| |
| 568 : nullptr; | |
| 568 } | 569 } |
| 569 | 570 |
| 570 const TextInputManager::TextSelection* | 571 const TextInputManager::TextSelection* |
| 571 RenderWidgetHostViewMac::GetTextSelection() { | 572 RenderWidgetHostViewMac::GetTextSelection() { |
| 572 return text_input_manager_->GetTextSelection( | 573 return text_input_manager_->GetTextSelection( |
| 573 GetFocusedViewForTextSelection()); | 574 GetFocusedViewForTextSelection()); |
| 574 } | 575 } |
| 575 | 576 |
| 576 /////////////////////////////////////////////////////////////////////////////// | 577 /////////////////////////////////////////////////////////////////////////////// |
| 577 // RenderWidgetHostViewMac, RenderWidgetHostView implementation: | 578 // RenderWidgetHostViewMac, RenderWidgetHostView implementation: |
| (...skipping 2929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3507 | 3508 |
| 3508 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding | 3509 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding |
| 3509 // regions that are not draggable. (See ControlRegionView in | 3510 // regions that are not draggable. (See ControlRegionView in |
| 3510 // native_app_window_cocoa.mm). This requires the render host view to be | 3511 // native_app_window_cocoa.mm). This requires the render host view to be |
| 3511 // draggable by default. | 3512 // draggable by default. |
| 3512 - (BOOL)mouseDownCanMoveWindow { | 3513 - (BOOL)mouseDownCanMoveWindow { |
| 3513 return YES; | 3514 return YES; |
| 3514 } | 3515 } |
| 3515 | 3516 |
| 3516 @end | 3517 @end |
| OLD | NEW |