Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 2702243002: Do not send blur to the original window when JS popup shows.
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after
1614 1614
1615 void RenderWidgetHostViewMac::ShutdownHost() { 1615 void RenderWidgetHostViewMac::ShutdownHost() {
1616 weak_factory_.InvalidateWeakPtrs(); 1616 weak_factory_.InvalidateWeakPtrs();
1617 render_widget_host_->ShutdownAndDestroyWidget(true); 1617 render_widget_host_->ShutdownAndDestroyWidget(true);
1618 // Do not touch any members at this point, |this| has been deleted. 1618 // Do not touch any members at this point, |this| has been deleted.
1619 } 1619 }
1620 1620
1621 void RenderWidgetHostViewMac::SetActive(bool active) { 1621 void RenderWidgetHostViewMac::SetActive(bool active) {
1622 if (render_widget_host_) { 1622 if (render_widget_host_) {
1623 render_widget_host_->SetActive(active); 1623 render_widget_host_->SetActive(active);
1624 if (active) {
1625 if (HasFocus())
1626 render_widget_host_->Focus();
1627 } else {
1628 render_widget_host_->Blur();
1629 }
1630 } 1624 }
1631 if (HasFocus()) 1625 if (HasFocus())
1632 SetTextInputActive(active); 1626 SetTextInputActive(active);
1633 if (!active) 1627 if (!active)
1634 UnlockMouse(); 1628 UnlockMouse();
1635 } 1629 }
1636 1630
1637 void RenderWidgetHostViewMac::ShowDefinitionForSelection() { 1631 void RenderWidgetHostViewMac::ShowDefinitionForSelection() {
1638 RenderWidgetHostViewMacDictionaryHelper helper(this); 1632 RenderWidgetHostViewMacDictionaryHelper helper(this);
1639 helper.ShowDefinitionForSelection(); 1633 helper.ShowDefinitionForSelection();
(...skipping 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after
3473 3467
3474 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 3468 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
3475 // regions that are not draggable. (See ControlRegionView in 3469 // regions that are not draggable. (See ControlRegionView in
3476 // native_app_window_cocoa.mm). This requires the render host view to be 3470 // native_app_window_cocoa.mm). This requires the render host view to be
3477 // draggable by default. 3471 // draggable by default.
3478 - (BOOL)mouseDownCanMoveWindow { 3472 - (BOOL)mouseDownCanMoveWindow {
3479 return YES; 3473 return YES;
3480 } 3474 }
3481 3475
3482 @end 3476 @end
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698