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

Side by Side Diff: chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm

Issue 1153813003: Add user_gesture param to WebContentsDelegate::ActivateContents Base URL: https://chromium.googlesource.com/chromium/src.git@ug1_WebContentsImpl_Activate
Patch Set: Update callers Created 5 years, 7 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 | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/panels/panel_host.h » ('j') | 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 "chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.h" 5 #include "chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 : public app_modal::JavaScriptNativeDialogFactory { 455 : public app_modal::JavaScriptNativeDialogFactory {
456 public: 456 public:
457 ChromeJavaScriptNativeDialogCocoaFactory() {} 457 ChromeJavaScriptNativeDialogCocoaFactory() {}
458 ~ChromeJavaScriptNativeDialogCocoaFactory() override {} 458 ~ChromeJavaScriptNativeDialogCocoaFactory() override {}
459 459
460 private: 460 private:
461 app_modal::NativeAppModalDialog* CreateNativeJavaScriptDialog( 461 app_modal::NativeAppModalDialog* CreateNativeJavaScriptDialog(
462 app_modal::JavaScriptAppModalDialog* dialog) override { 462 app_modal::JavaScriptAppModalDialog* dialog) override {
463 app_modal::NativeAppModalDialog* d = 463 app_modal::NativeAppModalDialog* d =
464 new JavaScriptAppModalDialogCocoa(dialog); 464 new JavaScriptAppModalDialogCocoa(dialog);
465 // TODO(johnme): Can we sometimes be certain this was for a user gesture?
465 dialog->web_contents()->GetDelegate()->ActivateContents( 466 dialog->web_contents()->GetDelegate()->ActivateContents(
466 dialog->web_contents()); 467 dialog->web_contents(), false /* user_gesture */);
467 return d; 468 return d;
468 } 469 }
469 470
470 DISALLOW_COPY_AND_ASSIGN(ChromeJavaScriptNativeDialogCocoaFactory); 471 DISALLOW_COPY_AND_ASSIGN(ChromeJavaScriptNativeDialogCocoaFactory);
471 }; 472 };
472 473
473 } // namespace 474 } // namespace
474 475
475 void InstallChromeJavaScriptNativeDialogFactory() { 476 void InstallChromeJavaScriptNativeDialogFactory() {
476 app_modal::JavaScriptDialogManager::GetInstance()-> 477 app_modal::JavaScriptDialogManager::GetInstance()->
477 SetNativeDialogFactory( 478 SetNativeDialogFactory(
478 make_scoped_ptr(new ChromeJavaScriptNativeDialogCocoaFactory)); 479 make_scoped_ptr(new ChromeJavaScriptNativeDialogCocoaFactory));
479 } 480 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/panels/panel_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698