Lines Matching defs:browser

5 #include "chrome/browser/ui/ash/launcher/multi_profile_browser_status_monitor.h"
8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/profiles/profile_manager.h"
10 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
11 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
12 #include "chrome/browser/ui/browser.h"
13 #include "chrome/browser/ui/browser_list.h"
14 #include "chrome/browser/ui/browser_tabstrip.h"
15 #include "chrome/browser/ui/browser_window.h"
16 #include "chrome/browser/ui/settings_window_manager.h"
17 #include "chrome/browser/ui/tabs/tab_strip_model.h"
43 // Handle apps in browser tabs: Add the new applications.
50 Browser* browser = *it;
51 if (!browser->is_app() &&
52 browser->is_type_tabbed() &&
53 !multi_user_util::IsProfileFromActiveUser(browser->profile())) {
54 for (int i = 0; i < browser->tab_strip_model()->count(); ++i) {
56 browser->tab_strip_model()->GetWebContentsAt(i),
62 // Handle apps in browser tabs: Add new (tabbed V1) applications.
65 Browser* browser = *it;
66 if (!browser->is_app() &&
67 browser->is_type_tabbed() &&
68 multi_user_util::IsProfileFromActiveUser(browser->profile())) {
69 int active_index = browser->tab_strip_model()->active_index();
70 for (int i = 0; i < browser->tab_strip_model()->count(); ++i) {
72 browser->tab_strip_model()->GetWebContentsAt(i),
73 browser->window()->IsActive() && i == active_index ?
84 Browser* browser = *it;
86 browser)) {
89 if (multi_user_util::IsProfileFromActiveUser(browser->profile())) {
91 browser->window()->GetNativeWindow(),
95 ash::ClearShelfItemDetailsForWindow(browser->window()->GetNativeWindow());
99 // Update the browser state since some of the removals / adds above might have
100 // had an impact on the browser item.
104 void MultiProfileBrowserStatusMonitor::AddV1AppToShelf(Browser* browser) {
105 DCHECK(browser->is_type_popup() && browser->is_app());
106 DCHECK(std::find(app_list_.begin(), app_list_.end(), browser) ==
108 app_list_.push_back(browser);
109 if (multi_user_util::IsProfileFromActiveUser(browser->profile())) {
110 BrowserStatusMonitor::AddV1AppToShelf(browser);
114 void MultiProfileBrowserStatusMonitor::RemoveV1AppFromShelf(Browser* browser) {
115 DCHECK(browser->is_type_popup() && browser->is_app());
116 AppList::iterator it = std::find(app_list_.begin(), app_list_.end(), browser);
119 if (multi_user_util::IsProfileFromActiveUser(browser->profile())) {
120 BrowserStatusMonitor::RemoveV1AppFromShelf(browser);
125 Browser* browser) {
126 // Adding a V1 app to the launcher consists of two actions: Add the browser
128 BrowserStatusMonitor::AddV1AppToShelf(browser);
130 browser->tab_strip_model()->GetActiveWebContents(),
135 Browser* browser) {
139 browser->tab_strip_model()->GetActiveWebContents(),
141 BrowserStatusMonitor::RemoveV1AppFromShelf(browser);