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

Side by Side Diff: chrome/browser/tab_contents/infobar.h

Issue 7981045: Make infobars ignore button clicks when closing. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 3 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 #ifndef CHROME_BROWSER_TAB_CONTENTS_INFOBAR_H_ 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_INFOBAR_H_
6 #define CHROME_BROWSER_TAB_CONTENTS_INFOBAR_H_ 6 #define CHROME_BROWSER_TAB_CONTENTS_INFOBAR_H_
7 #pragma once 7 #pragma once
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 int arrow_height() const { return arrow_height_; } 72 int arrow_height() const { return arrow_height_; }
73 int arrow_target_height() const { return arrow_target_height_; } 73 int arrow_target_height() const { return arrow_target_height_; }
74 int arrow_half_width() const { return arrow_half_width_; } 74 int arrow_half_width() const { return arrow_half_width_; }
75 int total_height() const { return arrow_height_ + bar_height_; } 75 int total_height() const { return arrow_height_ + bar_height_; }
76 76
77 protected: 77 protected:
78 // ui::AnimationDelegate: 78 // ui::AnimationDelegate:
79 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; 79 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
80 80
81 // Forwards a close request to our owner. 81 // Forwards a close request to our owner.
82 // NOTE: Subclasses should not call this if we're already unowned.
82 void RemoveSelf(); 83 void RemoveSelf();
83 84
84 // Changes the target height of the main ("bar") portion of the infobar. 85 // Changes the target height of the main ("bar") portion of the infobar.
85 void SetBarTargetHeight(int height); 86 void SetBarTargetHeight(int height);
86 87
87 // Given a control with size |prefsize|, returns the centered y position 88 // Given a control with size |prefsize|, returns the centered y position
88 // within us, taking into account animation so the control "slides in" (or 89 // within us, taking into account animation so the control "slides in" (or
89 // out) as we animate open and closed. 90 // out) as we animate open and closed.
90 int OffsetY(const gfx::Size& prefsize) const; 91 int OffsetY(const gfx::Size& prefsize) const;
91 92
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 int bar_target_height_; 133 int bar_target_height_;
133 134
134 DISALLOW_COPY_AND_ASSIGN(InfoBar); 135 DISALLOW_COPY_AND_ASSIGN(InfoBar);
135 }; 136 };
136 137
137 #elif defined(OS_MACOSX) 138 #elif defined(OS_MACOSX)
138 #include "chrome/browser/ui/cocoa/infobars/infobar.h" 139 #include "chrome/browser/ui/cocoa/infobars/infobar.h"
139 #endif 140 #endif
140 141
141 #endif // CHROME_BROWSER_TAB_CONTENTS_INFOBAR_H_ 142 #endif // CHROME_BROWSER_TAB_CONTENTS_INFOBAR_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/tab_contents/infobar.cc » ('j') | chrome/browser/ui/cocoa/infobars/infobar_controller.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698