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

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

Issue 10827271: Replace views::Event with ui::Event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/confirm_bubble_views.h" 5 #include "chrome/browser/ui/views/confirm_bubble_views.h"
6 6
7 #include "chrome/browser/ui/confirm_bubble.h" 7 #include "chrome/browser/ui/confirm_bubble.h"
8 #include "chrome/browser/ui/confirm_bubble_model.h" 8 #include "chrome/browser/ui/confirm_bubble_model.h"
9 #include "grit/theme_resources.h" 9 #include "grit/theme_resources.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
(...skipping 20 matching lines...) Expand all
31 : BubbleDelegateView(NULL, views::BubbleBorder::NONE), 31 : BubbleDelegateView(NULL, views::BubbleBorder::NONE),
32 anchor_point_(anchor_point), 32 anchor_point_(anchor_point),
33 model_(model) { 33 model_(model) {
34 DCHECK(model); 34 DCHECK(model);
35 } 35 }
36 36
37 ConfirmBubbleViews::~ConfirmBubbleViews() { 37 ConfirmBubbleViews::~ConfirmBubbleViews() {
38 } 38 }
39 39
40 void ConfirmBubbleViews::ButtonPressed(views::Button* sender, 40 void ConfirmBubbleViews::ButtonPressed(views::Button* sender,
41 const views::Event& event) { 41 const ui::Event& event) {
42 if (sender->tag() == ConfirmBubbleModel::BUTTON_OK) 42 if (sender->tag() == ConfirmBubbleModel::BUTTON_OK)
43 model_->Accept(); 43 model_->Accept();
44 else if (sender->tag() == ConfirmBubbleModel::BUTTON_CANCEL) 44 else if (sender->tag() == ConfirmBubbleModel::BUTTON_CANCEL)
45 model_->Cancel(); 45 model_->Cancel();
46 GetWidget()->Close(); 46 GetWidget()->Close();
47 } 47 }
48 48
49 void ConfirmBubbleViews::LinkClicked(views::Link* source, int event_flags) { 49 void ConfirmBubbleViews::LinkClicked(views::Link* source, int event_flags) {
50 model_->LinkClicked(); 50 model_->LinkClicked();
51 } 51 }
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 155
156 void ShowConfirmBubble(gfx::NativeView view, 156 void ShowConfirmBubble(gfx::NativeView view,
157 const gfx::Point& origin, 157 const gfx::Point& origin,
158 ConfirmBubbleModel* model) { 158 ConfirmBubbleModel* model) {
159 ConfirmBubbleViews* bubble = new ConfirmBubbleViews(origin, model); 159 ConfirmBubbleViews* bubble = new ConfirmBubbleViews(origin, model);
160 views::BubbleDelegateView::CreateBubble(bubble); 160 views::BubbleDelegateView::CreateBubble(bubble);
161 bubble->Show(); 161 bubble->Show();
162 } 162 }
163 163
164 } // namespace chrome 164 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/confirm_bubble_views.h ('k') | chrome/browser/ui/views/constrained_window_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698