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

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

Issue 12022002: Fixing activation states from the new launcher. Also adding a whole bunch of unit tests for the new… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed problem with ASAN unittest Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 635
636 void BrowserView::FlashFrame(bool flash) { 636 void BrowserView::FlashFrame(bool flash) {
637 frame_->FlashFrame(flash); 637 frame_->FlashFrame(flash);
638 } 638 }
639 639
640 bool BrowserView::IsAlwaysOnTop() const { 640 bool BrowserView::IsAlwaysOnTop() const {
641 return false; 641 return false;
642 } 642 }
643 643
644 gfx::NativeWindow BrowserView::GetNativeWindow() { 644 gfx::NativeWindow BrowserView::GetNativeWindow() {
645 // While the browser destruction is going on, the widget can already be gone,
646 // but utility functions like FindBrowserWithWindow will come here and crash.
647 // We short circuit therefore.
648 if (!GetWidget())
649 return NULL;
645 return GetWidget()->GetTopLevelWidget()->GetNativeWindow(); 650 return GetWidget()->GetTopLevelWidget()->GetNativeWindow();
646 } 651 }
647 652
648 BrowserWindowTesting* BrowserView::GetBrowserWindowTesting() { 653 BrowserWindowTesting* BrowserView::GetBrowserWindowTesting() {
649 return this; 654 return this;
650 } 655 }
651 656
652 StatusBubble* BrowserView::GetStatusBubble() { 657 StatusBubble* BrowserView::GetStatusBubble() {
653 return status_bubble_.get(); 658 return status_bubble_.get();
654 } 659 }
(...skipping 1948 matching lines...) Expand 10 before | Expand all | Expand 10 after
2603 2608
2604 Browser* modal_browser = 2609 Browser* modal_browser =
2605 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); 2610 chrome::FindBrowserWithWebContents(active_dialog->web_contents());
2606 if (modal_browser && (browser_ != modal_browser)) { 2611 if (modal_browser && (browser_ != modal_browser)) {
2607 modal_browser->window()->FlashFrame(true); 2612 modal_browser->window()->FlashFrame(true);
2608 modal_browser->window()->Activate(); 2613 modal_browser->window()->Activate();
2609 } 2614 }
2610 2615
2611 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); 2616 AppModalDialogQueue::GetInstance()->ActivateModalDialog();
2612 } 2617 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app_unittest.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698