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

Side by Side Diff: chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc

Issue 1779793003: Remove host_desktop_type() from browser.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-43
Patch Set: cros Created 4 years, 9 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/ash/launcher/browser_status_monitor.cc ('k') | chrome/browser/ui/browser.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 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 return; 118 return;
119 message_loop_runner_ = new content::MessageLoopRunner; 119 message_loop_runner_ = new content::MessageLoopRunner;
120 message_loop_runner_->Run(); 120 message_loop_runner_->Run();
121 } 121 }
122 122
123 private: 123 private:
124 // chrome::BrowserListObserver: 124 // chrome::BrowserListObserver:
125 void OnBrowserSetLastActive(Browser* browser) override { 125 void OnBrowserSetLastActive(Browser* browser) override {
126 if (browser == browser_) 126 if (browser == browser_)
127 return; 127 return;
128 if (browser->host_desktop_type() != browser_->host_desktop_type())
129 return;
130 observed_ = true; 128 observed_ = true;
131 if (message_loop_runner_.get() && message_loop_runner_->loop_running()) 129 if (message_loop_runner_.get() && message_loop_runner_->loop_running())
132 message_loop_runner_->Quit(); 130 message_loop_runner_->Quit();
133 } 131 }
134 132
135 Browser* browser_; 133 Browser* browser_;
136 bool observed_; 134 bool observed_;
137 scoped_refptr<content::MessageLoopRunner> message_loop_runner_; 135 scoped_refptr<content::MessageLoopRunner> message_loop_runner_;
138 136
139 DISALLOW_COPY_AND_ASSIGN(BrowserActivationObserver); 137 DISALLOW_COPY_AND_ASSIGN(BrowserActivationObserver);
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 687
690 wait_for_new_tab.Wait(); 688 wait_for_new_tab.Wait();
691 689
692 ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile())); 690 ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile()));
693 ASSERT_EQ(2, browser()->tab_strip_model()->count()); 691 ASSERT_EQ(2, browser()->tab_strip_model()->count());
694 // Check that we create the background tab. 692 // Check that we create the background tab.
695 ASSERT_EQ(0, browser()->tab_strip_model()->active_index()); 693 ASSERT_EQ(0, browser()->tab_strip_model()->active_index());
696 } 694 }
697 695
698 } // namespace 696 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/browser_status_monitor.cc ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698