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

Side by Side Diff: chrome/browser/ui/views/bubble/bubble.cc

Issue 8351042: Gets disable inactive frame rendering to work correctly for aura. This (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweaks Created 9 years, 1 month 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/ui/views/bubble/bubble.h" 5 #include "chrome/browser/ui/views/bubble/bubble.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "chrome/browser/ui/views/bubble/border_contents.h" 9 #include "chrome/browser/ui/views/bubble/border_contents.h"
10 #include "chrome/common/chrome_notification_types.h" 10 #include "chrome/common/chrome_notification_types.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 views::View* contents, 189 views::View* contents,
190 BubbleDelegate* delegate) { 190 BubbleDelegate* delegate) {
191 delegate_ = delegate; 191 delegate_ = delegate;
192 position_relative_to_ = position_relative_to; 192 position_relative_to_ = position_relative_to;
193 arrow_location_ = arrow_location; 193 arrow_location_ = arrow_location;
194 contents_ = contents; 194 contents_ = contents;
195 const bool fade_in = delegate_ && delegate_->FadeInOnShow(); 195 const bool fade_in = delegate_ && delegate_->FadeInOnShow();
196 196
197 // Create the main window. 197 // Create the main window.
198 #if defined(USE_AURA) 198 #if defined(USE_AURA)
199 // TODO(beng): 199 views::Widget* parent_window = parent->GetTopLevelWidget();
200 NOTIMPLEMENTED(); 200 if (parent_window)
201 // NOTE: This Widget initialization here is mostly to paper over a crash. 201 parent_window->DisableInactiveRendering();
202 // This will soon be not necessary anymore with alicet/msw's work on new
203 // bubbles infrastructure.
204 views::Widget::InitParams params; 202 views::Widget::InitParams params;
205 params.transparent = true; 203 params.transparent = true;
206 params.parent_widget = parent; 204 params.parent_widget = parent;
207 params.native_widget = this; 205 params.native_widget = this;
208 GetWidget()->Init(params); 206 GetWidget()->Init(params);
209 if (fade_in) 207 if (fade_in)
210 SetOpacity(0); 208 SetOpacity(0);
211 #elif defined(OS_WIN) 209 #elif defined(OS_WIN)
212 views::Widget* parent_window = parent->GetTopLevelWidget(); 210 views::Widget* parent_window = parent->GetTopLevelWidget();
213 if (parent_window) 211 if (parent_window)
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 animation_->Hide(); 438 animation_->Hide();
441 } 439 }
442 440
443 bool Bubble::AcceleratorPressed(const views::Accelerator& accelerator) { 441 bool Bubble::AcceleratorPressed(const views::Accelerator& accelerator) {
444 if (!delegate_ || delegate_->CloseOnEscape()) { 442 if (!delegate_ || delegate_->CloseOnEscape()) {
445 DoClose(true); 443 DoClose(true);
446 return true; 444 return true;
447 } 445 }
448 return false; 446 return false;
449 } 447 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/browser_frame.cc » ('j') | views/widget/native_widget_aura.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698