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

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

Issue 1158523002: Add user_gesture param to BaseWindow::Show Base URL: https://chromium.googlesource.com/chromium/src.git@ug3_BaseWindow_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 | « extensions/shell/browser/shell_native_app_window_aura.h ('k') | ui/base/base_window.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 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 26 matching lines...) Expand all
37 } 37 }
38 38
39 gfx::NativeWindow ShellNativeAppWindowAura::GetNativeWindow() const { 39 gfx::NativeWindow ShellNativeAppWindowAura::GetNativeWindow() const {
40 return app_window()->web_contents()->GetNativeView(); 40 return app_window()->web_contents()->GetNativeView();
41 } 41 }
42 42
43 gfx::Rect ShellNativeAppWindowAura::GetBounds() const { 43 gfx::Rect ShellNativeAppWindowAura::GetBounds() const {
44 return GetNativeWindow()->GetBoundsInScreen(); 44 return GetNativeWindow()->GetBoundsInScreen();
45 } 45 }
46 46
47 void ShellNativeAppWindowAura::Show() { 47 void ShellNativeAppWindowAura::Show(bool user_gesture) {
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(bool user_gesture) { 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
« no previous file with comments | « extensions/shell/browser/shell_native_app_window_aura.h ('k') | ui/base/base_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698