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

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

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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 "content/common/notification_service.h" 11 #include "content/common/notification_service.h"
11 #include "ui/base/animation/slide_animation.h" 12 #include "ui/base/animation/slide_animation.h"
12 #include "ui/base/keycodes/keyboard_codes.h" 13 #include "ui/base/keycodes/keyboard_codes.h"
13 #include "ui/gfx/color_utils.h" 14 #include "ui/gfx/color_utils.h"
14 #include "views/layout/fill_layout.h" 15 #include "views/layout/fill_layout.h"
15 #include "views/widget/widget.h" 16 #include "views/widget/widget.h"
16 #include "views/window/client_view.h" 17 #include "views/window/client_view.h"
17 18
18 #if defined(OS_CHROMEOS) 19 #if defined(OS_CHROMEOS)
19 #include "chrome/browser/chromeos/wm_ipc.h" 20 #include "chrome/browser/chromeos/wm_ipc.h"
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 gfx::Rect(gfx::Point(), window_bounds.size())); 266 gfx::Rect(gfx::Point(), window_bounds.size()));
266 contents->SetBoundsRect(contents_bounds); 267 contents->SetBoundsRect(contents_bounds);
267 #endif 268 #endif
268 GetWidget()->SetBounds(window_bounds); 269 GetWidget()->SetBounds(window_bounds);
269 270
270 // Register the Escape accelerator for closing. 271 // Register the Escape accelerator for closing.
271 GetWidget()->GetFocusManager()->RegisterAccelerator( 272 GetWidget()->GetFocusManager()->RegisterAccelerator(
272 views::Accelerator(ui::VKEY_ESCAPE, false, false, false), this); 273 views::Accelerator(ui::VKEY_ESCAPE, false, false, false), this);
273 274
274 // Done creating the bubble. 275 // Done creating the bubble.
275 NotificationService::current()->Notify(NotificationType::INFO_BUBBLE_CREATED, 276 NotificationService::current()->Notify(chrome::INFO_BUBBLE_CREATED,
276 Source<Bubble>(this), 277 Source<Bubble>(this),
277 NotificationService::NoDetails()); 278 NotificationService::NoDetails());
278 279
279 // Show the window. 280 // Show the window.
280 #if defined(OS_WIN) 281 #if defined(OS_WIN)
281 border_->ShowWindow(SW_SHOW); 282 border_->ShowWindow(SW_SHOW);
282 ShowWindow(SW_SHOW); 283 ShowWindow(SW_SHOW);
283 if (fade_in) 284 if (fade_in)
284 FadeIn(); 285 FadeIn();
285 #elif defined(TOOLKIT_USES_GTK) 286 #elif defined(TOOLKIT_USES_GTK)
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 animation_->Hide(); 380 animation_->Hide();
380 } 381 }
381 382
382 bool Bubble::AcceleratorPressed(const views::Accelerator& accelerator) { 383 bool Bubble::AcceleratorPressed(const views::Accelerator& accelerator) {
383 if (!delegate_ || delegate_->CloseOnEscape()) { 384 if (!delegate_ || delegate_->CloseOnEscape()) {
384 DoClose(true); 385 DoClose(true);
385 return true; 386 return true;
386 } 387 }
387 return false; 388 return false;
388 } 389 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698