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

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

Issue 10446010: wip: Add ui::EventType parameter. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: wip - views_unittests Created 8 years, 7 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/chrome_to_mobile_bubble_view.h" 5 #include "chrome/browser/ui/views/chrome_to_mobile_bubble_view.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 send_ = new views::NativeTextButton( 299 send_ = new views::NativeTextButton(
300 this, l10n_util::GetStringUTF16(IDS_CHROME_TO_MOBILE_BUBBLE_SEND)); 300 this, l10n_util::GetStringUTF16(IDS_CHROME_TO_MOBILE_BUBBLE_SEND));
301 send_->SetIsDefault(true); 301 send_->SetIsDefault(true);
302 cancel_ = new views::NativeTextButton( 302 cancel_ = new views::NativeTextButton(
303 this, l10n_util::GetStringUTF16(IDS_CANCEL)); 303 this, l10n_util::GetStringUTF16(IDS_CANCEL));
304 layout->AddPaddingRow(0, views::kRelatedControlSmallVerticalSpacing); 304 layout->AddPaddingRow(0, views::kRelatedControlSmallVerticalSpacing);
305 layout->StartRow(0, button_column_set_id); 305 layout->StartRow(0, button_column_set_id);
306 layout->AddView(send_); 306 layout->AddView(send_);
307 layout->AddView(cancel_); 307 layout->AddView(cancel_);
308 308
309 AddAccelerator(ui::Accelerator(ui::VKEY_RETURN, ui::EF_NONE)); 309 AddAccelerator(ui::Accelerator(ui::VKEY_RETURN,
310 ui::EF_NONE,
311 ui::ET_KEY_PRESSED));
310 } 312 }
311 313
312 ChromeToMobileBubbleView::ChromeToMobileBubbleView(views::View* anchor_view, 314 ChromeToMobileBubbleView::ChromeToMobileBubbleView(views::View* anchor_view,
313 Profile* profile) 315 Profile* profile)
314 : BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_RIGHT), 316 : BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_RIGHT),
315 ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)), 317 ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)),
316 service_(ChromeToMobileServiceFactory::GetForProfile(profile)), 318 service_(ChromeToMobileServiceFactory::GetForProfile(profile)),
317 selected_mobile_(NULL), 319 selected_mobile_(NULL),
318 send_copy_(NULL), 320 send_copy_(NULL),
319 send_(NULL), 321 send_(NULL),
(...skipping 27 matching lines...) Expand all
347 service_->SendToMobile(mobile_id, snapshot, weak_ptr_factory_.GetWeakPtr()); 349 service_->SendToMobile(mobile_id, snapshot, weak_ptr_factory_.GetWeakPtr());
348 350
349 // Update the view's contents to show the "Sending..." progress animation. 351 // Update the view's contents to show the "Sending..." progress animation.
350 cancel_->SetEnabled(false); 352 cancel_->SetEnabled(false);
351 send_->SetEnabled(false); 353 send_->SetEnabled(false);
352 send_->set_alignment(views::TextButtonBase::ALIGN_LEFT); 354 send_->set_alignment(views::TextButtonBase::ALIGN_LEFT);
353 progress_animation_.reset(new ui::ThrobAnimation(this)); 355 progress_animation_.reset(new ui::ThrobAnimation(this));
354 progress_animation_->SetDuration(kProgressThrobDurationMS); 356 progress_animation_->SetDuration(kProgressThrobDurationMS);
355 progress_animation_->StartThrobbing(-1); 357 progress_animation_->StartThrobbing(-1);
356 } 358 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc ('k') | chrome/browser/ui/views/dropdown_bar_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698