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

Side by Side Diff: components/infobars/test/infobar_test.cc

Issue 752853005: Remove dependency from infobars component to the embedder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | « components/infobars/core/infobar_container.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/logging.h" 5 #include "base/logging.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "components/infobars/core/confirm_infobar_delegate.h" 7 #include "components/infobars/core/confirm_infobar_delegate.h"
8 #include "components/infobars/core/infobar.h" 8 #include "components/infobars/core/infobar.h"
9 9
10 // Provides definitions of static variables and functions that are declared in 10 // Provides definitions of static functions that are declared in the component
11 // the component but defined in the embedder. 11 // but defined in the embedder.
12 // TODO(blundell): The component shouldn't be declaring statics that it's not 12 // TODO(blundell): The component shouldn't be declaring statics that it's not
13 // defining; instead, this information should be obtained via a client, 13 // defining; instead, this information should be obtained via a client,
14 // which can have a test implementation. crbug.com/386171 14 // which can have a test implementation. crbug.com/386171
15 15
16 // On Android, these variables are defined in ../core/infobar_android.cc.
17 #if !defined(OS_ANDROID)
18 const int infobars::InfoBar::kSeparatorLineHeight = 1;
19 const int infobars::InfoBar::kDefaultArrowTargetHeight = 9;
20 const int infobars::InfoBar::kMaximumArrowTargetHeight = 24;
21 const int infobars::InfoBar::kDefaultArrowTargetHalfWidth =
22 kDefaultArrowTargetHeight;
23 const int infobars::InfoBar::kMaximumArrowTargetHalfWidth = 14;
24 const int infobars::InfoBar::kDefaultBarTargetHeight = 36;
25 #endif
26
27 // Some components' unittests exercise code that requires that 16 // Some components' unittests exercise code that requires that
28 // ConfirmInfoBarDelegate::CreateInfoBar() return a non-NULL infobar. 17 // ConfirmInfoBarDelegate::CreateInfoBar() return a non-NULL infobar.
29 scoped_ptr<infobars::InfoBar> ConfirmInfoBarDelegate::CreateInfoBar( 18 scoped_ptr<infobars::InfoBar> ConfirmInfoBarDelegate::CreateInfoBar(
30 scoped_ptr<ConfirmInfoBarDelegate> delegate) { 19 scoped_ptr<ConfirmInfoBarDelegate> delegate) {
31 return scoped_ptr<infobars::InfoBar>(new infobars::InfoBar(delegate.Pass())); 20 return scoped_ptr<infobars::InfoBar>(new infobars::InfoBar(delegate.Pass()));
32 } 21 }
OLDNEW
« no previous file with comments | « components/infobars/core/infobar_container.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698