| OLD | NEW | 
|    1 // Copyright 2016 The Chromium Authors. All rights reserved. |    1 // Copyright 2016 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 UI_VIEWS_BUBBLE_BUBBLE_DIALOG_DELEGATE_H_ |    5 #ifndef UI_VIEWS_BUBBLE_BUBBLE_DIALOG_DELEGATE_H_ | 
|    6 #define UI_VIEWS_BUBBLE_BUBBLE_DIALOG_DELEGATE_H_ |    6 #define UI_VIEWS_BUBBLE_BUBBLE_DIALOG_DELEGATE_H_ | 
|    7  |    7  | 
|    8 #include "base/gtest_prod_util.h" |    8 #include "base/gtest_prod_util.h" | 
|    9 #include "base/macros.h" |    9 #include "base/macros.h" | 
|   10 #include "ui/views/bubble/bubble_border.h" |   10 #include "ui/views/bubble/bubble_border.h" | 
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   92   bool border_accepts_events() const { return border_accepts_events_; } |   92   bool border_accepts_events() const { return border_accepts_events_; } | 
|   93   void set_border_accepts_events(bool event) { border_accepts_events_ = event; } |   93   void set_border_accepts_events(bool event) { border_accepts_events_ = event; } | 
|   94  |   94  | 
|   95   bool adjust_if_offscreen() const { return adjust_if_offscreen_; } |   95   bool adjust_if_offscreen() const { return adjust_if_offscreen_; } | 
|   96   void set_adjust_if_offscreen(bool adjust) { adjust_if_offscreen_ = adjust; } |   96   void set_adjust_if_offscreen(bool adjust) { adjust_if_offscreen_ = adjust; } | 
|   97  |   97  | 
|   98   // Get the arrow's anchor rect in screen space. |   98   // Get the arrow's anchor rect in screen space. | 
|   99   virtual gfx::Rect GetAnchorRect() const; |   99   virtual gfx::Rect GetAnchorRect() const; | 
|  100  |  100  | 
|  101   // Allows delegates to provide custom parameters before widget initialization. |  101   // Allows delegates to provide custom parameters before widget initialization. | 
 |  102   // For example, mus needs to set a custom mus::Window* parent. | 
|  102   virtual void OnBeforeBubbleWidgetInit(Widget::InitParams* params, |  103   virtual void OnBeforeBubbleWidgetInit(Widget::InitParams* params, | 
|  103                                         Widget* widget) const; |  104                                         Widget* widget) const; | 
|  104  |  105  | 
|  105   // Sets |margins_| to a default picked for smaller bubbles. |  106   // Sets |margins_| to a default picked for smaller bubbles. | 
|  106   void UseCompactMargins(); |  107   void UseCompactMargins(); | 
|  107  |  108  | 
|  108   // Sets the bubble alignment relative to the anchor. This may only be called |  109   // Sets the bubble alignment relative to the anchor. This may only be called | 
|  109   // after calling CreateBubble. |  110   // after calling CreateBubble. | 
|  110   void SetAlignment(BubbleBorder::BubbleAlignment alignment); |  111   void SetAlignment(BubbleBorder::BubbleAlignment alignment); | 
|  111  |  112  | 
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  200  |  201  | 
|  201   // Parent native window of the bubble. |  202   // Parent native window of the bubble. | 
|  202   gfx::NativeView parent_window_; |  203   gfx::NativeView parent_window_; | 
|  203  |  204  | 
|  204   DISALLOW_COPY_AND_ASSIGN(BubbleDialogDelegateView); |  205   DISALLOW_COPY_AND_ASSIGN(BubbleDialogDelegateView); | 
|  205 }; |  206 }; | 
|  206  |  207  | 
|  207 }  // namespace views |  208 }  // namespace views | 
|  208  |  209  | 
|  209 #endif  // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE2_H_ |  210 #endif  // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE2_H_ | 
| OLD | NEW |