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

Side by Side Diff: extensions/shell/browser/shell_native_app_window_aura.cc

Issue 1149263003: Add user_gesture param to BaseWindow::Activate Base URL: https://chromium.googlesource.com/chromium/src.git@ug2_WebContentsDelegate_ActivateContents
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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/shell/browser/shell_native_app_window_aura.h" 5 #include "extensions/shell/browser/shell_native_app_window_aura.h"
6 6
7 #include "content/public/browser/web_contents.h" 7 #include "content/public/browser/web_contents.h"
8 #include "ui/aura/window.h" 8 #include "ui/aura/window.h"
9 #include "ui/aura/window_tree_host.h" 9 #include "ui/aura/window_tree_host.h"
10 #include "ui/gfx/geometry/rect.h" 10 #include "ui/gfx/geometry/rect.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 } 45 }
46 46
47 void ShellNativeAppWindowAura::Show() { 47 void ShellNativeAppWindowAura::Show() {
48 GetNativeWindow()->Show(); 48 GetNativeWindow()->Show();
49 } 49 }
50 50
51 void ShellNativeAppWindowAura::Hide() { 51 void ShellNativeAppWindowAura::Hide() {
52 GetNativeWindow()->Hide(); 52 GetNativeWindow()->Hide();
53 } 53 }
54 54
55 void ShellNativeAppWindowAura::Activate() { 55 void ShellNativeAppWindowAura::Activate(bool user_gesture) {
56 aura::Window* window = GetNativeWindow(); 56 aura::Window* window = GetNativeWindow();
57 if (window) 57 if (window)
58 wm::ActivateWindow(window); 58 wm::ActivateWindow(window);
59 } 59 }
60 60
61 void ShellNativeAppWindowAura::Deactivate() { 61 void ShellNativeAppWindowAura::Deactivate() {
62 aura::Window* window = GetNativeWindow(); 62 aura::Window* window = GetNativeWindow();
63 if (window) 63 if (window)
64 wm::DeactivateWindow(window); 64 wm::DeactivateWindow(window);
65 } 65 }
66 66
67 void ShellNativeAppWindowAura::SetBounds(const gfx::Rect& bounds) { 67 void ShellNativeAppWindowAura::SetBounds(const gfx::Rect& bounds) {
68 GetNativeWindow()->SetBounds(bounds); 68 GetNativeWindow()->SetBounds(bounds);
69 } 69 }
70 70
71 } // namespace extensions 71 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698