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

Unified Diff: chrome/browser/ui/cocoa/location_bar/chrome_to_mobile_decoration.mm

Issue 10885024: Integrate Chrome To Mobile with Action Box UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable ShowChromeToMobileBubble on GTK. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/location_bar/chrome_to_mobile_decoration.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/chrome_to_mobile_decoration.mm b/chrome/browser/ui/cocoa/location_bar/chrome_to_mobile_decoration.mm
deleted file mode 100644
index 14c287ba402984af8fe84528ccd7bcffa1af9dfb..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/cocoa/location_bar/chrome_to_mobile_decoration.mm
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#import "chrome/browser/ui/cocoa/location_bar/chrome_to_mobile_decoration.h"
-
-#include "chrome/app/chrome_command_ids.h"
-#include "chrome/browser/command_updater.h"
-#include "chrome/browser/themes/theme_service.h"
-#include "chrome/browser/themes/theme_service_factory.h"
-#import "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h"
-#include "grit/generated_resources.h"
-#include "grit/theme_resources.h"
-#include "ui/base/l10n/l10n_util_mac.h"
-
-// An inset to anchor the bubble within the icon's built-in padding.
-// The popup should be where the Omnibox popup ends up (2px below field).
-// Matches the bookmark bubble and star settings.
-const CGFloat kIconYInset = 2.0;
-
-ChromeToMobileDecoration::ChromeToMobileDecoration(
- Profile* profile,
- CommandUpdater* command_updater)
- : profile_(profile),
- command_updater_(command_updater) {
- SetVisible(false);
- SetLit(false);
- tooltip_.reset([l10n_util::GetNSStringWithFixup(
- IDS_CHROME_TO_MOBILE_BUBBLE_TOOLTIP) retain]);
-}
-
-ChromeToMobileDecoration::~ChromeToMobileDecoration() {
-}
-
-NSPoint ChromeToMobileDecoration::GetBubblePointInFrame(NSRect frame) {
- const NSRect draw_frame = GetDrawRectInFrame(frame);
- return NSMakePoint(NSMidX(draw_frame), NSMaxY(draw_frame) - kIconYInset);
-}
-
-void ChromeToMobileDecoration::SetLit(bool lit) {
- ThemeService* service = ThemeServiceFactory::GetForProfile(profile_);
- SetImage(service->GetNSImageNamed(lit ? IDR_MOBILE_LIT : IDR_MOBILE, true));
-}
-
-bool ChromeToMobileDecoration::AcceptsMousePress() {
- return true;
-}
-
-bool ChromeToMobileDecoration::OnMousePressed(NSRect frame) {
- command_updater_->ExecuteCommand(IDC_CHROME_TO_MOBILE_PAGE);
- return true;
-}
-
-NSString* ChromeToMobileDecoration::GetToolTip() {
- return tooltip_.get();
-}

Powered by Google App Engine
This is Rietveld 408576698