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

Side by Side Diff: chrome/browser/extensions/extension_infobar_delegate.cc

Issue 9433044: Fix extensions compile issues for Android on sync_unit_tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 10 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/extensions/extension_infobar_delegate.h" 5 #include "chrome/browser/extensions/extension_infobar_delegate.h"
6 6
7 #include "chrome/browser/extensions/extension_host.h" 7 #include "chrome/browser/extensions/extension_host.h"
8 #include "chrome/browser/extensions/extension_process_manager.h" 8 #include "chrome/browser/extensions/extension_process_manager.h"
9 #include "chrome/browser/infobars/infobar.h" 9 #include "chrome/browser/infobars/infobar.h"
10 #include "chrome/browser/infobars/infobar_tab_helper.h" 10 #include "chrome/browser/infobars/infobar_tab_helper.h"
(...skipping 24 matching lines...) Expand all
35 content::Source<Profile>(browser->profile())); 35 content::Source<Profile>(browser->profile()));
36 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, 36 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
37 content::Source<Profile>(browser->profile())); 37 content::Source<Profile>(browser->profile()));
38 38
39 #if defined(TOOLKIT_VIEWS) || defined(TOOLKIT_GTK) 39 #if defined(TOOLKIT_VIEWS) || defined(TOOLKIT_GTK)
40 int default_height = InfoBar::kDefaultBarTargetHeight; 40 int default_height = InfoBar::kDefaultBarTargetHeight;
41 #elif defined(OS_MACOSX) 41 #elif defined(OS_MACOSX)
42 // TODO(pkasting): Once Infobars have been ported to Mac, we can remove the 42 // TODO(pkasting): Once Infobars have been ported to Mac, we can remove the
43 // ifdefs and just use the Infobar constant below. 43 // ifdefs and just use the Infobar constant below.
44 int default_height = 36; 44 int default_height = 36;
45 #elif defined(OS_ANDROID)
46 // TODO(dtrainor): This is not used. Might need to pull this from Android UI
47 // level in the future. Tracked via issue 115303.
48 int default_height = 36;
45 #endif 49 #endif
46 height_ = std::max(0, height); 50 height_ = std::max(0, height);
47 height_ = std::min(2 * default_height, height_); 51 height_ = std::min(2 * default_height, height_);
48 if (height_ == 0) 52 if (height_ == 0)
49 height_ = default_height; 53 height_ = default_height;
50 } 54 }
51 55
52 ExtensionInfoBarDelegate::~ExtensionInfoBarDelegate() { 56 ExtensionInfoBarDelegate::~ExtensionInfoBarDelegate() {
53 if (observer_) 57 if (observer_)
54 observer_->OnDelegateDeleted(); 58 observer_->OnDelegateDeleted();
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 if (extension_host_.get() == content::Details<ExtensionHost>(details).ptr()) 95 if (extension_host_.get() == content::Details<ExtensionHost>(details).ptr())
92 RemoveSelf(); 96 RemoveSelf();
93 } else { 97 } else {
94 DCHECK(type == chrome::NOTIFICATION_EXTENSION_UNLOADED); 98 DCHECK(type == chrome::NOTIFICATION_EXTENSION_UNLOADED);
95 if (extension_ == 99 if (extension_ ==
96 content::Details<UnloadedExtensionInfo>(details)->extension) { 100 content::Details<UnloadedExtensionInfo>(details)->extension) {
97 RemoveSelf(); 101 RemoveSelf();
98 } 102 }
99 } 103 }
100 } 104 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_host.h ('k') | chrome/browser/extensions/extension_warning_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698