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

Side by Side Diff: content/browser/web_contents/web_contents_view_mac.mm

Issue 2005953002: [mac][views] Notify web_contents focused. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
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 #import <Carbon/Carbon.h> 5 #import <Carbon/Carbon.h>
6 6
7 #import "content/browser/web_contents/web_contents_view_mac.h" 7 #import "content/browser/web_contents/web_contents_view_mac.h"
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 219
220 DropData* WebContentsViewMac::GetDropData() const { 220 DropData* WebContentsViewMac::GetDropData() const {
221 return [cocoa_view_ dropData]; 221 return [cocoa_view_ dropData];
222 } 222 }
223 223
224 void WebContentsViewMac::UpdateDragCursor(WebDragOperation operation) { 224 void WebContentsViewMac::UpdateDragCursor(WebDragOperation operation) {
225 [cocoa_view_ setCurrentDragOperation: operation]; 225 [cocoa_view_ setCurrentDragOperation: operation];
226 } 226 }
227 227
228 void WebContentsViewMac::GotFocus() { 228 void WebContentsViewMac::GotFocus() {
229 // This is only used in the views FocusManager stuff but it bleeds through 229 // This is only used in the views FocusManager stuff but it bleeds through
tapted 2016/06/01 11:34:47 this comment isn't needed any longer
Avi (use Gerrit) 2016/06/01 13:43:38 Agreed.
yamaxim 2016/06/01 14:23:55 Deleted
230 // all subclasses. http://crbug.com/21875 230 // all subclasses. http://crbug.com/21875
231 web_contents_->NotifyWebContentsFocused();
231 } 232 }
232 233
233 // This is called when the renderer asks us to take focus back (i.e., it has 234 // This is called when the renderer asks us to take focus back (i.e., it has
234 // iterated past the last focusable element on the page). 235 // iterated past the last focusable element on the page).
235 void WebContentsViewMac::TakeFocus(bool reverse) { 236 void WebContentsViewMac::TakeFocus(bool reverse) {
236 if (reverse) { 237 if (reverse) {
237 [[cocoa_view_ window] selectPreviousKeyView:cocoa_view_.get()]; 238 [[cocoa_view_ window] selectPreviousKeyView:cocoa_view_.get()];
238 } else { 239 } else {
239 [[cocoa_view_ window] selectNextKeyView:cocoa_view_.get()]; 240 [[cocoa_view_ window] selectNextKeyView:cocoa_view_.get()];
240 } 241 }
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 680
680 - (void)viewDidHide { 681 - (void)viewDidHide {
681 [self updateWebContentsVisibility]; 682 [self updateWebContentsVisibility];
682 } 683 }
683 684
684 - (void)viewDidUnhide { 685 - (void)viewDidUnhide {
685 [self updateWebContentsVisibility]; 686 [self updateWebContentsVisibility];
686 } 687 }
687 688
688 @end 689 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698