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

Side by Side Diff: chrome/browser/ui/views/frame/browser_frame_ash.cc

Issue 1550053002: Convert Pass()→std::move() in //chrome/browser/ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/views/frame/browser_frame_ash.h" 5 #include "chrome/browser/ui/views/frame/browser_frame_ash.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/wm/window_properties.h" 8 #include "ash/wm/window_properties.h"
9 #include "ash/wm/window_state.h" 9 #include "ash/wm/window_state.h"
10 #include "ash/wm/window_state_delegate.h" 10 #include "ash/wm/window_state_delegate.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 const char BrowserFrameAsh::kWindowName[] = "BrowserFrameAsh"; 56 const char BrowserFrameAsh::kWindowName[] = "BrowserFrameAsh";
57 57
58 BrowserFrameAsh::BrowserFrameAsh(BrowserFrame* browser_frame, 58 BrowserFrameAsh::BrowserFrameAsh(BrowserFrame* browser_frame,
59 BrowserView* browser_view) 59 BrowserView* browser_view)
60 : views::NativeWidgetAura(browser_frame), 60 : views::NativeWidgetAura(browser_frame),
61 browser_view_(browser_view) { 61 browser_view_(browser_view) {
62 GetNativeWindow()->SetName(kWindowName); 62 GetNativeWindow()->SetName(kWindowName);
63 Browser* browser = browser_view->browser(); 63 Browser* browser = browser_view->browser();
64 ash::wm::WindowState* window_state = 64 ash::wm::WindowState* window_state =
65 ash::wm::GetWindowState(GetNativeWindow()); 65 ash::wm::GetWindowState(GetNativeWindow());
66 window_state->SetDelegate( 66 window_state->SetDelegate(scoped_ptr<ash::wm::WindowStateDelegate>(
67 scoped_ptr<ash::wm::WindowStateDelegate>( 67 new BrowserWindowStateDelegate(browser)));
68 new BrowserWindowStateDelegate(browser)).Pass());
69 68
70 // Turn on auto window management if we don't need an explicit bounds. 69 // Turn on auto window management if we don't need an explicit bounds.
71 // This way the requested bounds are honored. 70 // This way the requested bounds are honored.
72 if (!browser->bounds_overridden() && !browser->is_session_restore()) 71 if (!browser->bounds_overridden() && !browser->is_session_restore())
73 SetWindowAutoManaged(); 72 SetWindowAutoManaged();
74 #if defined(OS_CHROMEOS) 73 #if defined(OS_CHROMEOS)
75 // For legacy reasons v1 apps (like Secure Shell) are allowed to consume keys 74 // For legacy reasons v1 apps (like Secure Shell) are allowed to consume keys
76 // like brightness, volume, etc. Otherwise these keys are handled by the 75 // like brightness, volume, etc. Otherwise these keys are handled by the
77 // Ash window manager. 76 // Ash window manager.
78 window_state->set_can_consume_system_keys(browser->is_app()); 77 window_state->set_can_consume_system_keys(browser->is_app());
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 /////////////////////////////////////////////////////////////////////////////// 172 ///////////////////////////////////////////////////////////////////////////////
174 // BrowserFrameAsh, private: 173 // BrowserFrameAsh, private:
175 174
176 void BrowserFrameAsh::SetWindowAutoManaged() { 175 void BrowserFrameAsh::SetWindowAutoManaged() {
177 if (!browser_view_->browser()->is_type_popup() || 176 if (!browser_view_->browser()->is_type_popup() ||
178 browser_view_->browser()->is_app()) { 177 browser_view_->browser()->is_app()) {
179 ash::wm::GetWindowState(GetNativeWindow())-> 178 ash::wm::GetWindowState(GetNativeWindow())->
180 set_window_position_managed(true); 179 set_window_position_managed(true);
181 } 180 }
182 } 181 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_frame.cc ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698