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

Side by Side Diff: chrome/browser/first_run/try_chrome_dialog_view.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/first_run/try_chrome_dialog_view.h" 5 #include "chrome/browser/first_run/try_chrome_dialog_view.h"
6 6
7 #include <shellapi.h> 7 #include <shellapi.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 static const POINT polygon[] = { 297 static const POINT polygon[] = {
298 {0, 4}, {1, 2}, {2, 1}, {4, 0}, // Left side. 298 {0, 4}, {1, 2}, {2, 1}, {4, 0}, // Left side.
299 {w-4, 0}, {w-2, 1}, {w-1, 2}, {w, 4}, // Right side. 299 {w-4, 0}, {w-2, 1}, {w-1, 2}, {w, 4}, // Right side.
300 {w, h}, {0, h} 300 {w, h}, {0, h}
301 }; 301 };
302 HRGN region = ::CreatePolygonRgn(polygon, arraysize(polygon), WINDING); 302 HRGN region = ::CreatePolygonRgn(polygon, arraysize(polygon), WINDING);
303 ::SetWindowRgn(window, region, FALSE); 303 ::SetWindowRgn(window, region, FALSE);
304 } 304 }
305 305
306 void TryChromeDialogView::ButtonPressed(views::Button* sender, 306 void TryChromeDialogView::ButtonPressed(views::Button* sender,
307 const views::Event& event) { 307 const ui::Event& event) {
308 if (sender->tag() == BT_DONT_BUG_RADIO) { 308 if (sender->tag() == BT_DONT_BUG_RADIO) {
309 if (make_default_) { 309 if (make_default_) {
310 make_default_->SetChecked(false); 310 make_default_->SetChecked(false);
311 make_default_->SetState(views::CustomButton::BS_DISABLED); 311 make_default_->SetState(views::CustomButton::BS_DISABLED);
312 } 312 }
313 return; 313 return;
314 } else if (sender->tag() == BT_TRY_IT_RADIO) { 314 } else if (sender->tag() == BT_TRY_IT_RADIO) {
315 if (make_default_) { 315 if (make_default_) {
316 make_default_->SetChecked(true); 316 make_default_->SetChecked(true);
317 make_default_->SetState(views::CustomButton::BS_NORMAL); 317 make_default_->SetState(views::CustomButton::BS_NORMAL);
(...skipping 20 matching lines...) Expand all
338 if ((result_ == TRY_CHROME) && make_default_->checked()) 338 if ((result_ == TRY_CHROME) && make_default_->checked())
339 result_ = TRY_CHROME_AS_DEFAULT; 339 result_ = TRY_CHROME_AS_DEFAULT;
340 340
341 popup_->Close(); 341 popup_->Close();
342 MessageLoop::current()->Quit(); 342 MessageLoop::current()->Quit();
343 } 343 }
344 344
345 void TryChromeDialogView::LinkClicked(views::Link* source, int event_flags) { 345 void TryChromeDialogView::LinkClicked(views::Link* source, int event_flags) {
346 ::ShellExecuteW(NULL, L"open", kHelpCenterUrl, NULL, NULL, SW_SHOW); 346 ::ShellExecuteW(NULL, L"open", kHelpCenterUrl, NULL, NULL, SW_SHOW);
347 } 347 }
OLDNEW
« no previous file with comments | « chrome/browser/first_run/try_chrome_dialog_view.h ('k') | chrome/browser/ui/panels/panel_browser_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698