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

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

Issue 2939943004: Fix duplicate logging of ActiveBrowserChanged action on views. (Closed)
Patch Set: Fix ChromeVisibilityObserverBrowserTest on windows. Created 3 years, 5 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/views/frame/browser_frame.h ('k') | no next file » | 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/views/frame/browser_frame.h" 5 #include "chrome/browser/ui/views/frame/browser_frame.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/leak_annotations.h" 10 #include "base/debug/leak_annotations.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 if (browser_view_ && 198 if (browser_view_ &&
199 browser_view_->immersive_mode_controller()->IsRevealed()) { 199 browser_view_->immersive_mode_controller()->IsRevealed()) {
200 // This function should not be reentrant because the TopContainerView 200 // This function should not be reentrant because the TopContainerView
201 // paints to a layer for the duration of the immersive reveal. 201 // paints to a layer for the duration of the immersive reveal.
202 views::View* top_container = browser_view_->top_container(); 202 views::View* top_container = browser_view_->top_container();
203 CHECK(top_container->layer()); 203 CHECK(top_container->layer());
204 top_container->SchedulePaintInRect(rect); 204 top_container->SchedulePaintInRect(rect);
205 } 205 }
206 } 206 }
207 207
208 void BrowserFrame::OnNativeWidgetActivationChanged(bool active) {
209 if (active) {
210 // When running under remote desktop, if the remote desktop client is not
211 // active on the users desktop, then none of the windows contained in the
212 // remote desktop will be activated. However, NativeWidget::Activate() will
213 // still bring this browser window to the foreground. We explicitly set
214 // ourselves as the last active browser window to ensure that we get treated
215 // as such by the rest of Chrome.
216 BrowserList::SetLastActive(browser_view_->browser());
217 } else {
218 BrowserList::NotifyBrowserNoLongerActive(browser_view_->browser());
219 }
220 Widget::OnNativeWidgetActivationChanged(active);
221 }
222
223 void BrowserFrame::OnNativeWidgetWorkspaceChanged() { 208 void BrowserFrame::OnNativeWidgetWorkspaceChanged() {
224 chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace()); 209 chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace());
225 #if !defined(OS_CHROMEOS) && defined(USE_X11) 210 #if !defined(OS_CHROMEOS) && defined(USE_X11)
226 BrowserList::MoveBrowsersInWorkspaceToFront( 211 BrowserList::MoveBrowsersInWorkspaceToFront(
227 views::X11DesktopHandler::get()->GetWorkspace()); 212 views::X11DesktopHandler::get()->GetWorkspace());
228 #endif 213 #endif
229 Widget::OnNativeWidgetWorkspaceChanged(); 214 Widget::OnNativeWidgetWorkspaceChanged();
230 } 215 }
231 216
232 void BrowserFrame::OnNativeThemeUpdated(ui::NativeTheme* observed_theme) { 217 void BrowserFrame::OnNativeThemeUpdated(ui::NativeTheme* observed_theme) {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 return menu_model_builder_->menu_model(); 262 return menu_model_builder_->menu_model();
278 } 263 }
279 264
280 views::View* BrowserFrame::GetNewAvatarMenuButton() { 265 views::View* BrowserFrame::GetNewAvatarMenuButton() {
281 return browser_frame_view_->GetProfileSwitcherView(); 266 return browser_frame_view_->GetProfileSwitcherView();
282 } 267 }
283 268
284 void BrowserFrame::OnMenuClosed() { 269 void BrowserFrame::OnMenuClosed() {
285 menu_runner_.reset(); 270 menu_runner_.reset();
286 } 271 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_frame.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698