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

Side by Side Diff: chrome/browser/ui/confirm_bubble_model.cc

Issue 8697001: Implement confirm bubble for Mac. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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/confirm_bubble_model.h" 5 #include "chrome/browser/ui/confirm_bubble_model.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "grit/generated_resources.h" 8 #include "grit/generated_resources.h"
9 #include "ui/base/l10n/l10n_util.h" 9 #include "ui/base/l10n/l10n_util.h"
10 10
(...skipping 23 matching lines...) Expand all
34 void ConfirmBubbleModel::Cancel() { 34 void ConfirmBubbleModel::Cancel() {
35 } 35 }
36 36
37 string16 ConfirmBubbleModel::GetLinkText() const { 37 string16 ConfirmBubbleModel::GetLinkText() const {
38 return string16(); 38 return string16();
39 } 39 }
40 40
41 void ConfirmBubbleModel::LinkClicked() { 41 void ConfirmBubbleModel::LinkClicked() {
42 } 42 }
43 43
44 #if !defined(OS_MACOSX)
44 void ConfirmBubbleModel::Show(gfx::NativeView view, 45 void ConfirmBubbleModel::Show(gfx::NativeView view,
tfarina 2011/11/30 15:58:38 This is better implemented as a free function. Ma
Hironori Bono 2011/12/09 11:14:32 Thanks for your suggestion. I'm implementing GTK c
45 const gfx::Point& origin, 46 const gfx::Point& origin,
46 ConfirmBubbleModel* model) { 47 ConfirmBubbleModel* model) {
47 #if defined(TOOLKIT_VIEWS) 48 #if defined(TOOLKIT_VIEWS)
48 views::Widget* parent = views::Widget::GetTopLevelWidgetForNativeView(view); 49 views::Widget* parent = views::Widget::GetTopLevelWidgetForNativeView(view);
49 if (!parent) 50 if (!parent)
50 return; 51 return;
51 52
52 ConfirmBubbleView* bubble_view = new ConfirmBubbleView(model); 53 ConfirmBubbleView* bubble_view = new ConfirmBubbleView(model);
53 Bubble* bubble = Bubble::Show(parent, gfx::Rect(origin, gfx::Size()), 54 Bubble* bubble = Bubble::Show(parent, gfx::Rect(origin, gfx::Size()),
54 views::BubbleBorder::NONE, 55 views::BubbleBorder::NONE,
55 views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR, 56 views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR,
56 bubble_view, bubble_view); 57 bubble_view, bubble_view);
57 bubble->SizeToContents(); 58 bubble->SizeToContents();
58 #else 59 #else
59 NOTIMPLEMENTED(); // Bug 99130: Implement it. 60 NOTIMPLEMENTED(); // Bug 99130: Implement it.
60 #endif 61 #endif
61 } 62 }
62 63 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698