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

Unified Diff: chrome/browser/ui/cocoa/applescript/tab_applescript.mm

Issue 8892011: Clean up TCW, make it solely a hub for 1:1 observer/helper objects. (Closed) Base URL: svn://svn.chromium.org/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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser_list_unittest.cc ('k') | chrome/browser/ui/cocoa/constrained_window_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/applescript/tab_applescript.mm
diff --git a/chrome/browser/ui/cocoa/applescript/tab_applescript.mm b/chrome/browser/ui/cocoa/applescript/tab_applescript.mm
index 888e6cafbd751a832626dfb2b68d81acecec800a..6c3c5ee2cb75f563b18acb9c3ad9dcc0a41bad1c 100644
--- a/chrome/browser/ui/cocoa/applescript/tab_applescript.mm
+++ b/chrome/browser/ui/cocoa/applescript/tab_applescript.mm
@@ -22,6 +22,7 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/navigation_entry.h"
+#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "googleurl/src/gurl.h"
@@ -185,7 +186,8 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
return nil;
}
- NavigationEntry* entry = tabContents_->controller().GetActiveEntry();
+ NavigationEntry* entry =
+ tabContents_->tab_contents()->controller().GetActiveEntry();
if (!entry) {
return nil;
}
@@ -208,7 +210,8 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
return;
}
- NavigationEntry* entry = tabContents_->controller().GetActiveEntry();
+ NavigationEntry* entry =
+ tabContents_->tab_contents()->controller().GetActiveEntry();
if (!entry)
return;
@@ -222,7 +225,8 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
}
- (NSString*)title {
- NavigationEntry* entry = tabContents_->controller().GetActiveEntry();
+ NavigationEntry* entry =
+ tabContents_->tab_contents()->controller().GetActiveEntry();
if (!entry)
return nil;
@@ -240,7 +244,7 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
}
- (void)handlesUndoScriptCommand:(NSScriptCommand*)command {
- RenderViewHost* view = tabContents_->render_view_host();
+ RenderViewHost* view = tabContents_->tab_contents()->render_view_host();
if (!view) {
NOTREACHED();
return;
@@ -250,7 +254,7 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
}
- (void)handlesRedoScriptCommand:(NSScriptCommand*)command {
- RenderViewHost* view = tabContents_->render_view_host();
+ RenderViewHost* view = tabContents_->tab_contents()->render_view_host();
if (!view) {
NOTREACHED();
return;
@@ -260,7 +264,7 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
}
- (void)handlesCutScriptCommand:(NSScriptCommand*)command {
- RenderViewHost* view = tabContents_->render_view_host();
+ RenderViewHost* view = tabContents_->tab_contents()->render_view_host();
if (!view) {
NOTREACHED();
return;
@@ -270,7 +274,7 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
}
- (void)handlesCopyScriptCommand:(NSScriptCommand*)command {
- RenderViewHost* view = tabContents_->render_view_host();
+ RenderViewHost* view = tabContents_->tab_contents()->render_view_host();
if (!view) {
NOTREACHED();
return;
@@ -280,7 +284,7 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
}
- (void)handlesPasteScriptCommand:(NSScriptCommand*)command {
- RenderViewHost* view = tabContents_->render_view_host();
+ RenderViewHost* view = tabContents_->tab_contents()->render_view_host();
if (!view) {
NOTREACHED();
return;
@@ -290,7 +294,7 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
}
- (void)handlesSelectAllScriptCommand:(NSScriptCommand*)command {
- RenderViewHost* view = tabContents_->render_view_host();
+ RenderViewHost* view = tabContents_->tab_contents()->render_view_host();
if (!view) {
NOTREACHED();
return;
@@ -300,25 +304,28 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
}
- (void)handlesGoBackScriptCommand:(NSScriptCommand*)command {
- NavigationController& navigationController = tabContents_->controller();
+ NavigationController& navigationController =
+ tabContents_->tab_contents()->controller();
if (navigationController.CanGoBack())
navigationController.GoBack();
}
- (void)handlesGoForwardScriptCommand:(NSScriptCommand*)command {
- NavigationController& navigationController = tabContents_->controller();
+ NavigationController& navigationController =
+ tabContents_->tab_contents()->controller();
if (navigationController.CanGoForward())
navigationController.GoForward();
}
- (void)handlesReloadScriptCommand:(NSScriptCommand*)command {
- NavigationController& navigationController = tabContents_->controller();
+ NavigationController& navigationController =
+ tabContents_->tab_contents()->controller();
const bool checkForRepost = true;
navigationController.Reload(checkForRepost);
}
- (void)handlesStopScriptCommand:(NSScriptCommand*)command {
- RenderViewHost* view = tabContents_->render_view_host();
+ RenderViewHost* view = tabContents_->tab_contents()->render_view_host();
if (!view) {
// We tolerate Stop being called even before a view has been created.
// So just log a warning instead of a NOTREACHED().
@@ -380,7 +387,8 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
}
- (void)handlesViewSourceScriptCommand:(NSScriptCommand*)command {
- NavigationEntry* entry = tabContents_->controller().GetLastCommittedEntry();
+ NavigationEntry* entry =
+ tabContents_->tab_contents()->controller().GetLastCommittedEntry();
if (entry) {
tabContents_->tab_contents()->OpenURL(
GURL(chrome::kViewSourceScheme + std::string(":") +
@@ -392,7 +400,7 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
}
- (id)handlesExecuteJavascriptScriptCommand:(NSScriptCommand*)command {
- RenderViewHost* view = tabContents_->render_view_host();
+ RenderViewHost* view = tabContents_->tab_contents()->render_view_host();
if (!view) {
NOTREACHED();
return nil;
« no previous file with comments | « chrome/browser/ui/browser_list_unittest.cc ('k') | chrome/browser/ui/cocoa/constrained_window_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698