~abreu-alexandre/unity-chromium-extension/fix-1138473

« back to all changes in this revision

Viewing changes to chromium-patches/stable-23.0.1271.64/fix-1034541.patch

  • Committer: Alexandre Abreu
  • Date: 2012-11-09 20:49:25 UTC
  • Revision ID: alexandre.abreu@canonical.com-20121109204925-3xy5tje8i0ouqkau
Add support for chromium new stable release v23

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: src/chrome/browser/ui/browser_finder.cc
 
2
===================================================================
 
3
--- src/chrome/browser/ui/browser_finder.cc     (revision 165188)
 
4
+++ src/chrome/browser/ui/browser_finder.cc     (working copy)
 
5
@@ -35,6 +35,7 @@
 
6
 const int kMatchOriginalProfile         = 1 << 0;
 
7
 const int kMatchCanSupportWindowFeature = 1 << 1;
 
8
 const int kMatchTabbed                  = 1 << 2;
 
9
+const int kMatchNonChromeless           = 1 << 3;
 
10
 
 
11
 // Returns true if the specified |browser| matches the specified arguments.
 
12
 // |match_types| is a bitmask dictating what parameters to match:
 
13
@@ -62,8 +63,12 @@
 
14
   }
 
15
 
 
16
   if (match_types & kMatchTabbed)
 
17
-    return browser->is_type_tabbed();
 
18
+    return browser->is_type_tabbed() &&
 
19
+      !browser->is_chromeless_mode();
 
20
 
 
21
+  if (match_types & kMatchNonChromeless)
 
22
+    return !browser->is_chromeless_mode();
 
23
+
 
24
   return true;
 
25
 }
 
26
 
 
27
@@ -91,7 +96,7 @@
 
28
       chrome::BrowserListImpl::GetInstance(desktop_type);
 
29
   if (!browser_list_impl)
 
30
     return NULL;
 
31
-  uint32 match_types = kMatchAny;
 
32
+  uint32 match_types = kMatchNonChromeless;
 
33
   if (match_tabbed)
 
34
     match_types |= kMatchTabbed;
 
35
   if (match_original_profiles)
 
36
@@ -186,7 +191,7 @@
 
37
   // all browsers like FindBrowserWith* do.
 
38
   return FindBrowserMatching(
 
39
       BrowserList::begin_last_active(), BrowserList::end_last_active(), profile,
 
40
-      Browser::FEATURE_NONE, kMatchAny);
 
41
+      Browser::FEATURE_NONE, kMatchNonChromeless);
 
42
 }