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

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

Issue 7600007: Profiles: Eliminate dead notifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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/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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 contents_view->AddChildViewAt(border_contents_, 0); 266 contents_view->AddChildViewAt(border_contents_, 0);
267 267
268 // |contents_view| has no layout manager, so we have to explicitly position 268 // |contents_view| has no layout manager, so we have to explicitly position
269 // its children. 269 // its children.
270 border_contents_->SetBoundsRect( 270 border_contents_->SetBoundsRect(
271 gfx::Rect(gfx::Point(), window_bounds.size())); 271 gfx::Rect(gfx::Point(), window_bounds.size()));
272 contents->SetBoundsRect(contents_bounds); 272 contents->SetBoundsRect(contents_bounds);
273 #endif 273 #endif
274 GetWidget()->SetBounds(window_bounds); 274 GetWidget()->SetBounds(window_bounds);
275 275
276 // Done creating the bubble.
277 NotificationService::current()->Notify(
278 chrome::NOTIFICATION_INFO_BUBBLE_CREATED, Source<Bubble>(this),
279 NotificationService::NoDetails());
280
281 // Show the window. 276 // Show the window.
282 #if defined(OS_WIN) 277 #if defined(OS_WIN)
283 border_->ShowWindow(SW_SHOW); 278 border_->ShowWindow(SW_SHOW);
284 ShowWindow(SW_SHOW); 279 ShowWindow(SW_SHOW);
285 if (fade_in) 280 if (fade_in)
286 FadeIn(); 281 FadeIn();
287 #elif defined(TOOLKIT_USES_GTK) 282 #elif defined(TOOLKIT_USES_GTK)
288 GetWidget()->Show(); 283 GetWidget()->Show();
289 #endif 284 #endif
290 } 285 }
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 animation_->Hide(); 389 animation_->Hide();
395 } 390 }
396 391
397 bool Bubble::AcceleratorPressed(const views::Accelerator& accelerator) { 392 bool Bubble::AcceleratorPressed(const views::Accelerator& accelerator) {
398 if (!delegate_ || delegate_->CloseOnEscape()) { 393 if (!delegate_ || delegate_->CloseOnEscape()) {
399 DoClose(true); 394 DoClose(true);
400 return true; 395 return true;
401 } 396 }
402 return false; 397 return false;
403 } 398 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/web_cache_manager.cc ('k') | chrome/browser/ui/views/constrained_window_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698