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

Side by Side Diff: content/common/window_container_type.cc

Issue 8346017: Move content_browser_client.h to public, and while at it, move (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Missed a file post merge. Created 9 years, 2 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
« no previous file with comments | « content/common/window_container_type.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/common/window_container_type.h"
6
7 #include "base/string_util.h"
8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h"
11
12 namespace {
13
14 const char kBackground[] = "background";
15 const char kPersistent[] = "persistent";
16
17 }
18
19 WindowContainerType WindowFeaturesToContainerType(
20 const WebKit::WebWindowFeatures& window_features) {
21 bool background = false;
22 bool persistent = false;
23
24 for (size_t i = 0; i < window_features.additionalFeatures.size(); ++i) {
25 if (LowerCaseEqualsASCII(window_features.additionalFeatures[i],
26 kBackground))
27 background = true;
28 else if (LowerCaseEqualsASCII(window_features.additionalFeatures[i],
29 kPersistent))
30 persistent = true;
31 }
32
33 if (background) {
34 if (persistent)
35 return WINDOW_CONTAINER_TYPE_PERSISTENT;
36 else
37 return WINDOW_CONTAINER_TYPE_BACKGROUND;
38 } else {
39 return WINDOW_CONTAINER_TYPE_NORMAL;
40 }
41 }
OLDNEW
« no previous file with comments | « content/common/window_container_type.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698